Re: Running 'git pull' from an unnamed branch

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Reece Dunn <msclrhd@...>
Cc: Junio C Hamano <gitster@...>, Git List <git@...>
Date: Monday, April 6, 2009 - 6:03 am

On 2009.04.06 08:42:16 +0100, Reece Dunn wrote:

This should not say "may", either you are or you are not on a detached
HEAD, and git can tell that, so it should not let the user have to
guess.


Checking out a named branch won't solve the "problem" on its own.
Consider this:

git checkout origin/foo
   *do stuff*

git pull
   *Oh! I need a named branch*

git checkout -b foo
git pull
   *Still fails*

Maybe:
You asked me to pull without telling me which branch you want to merge
with and as you have no branch checked out, I cannot look for any
defaults to use. Please name which branch you want to merge on the
command line and try again (e.g. 'git pull <repository> <refspec>'). See
git-pull(1) for details on the refspec.


That just adjusts the "you can set some defaults" part, replacing it
with a message telling that a detached HEAD cannot have any defaults.
Without implying anything about how the user might want to work, but
giving a hint that a branch can have defaults for "git pull".

Björn
--
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:
Running 'git pull' from an unnamed branch, Reece Dunn, (Sun Apr 5, 5:33 pm)
Re: Running 'git pull' from an unnamed branch, Junio C Hamano, (Sun Apr 5, 9:05 pm)
Re: Running 'git pull' from an unnamed branch, Reece Dunn, (Mon Apr 6, 3:42 am)
Re: Running 'git pull' from an unnamed branch, Björn, (Mon Apr 6, 6:03 am)
Re: Running 'git pull' from an unnamed branch, Markus Heidelberg, (Mon Apr 6, 5:05 pm)
Re: Running 'git pull' from an unnamed branch, Reece Dunn, (Mon Apr 6, 8:04 am)
Re: Running 'git pull' from an unnamed branch, Björn, (Sun Apr 5, 6:08 pm)
Re: Running 'git pull' from an unnamed branch, Reece Dunn, (Sun Apr 5, 6:29 pm)
Re: Running 'git pull' from an unnamed branch, Markus Heidelberg, (Sun Apr 5, 5:42 pm)
Re: Running 'git pull' from an unnamed branch, Reece Dunn, (Sun Apr 5, 6:15 pm)
Re: Running 'git pull' from an unnamed branch, Markus Heidelberg, (Sun Apr 5, 6:28 pm)
Re: Running 'git pull' from an unnamed branch, Sverre Rabbelier, (Sun Apr 5, 5:37 pm)