From: Junio C Hamano <email@example.com> To: Vishal Verma <firstname.lastname@example.org> Cc: email@example.com, "Vishal Verma" <firstname.lastname@example.org>, "Rafael Ascensão" <email@example.com>, "Johannes Schindelin" <Johannes.Schindelin@gmx.de> Subject: Re: [PATCH v4] merge: refuse --commit with --squash Date: Tue, 28 May 2019 12:07:29 -0700 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> (Vishal Verma's message of "Fri, 24 May 2019 12:36:17 -0600") Vishal Verma <firstname.lastname@example.org> writes: > From: Vishal Verma <email@example.com> > > Convert option_commit to tristate, representing the states of > 'default/untouched', 'enabled-by-cli', 'disabled-by-cli'. With this in > place, check whether option_commit was enabled by cli when squashing a > merge. If so, error out, as this is not supported. > > Previously, when --squash was supplied, 'option_commit' was silently > dropped. This could have been surprising to a user who tried to override > the no-commit behavior of squash using --commit explicitly. > > Add a note to the --squash option for git-merge to clarify the > incompatibility, and add a test case to t7600-merge.sh > > Cc: Junio C Hamano <firstname.lastname@example.org> > Cc: Rafael Ascensão <email@example.com> > Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de> > Signed-off-by: Vishal Verma <firstname.lastname@example.org> > --- I personally feel that "merge --squash --commit" that does not complain and leaves the result in the working tree to be tweaked and then committed is perfectly fine, especially given that the reason why "--commit" option exists is primarily because we need to allow "--no-commit" to stop the normal merge from recording the result in a new commit. A user who really wanted to record what a merge would bring to the current state in a single-parent commit would have to do "git commit" after that anyway, and with this patch, the user would instead need to run the same "git merge" command again, without "--commit", before being able to do so, so in the sense, it is likely that this change makes it more cumbersome to use for such a user to use the command. But I guess that this change will give an incentive to actually allow the combination to "just work" by making it more obvious that the combination is not supported, so it would be a slight improvement in that sense ;-)
prev parent reply other threads:[~2019-05-28 19:07 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-23 22:53 [PATCH v3] builtin/merges: clarify --squash behavior with --commit Vishal Verma 2019-05-24 18:36 ` [PATCH v4] merge: refuse --commit with --squash Vishal Verma 2019-05-28 19:07 ` Junio C Hamano [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --cc=Johannes.Schindelin@gmx.de \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH v4] merge: refuse --commit with --squash' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).