login
Header Space

 
 

Re: [PATCH] have merge put FETCH_HEAD data in commit message

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: Junio C Hamano <junkio@...>, Michael S. Tsirkin <mst@...>
Date: Thursday, March 22, 2007 - 5:10 am

On Wednesday 2007 March 21 15:37, Junio C Hamano wrote:


It's definitely not wrong - and I realise you aren't advocating removing fetch 
& merge; however I wanted to explain why fetch & merge isn't wrong.  I almost 
never use pull; in fact, of the two work methods you mention, I can't see 
that git-pull would ever be the my regular use case (I wonder if I'm missing 
something and need enlightening?)

Use case (1)

A colleague and I work on the same project; with fundamentally the same code 
base.  He commits to one branch and I commit to an other.  I want to be able 
to see what he's doing, but definitely don't want to merge that branch.  
Regular git-fetch sorts that out.  Occasionally, his branch stabilises to the 
point were we want to merge my changes in.  I'm more familiar with both 
branches than him so it's better if I do the merge and resolve the conflicts.  
git-merge does that job.

Strangely enough, I've also found that it's better to resolve some commits 
before the merge is done.  Using "git-diff mybranch hisbranch" often shows 
changes that are going to conflict, but don't need to - this is usually 
things like "// comment this block out while I'm testing something else".


Use case (2):

I keep branches around for submission to git.  Whenever they're ready to go I 
rebase them on to master resolve conflicts and email them in.  That is 
git-fetch, git-rebase.  I have never run git-pull on my git repository.


Use case (3):

I'm tracking an upstream project that uses svn; git-svn makes light work of 
keeping up to date with it and keeping a "git-svn" branch to track it.  I 
keep my own local changes to it - never for submission upstream - in a 
separate branch; infrequently I merge the upstream branch into my own.


Your favoured case misses out one significant step:
 * git-pull
 * Spend time resolving conflicts
 * git-reset ORIG_HEAD
It's not a sign of distrust that I don't do git-pull; I trust git to do a 
fantastic job when that moment comes.  However, it is a sign of laziness - 
why should I want to resolve conflicts just so they can be thrown away when I 
don't like them.


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Junio C Hamano, (Wed Mar 21, 11:37 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Andy Parkins, (Thu Mar 22, 5:10 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Thu Mar 22, 1:02 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Thu Mar 22, 2:28 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Thu Mar 22, 3:41 am)
[PATCH] Put FETCH_HEAD data in merge commit message, Michael S. Tsirkin, (Thu Mar 22, 5:07 am)
Re: [PATCH] Put FETCH_HEAD data in merge commit message, Junio C Hamano, (Thu Mar 22, 6:01 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Thu Mar 22, 4:37 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Thu Mar 22, 6:40 am)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Wed Apr 4, 2:02 am)
Re: [PATCH] wt-status: show author info if status.showauthor..., Michael S. Tsirkin, (Wed Apr 4, 2:49 am)
[PATCH] display shortlog after git-commit, Michael S. Tsirkin, (Wed Apr 4, 3:01 am)
Re: [PATCH] display shortlog after git-commit, Junio C Hamano, (Wed Apr 4, 4:15 am)
Re: [PATCH] display shortlog after git-commit, Michael S. Tsirkin, (Sun Apr 15, 6:33 am)
Re: [PATCH] display shortlog after git-commit, Junio C Hamano, (Wed Apr 4, 3:22 am)
[PATCH] display shortlog after git-commit, Michael S. Tsirkin, (Sun Apr 15, 6:39 pm)
Re: [PATCH] display shortlog after git-commit, Junio C Hamano, (Sun Apr 15, 7:08 pm)
Re: [PATCH] display shortlog after git-commit, Michael S. Tsirkin, (Mon Apr 16, 1:34 am)
Re: [PATCH] display shortlog after git-commit, Junio C Hamano, (Mon Apr 16, 2:04 am)
[PATCH] remove shortlog from git-commit output, Michael S. Tsirkin, (Mon Apr 16, 10:40 am)
Re: [PATCH] remove shortlog from git-commit output, Julian Phillips, (Mon Apr 16, 11:02 am)
Re: [PATCH] remove shortlog from git-commit output, Michael S. Tsirkin, (Mon Apr 16, 2:23 pm)
Re: [PATCH] remove shortlog from git-commit output, Julian Phillips, (Mon Apr 16, 4:21 pm)
Re: [PATCH] remove shortlog from git-commit output, Michael S. Tsirkin, (Tue Apr 17, 2:02 am)
Re: [PATCH] remove shortlog from git-commit output, Julian Phillips, (Tue Apr 17, 3:27 am)
Re: [PATCH] display shortlog after git-commit, Michael S. Tsirkin, (Mon Apr 16, 2:26 am)
[PATCH] display the subject of the commit just made, Michael S. Tsirkin, (Sun Apr 15, 11:53 pm)
Re: [PATCH] have merge put FETCH_HEAD data in commit message, Michael S. Tsirkin, (Wed Apr 4, 2:18 am)
speck-geostationary