git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andreas Ericsson <ae@op5.se>
Cc: Bill Lear <rael@zopyra.com>, Junio C Hamano <gitster@pobox.com>,
	Aghiles <aghilesk@gmail.com>,
	git@vger.kernel.org
Subject: Re: git pull opinion
Date: Tue, 6 Nov 2007 12:05:39 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711061204160.4362@racer.site> (raw)
In-Reply-To: <47302D07.9030703@op5.se>

Hi,

On Tue, 6 Nov 2007, Andreas Ericsson wrote:

> Johannes Schindelin wrote:
> 
> > On Tue, 6 Nov 2007, Andreas Ericsson wrote:
> > 
> > > Bill Lear wrote:
> > > > On Monday, November 5, 2007 at 15:33:31 (-0800) Junio C Hamano writes:
> > > > > Aghiles <aghilesk@gmail.com> writes:
> > > > > 
> > > > > > Is there an "easier" way to pull into a dirty directory ? I am
> > > > > > asking this to make sure I understand the problem and not
> > > > > > because I find it annoying to type those 4 commands to perform
> > > > > > a pull (although some of my colleagues do find that annoying :).
> > > > > You need to switch your mindset from centralized SVN workflow.
> > > > > 
> > > > > The beauty of distributedness is that it redefines the meaning
> > > > > of "to commit".  In distributed systems, the act of committing
> > > > > is purely checkpointing and it is not associated with publishing
> > > > > the result to others as centralized systems force you to.
> > > > > 
> > > > > Stop thinking like "I need to integrate the changes from
> > > > > upstream into my WIP to keep up to date."  You first finish what
> > > > > you are currently doing, at least to the point that it is
> > > > > stable, make a commit to mark that state, and then start
> > > > > thinking about what other people did.  You may most likely do a
> > > > > "git fetch" followed by "git rebase" to update your WIP on top
> > > > > of the updated work by others.
> > > > > 
> > > > > Once you get used to that, you would not have "a dirty
> > > > > directory" problem.
> > > > I respectfully beg to differ.  I think it is entirely reasonable, and
> > > > not a sign of "centralized" mindset, to want to pull changes others
> > > > have made into your dirty repository with a single command.
> > > > 
> > > I find it much more convenient to just fetch them. I'd rather see
> > > git-pull being given a --rebase option (which would ultimately mean
> > > teaching git-merge about it) to rebase already committed changes on
> > > top of the newly fetched tracking branch. It's being worked on, but
> > > rather slowly.
> > 
> > git-pull learning about --rebase does not mean teaching git-merge about it.
> > See my patch, which you (and others) failed to enthusiastically embrace,
> > which is the sole reason it is stalled.
> > 
> 
> I must have missed it. Found the thread now though. Gonna try the patch in
> production for a while and see how it pans out.
> 
> I'm curious about this hunk though. It seems unaffiliated with the --rebase
> option as such, but was still in the patch. Would you care to clarify?
> 
> @@ -86,7 +95,6 @@ merge_head=$(sed -e '/	not-for-merge	/d' \
> 
> case "$merge_head" in
> '')
> -	curr_branch=$(git symbolic-ref -q HEAD)
> 	case $? in
> 	  0) ;;
> 	  1) echo >&2 "You are not currently on a branch; you must
> explicitly"
> 

No, it is not unaffiliated.  If you go back to the patch, you will find 
that this line was not deleted, but moved to the start of git-rebase.sh.  
We need to know the branch name to get the config settings, and might just 
as well reuse the branch name for the merge_head case.

Hth,
Dscho

  reply	other threads:[~2007-11-06 12:06 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-05 21:52 git pull opinion Aghiles
2007-11-05 22:28 ` Jakub Narebski
2007-11-06  0:08   ` Johannes Schindelin
2007-11-06  4:22     ` Aghiles
2007-11-06 12:02       ` Johannes Schindelin
2007-11-06 18:13         ` Junio C Hamano
2007-11-06 18:28           ` Johannes Schindelin
2007-11-05 22:49 ` Alex Riesen
2007-11-05 23:33 ` Junio C Hamano
2007-11-06  0:36   ` Bill Lear
2007-11-06  0:46     ` Pierre Habouzit
2007-11-06  7:38       ` Alex Riesen
2007-11-06  8:31         ` Pierre Habouzit
2007-11-06  0:54     ` Andreas Ericsson
2007-11-06  1:16       ` Johannes Schindelin
2007-11-06  8:59         ` Andreas Ericsson
2007-11-06 12:05           ` Johannes Schindelin [this message]
2007-11-06 12:08             ` Andreas Ericsson
2007-11-06  6:30     ` Aghiles
2007-11-06  7:40       ` Alex Riesen
2007-11-06 16:36       ` Linus Torvalds
2007-11-07 21:25         ` Aghiles
2007-11-08 15:27           ` Johannes Schindelin
2007-11-10  0:36           ` Linus Torvalds
2007-11-06  0:37   ` Steven Grimm
2007-11-06  4:04   ` Aghiles
2007-11-05 23:40 ` Miklos Vajna
2007-11-06  4:16   ` Aghiles
2007-11-06  5:29     ` Benoit Sigoure
2007-11-06  7:34       ` Ralf Wildenhues
2007-11-06 11:59         ` Johannes Schindelin
2007-11-06 20:22           ` Ralf Wildenhues
2007-11-06  7:45       ` Aghiles
2007-11-06  8:51       ` Pierre Habouzit
2007-11-07  0:26         ` [PATCH] Mark 'git stash [message...]' as deprecated Brian Downing
2007-11-07  0:26           ` [PATCH] Disable implicit 'save' argument for 'git stash' Brian Downing
2007-11-07  8:00           ` [PATCH] Mark 'git stash [message...]' as deprecated Johannes Sixt
2007-11-07  8:12             ` Wincent Colaiuta
2007-11-07  8:02           ` Junio C Hamano
2007-11-07  8:23           ` Pierre Habouzit
2007-11-06 18:07 ` git pull opinion Pascal Obry
2007-11-07  7:06   ` Uwe Kleine-König
2007-11-07  7:40     ` Pascal Obry

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=Pine.LNX.4.64.0711061204160.4362@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=ae@op5.se \
    --cc=aghilesk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rael@zopyra.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).