From: David Aguilar <davvid@gmail.com>
To: Mike Rappazzo <rappazzo@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
ssaasen@atlassian.com, john@keeping.me.uk,
Git List <git@vger.kernel.org>
Subject: Re: [PATCH] mergetools: add config option to disable auto-merge
Date: Thu, 18 Jun 2015 01:42:53 -0700 [thread overview]
Message-ID: <20150618084252.GA38187@gmail.com> (raw)
In-Reply-To: <CANoM8SWN2ZzgMP_MoDRRFA8ZjzRh724iaJ7GwrD2WddrjqwuqQ@mail.gmail.com>
On Wed, Jun 17, 2015 at 10:27:58PM -0400, Mike Rappazzo wrote:
> On Wed, Jun 17, 2015 at 3:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > Michael Rappazzo <rappazzo@gmail.com> writes:
> >
> >> For some mergetools, the current invocation of git mergetool will
> >> include an auto-merge flag. By default the flag is included, however if
> >> the git config option 'merge.automerge' is set to 'false', then that
> >> flag will now be omitted.
> >
> > ... and why is the "automerge" a bad thing that user would want to
> > avoid triggering under which condition? That description may not
> > have to be in the proposed log message, but it would help users when
> > they decide if they want to use the configuration to describe it in
> > the mergetool.automerge configuration.
> >
> > And depending on the answer to the above question, a configuration
> > variable may turn out be a bad mechanism to customize this (namely,
> > set-and-forget configuration variable is a bad match for a knob that
> > is more "per invocation" than "user taste").
> >
> > Is this not about "automerge" but more about "always-show-UI because
> > I like GUI?" Then that may be a "user taste" thing that is a good
> > match for a configuration variable. I simply cannot tell from what
> > was in the message I am responding to.
>
> I feel that the auto-merge takes away the context of the changes.
>
> I use araxis merge as my mergetool of choice. I almost always immediately
> undo the auto-merge. After taking a moment to look at each file, I will
> then (usually) use the keyboard shortcut for auto-merge.
>
> It sure would be nice to "set-and-forget" a config variable to remove the
> annoyance of having to undo the auto-merge. I think that this config
> option is reasonable. Perhaps my documentation leaves something to be
> desired. I can take another stab at it.
If this is the case then I would recommend making it more
granular. Just because Araxis' automerge is undesirable does
not mean that some other tools' automerge is as well.
e.g. the config variable could be "mergetool.<tool>.automerge"
rather than the top-level "mergetool.automerge" variable.
But, as Junio suggested, having a command-line flag to skip the
behavior might be a better first step. Something like,
"git mergetool --no-automerge".
Most of Git's behavior that can be modified via configuration
can also be modified on the command-line, so exposing this
feature as a flag would probably be a good idea.
Even without a config variable, it can still be fire-and-forget
convenient by using a git alias to supply the flag.
In lieu of any of these features, another option is that you can
override the default command by setting "mergetool.araxis.cmd",
and "git mergetool" will use your definition rather than its
built-in command. We left that escape hatch in for just this
purpose.
I'm curious, is this a common use case? I'm personally not a
good judge of that, but I'll let the list chime in. Thoughts?
--
David
next prev parent reply other threads:[~2015-06-18 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 21:35 [PATCH] mergetools: add config option to disable auto-merge Michael Rappazzo
2015-06-16 21:35 ` Michael Rappazzo
2015-06-17 19:41 ` Junio C Hamano
2015-06-18 2:27 ` Mike Rappazzo
2015-06-18 8:42 ` David Aguilar [this message]
2015-06-18 15:14 ` Mike Rappazzo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150618084252.GA38187@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=john@keeping.me.uk \
--cc=rappazzo@gmail.com \
--cc=ssaasen@atlassian.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).