From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Thomas Rast <trast@student.ethz.ch>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: Improving merge messages for 1.7.10 and making "pull" easier
Date: Fri, 24 Feb 2012 11:39:39 -0800 [thread overview]
Message-ID: <7vy5rsyq9w.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACBZZX5UVq9k7jvSy3m+yMVj7_JbfLp8ugFWf2gGFdMz_8GPEA@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Fri, 24 Feb 2012 10:59:00 +0100")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Firstly (and as a more general thing) I think we should add a mention
> of "git merge --abort" to the message, just saving an empty file is
> not sufficient to fully clear the merge state:
Makes sense, but the new message does not quite parse.
>> "Lines starting with '#' will be ignored, and an empty message followed\n"
>> "by 'git merge --abort' the merge.\n");
Perhaps s/the merge/aborts &/ or something.
> Additionally, perhaps it would be a good idea to:
>
> * Detect if the user didn't run this explicitly but implicitly from a
> "git pull". We could pass some env var along or another option
> (e.g. --internal-from-porcelain=pull) and add this:
>
> You've merged implicitly via a "git pull", if you're just
> updating some local work in progress to keep up with upstream
> you may want to use "git pull --rebase" instead (or set the
> pull.rebase configuration variable) to rebase instead of merge.
Won't this message be given to _all_ users of "git pull", even to the ones
who already have decided correctly that "pull" is the right thing in their
situation? With a new advice.* settings to squelch it, perhaps.
> * Explicitly check if we're merging an updated upstream into the
> work-in-progress topic,...
It might be a worthy goal, but how would we detect it? A few examples
that we shouldn't give an unhelpful advice with a false positive are
merges into:
- The 'master' branch used by people who use Git as an improved CVS, when
they do an equivalent of 'cvs update'. Merging the updated 'master'
from the central repository into their 'master' that contains their
work that may or may not be ready to be pushed back is how their
project works. It is a norm for them to make such a merge, even though
more experienced people may prefer to see the history of their project
kept cleaner by suggesting their project participants to use their own
topic branches.
- Integration branches like my 'next', when it gets a merge from
'master'. This is "merging an updated upstream" but is done in order to
keep the promise that 'next' would contain everything in 'master'.
And what alternative would we offer? If we were to suggest "rebase", we
would also need to consider the topic of the other a-couple-of-days-old
thread to detect which part of history is no longer subject to rewrite.
> I work with a lot of inexperienced git users and a lot of them are
> going to be very confused by this change. I still think it's a good
> change to make, but we could do a lot more to mitigate the inevitable
> confusion.
What exact change are you talking about with "this change"? Earlier you
had a chance to edit the merge log only when it needed your help resolving
(hence you did a separate "git commit" to record it) but you had to "git
commit --amend" (or start with "git merge --no-commit") to edit the merge
log if it did not need any help resolving conflicts, but now you do not
have to. Is that the change you have in mind?
I would like to know how that would lead to an "inevitable confusion".
Admittedly, the original without any "# Please do X" comment, the user may
wonder what is being asked of him when he sees the editor for the first
time, but I thought Thomas's patch took care of that issue.
> One thing that would help these users in particular would be to have
> some easy to use replacement for their frequent use of "git
> pull".
After this part, I think you shifted into a different topic.
I have mixed feelings about "rebase your unpublished work and keep it
always a descendant of the upstream" workflow you seem to be advocating.
It _might_ deserve a bit more visibility, but I do not think rewording
this message done during "merge" is the place to do so.
> They don't often commit their work (because of git inexperience) so
> rebasing will error out because the tree is unclean.
That is a *good* thing, isn't it? There lies the perfect opportunity for
them to train their fingers to commit first and then rebase.
next prev parent reply other threads:[~2012-02-24 19:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 9:59 Improving merge messages for 1.7.10 and making "pull" easier Ævar Arnfjörð Bjarmason
2012-02-24 19:39 ` Junio C Hamano [this message]
2012-02-25 9:27 ` Ævar Arnfjörð Bjarmason
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=7vy5rsyq9w.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=trast@student.ethz.ch \
/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