Re: bad git pull
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:15
Carl Baldwin [off-list ref] writes:
Whenever I give a colleage an introduction to git I emphatically recommend that they start with using git fetch and git merge independantly of each other and stay away for git pull at least until they know what they're doing.
You "reduced" this sequence:
$ git symbolic-ref HEAD ;# to make sure you are on the branch
# you think you are on
$ git pull
to this sequence:
$ git fetch origin ;# would not damage the repository
$ git symbolic-ref HEAD ;# to make sure you are on the branch
# you think you are on
$ git merge "Merge from frotz branch of git://..." HEAD FETCH_HEAD
The thing is, you need to make sure where you are, in either
case, before the actual merge happens. Yours needs extra
typing, and in addition loses the merge message autogenerated by
"git pull". Sorry, I fail to see how that is an improvement.
I see nothing in the English dictionary to suggest that pull means fetch + merge.
I agree to this. I have never used BK so this is just a speculation, but I suspect what happened is that we inherited "pull" terminology from there, needed to name the merge-less part something, and we ended up calling it "fetch". So the history behind them might be expressed better by "fetch = pull - merge" instead of saying "pull = fetch + merge" ;-).
... I also recommend that some extra care should be taken in the tutorials and documentation to warn about this difference up front and possibly suggest avoiding the use of pull for those new to git.
Yup. Thanks for the comments. I am not a good writer, so a
patch is greatly appreciated.
BTW, I feel that setting Mail-Followup-To: to other people is
just plain rude.
Mail-Followup-To: Junio C Hamano [off-list ref],
Don Zickus [off-list ref], git@vger.kernel.org
I suspect you are trying to avoid receiving a duplicate message
because you subscribe to the list, but when I tell my MUA "I
want to say something to the author of this message in public" I
get Don Zickus on the To: line instead of you, and I had to edit
the To: line to point at you. Aren't you forcing me (and other
people who might want to follow-up to your message) to do extra
work, and making Don's life harder [*1*], just to work around
the problem on your end, when you could just filter the incoming
duplicates yourself?
Removing yourself from CC: line when the CC: line already
contains the mailing list you subscribe to would be fine, but I
find this use of Mail-Followup-To: somewhat objectionable.
[Footnote]
*1* Don could have a mail sorter that prioritizes messages
addressed To: over Cc: him, and response meant to *you* goes
with To: Don --- which messes up such a mail sorting rule.