Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>,
	"Michael S. Tsirkin" <mst@dev.mellanox.co.il>
Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message
Date: Thu, 22 Mar 2007 09:10:27 +0000	[thread overview]
Message-ID: <200703220910.29030.andyparkins@gmail.com> (raw)
In-Reply-To: <7v648u38ws.fsf@assigned-by-dhcp.cox.net>

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

> I often hear from people who seems to like "fetch & merge",
> instead of "pull & reset ORIG_HEAD", as a workflow to avoid
> undesirable merging.  This might largely be a matter of taste,
> but from philosophical point of view, fetch & merge is a sign of
> distrust (your default is not to merge, and you merge only when
> you choose to), and pull & reset is the opposite (your default
> is to merge, and after you inspect you may choose not to merge).
> Tool support to encourage the former feels somewhat wrong.

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

  parent reply	other threads:[~2007-03-22  9:10 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 12:06 [PATCH] have merge put FETCH_HEAD data in commit message Michael S. Tsirkin
2007-03-21 15:37 ` Junio C Hamano
2007-03-22  5:02   ` Michael S. Tsirkin
2007-03-22  5:09     ` Junio C Hamano
2007-03-22  6:28       ` Michael S. Tsirkin
2007-03-22  7:15         ` Junio C Hamano
2007-03-22  7:41           ` Michael S. Tsirkin
2007-03-22  8:21             ` Junio C Hamano
2007-03-22  8:37               ` Michael S. Tsirkin
2007-03-22 10:31                 ` Junio C Hamano
2007-03-22 10:40                   ` Michael S. Tsirkin
2007-03-24 10:21                     ` Junio C Hamano
2007-04-04  6:02                       ` Michael S. Tsirkin
2007-04-04  6:09                         ` Junio C Hamano
2007-04-04  6:18                           ` Michael S. Tsirkin
2007-04-04  6:19                           ` Shawn O. Pearce
2007-04-04  6:25                             ` Junio C Hamano
2007-04-04  6:35                               ` Shawn O. Pearce
2007-04-04  6:24                         ` Junio C Hamano
2007-04-04  7:01                           ` [PATCH] display shortlog after git-commit Michael S. Tsirkin
2007-04-04  7:22                             ` Junio C Hamano
2007-04-15 22:39                               ` Michael S. Tsirkin
2007-04-15 23:08                                 ` Junio C Hamano
2007-04-16  3:53                                   ` [PATCH] display the subject of the commit just made Michael S. Tsirkin
2007-04-16  5:16                                     ` Junio C Hamano
2007-04-16  5:40                                       ` Michael S. Tsirkin
2007-04-16  6:17                                         ` Junio C Hamano
2007-04-16  5:51                                       ` Michael S. Tsirkin
2007-04-16  6:01                                         ` Junio C Hamano
2007-04-16  6:18                                           ` Michael S. Tsirkin
2007-04-16  6:51                                             ` Michael S. Tsirkin
2007-04-16  7:00                                               ` Junio C Hamano
2007-04-16  7:11                                                 ` Shawn O. Pearce
2007-04-16  7:59                                                   ` Michael S. Tsirkin
2007-04-16 12:56                                                   ` Alex Riesen
2007-04-16 17:46                                                     ` Junio C Hamano
2007-04-16  5:34                                   ` [PATCH] display shortlog after git-commit Michael S. Tsirkin
2007-04-16  6:04                                     ` Junio C Hamano
2007-04-16  6:26                                       ` Michael S. Tsirkin
2007-04-16 14:40                                       ` [PATCH] remove shortlog from git-commit output Michael S. Tsirkin
2007-04-16 15:02                                         ` Julian Phillips
2007-04-16 18:23                                           ` Michael S. Tsirkin
2007-04-16 20:21                                             ` Julian Phillips
2007-04-17  6:02                                               ` Michael S. Tsirkin
2007-04-17  7:27                                                 ` Julian Phillips
2007-04-04  8:15                             ` [PATCH] display shortlog after git-commit Junio C Hamano
2007-04-15 10:33                               ` Michael S. Tsirkin
2007-04-15 19:57                                 ` Junio C Hamano
2007-04-15 20:09                                   ` Michael S. Tsirkin
2007-04-15 20:26                                     ` Andy Parkins
2007-04-15 20:34                                       ` Michael S. Tsirkin
2007-04-04  6:24                         ` [PATCH] wt-status: show author info if status.showauthor is set Jeff King
2007-04-04  6:32                           ` Junio C Hamano
2007-04-04  6:49                           ` Michael S. Tsirkin
2007-04-04  6:52                             ` Junio C Hamano
2007-04-04  6:55                             ` Shawn O. Pearce
2007-04-04 13:28                           ` Jakub Narebski
2007-03-23 13:57                   ` [PATCH] have merge put FETCH_HEAD data in commit message Jakub Narebski
2007-03-23 13:59                     ` J. Bruce Fields
2007-03-23 14:23                       ` Jakub Narebski
2007-03-23 15:33                         ` J. Bruce Fields
2007-03-24  0:03                           ` Jakub Narebski
2007-03-22  9:07               ` [PATCH] Put FETCH_HEAD data in merge " Michael S. Tsirkin
2007-03-22 10:01                 ` Junio C Hamano
2007-03-22  8:33   ` [PATCH] have merge put FETCH_HEAD data in " Jeff King
2007-03-22  8:51     ` Junio C Hamano
2007-03-22  9:09       ` Jeff King
2007-03-22  9:10   ` Andy Parkins [this message]
2007-03-21 17:29 ` [PATCHv2] put FETCH_HEAD data in merge " Michael S. Tsirkin
2007-03-21 18:09   ` Junio C Hamano

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=200703220910.29030.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=mst@dev.mellanox.co.il \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).