All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Tom Lambda <tom.lambda@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git pull merges current branch even when <dst> is specified
Date: Thu, 25 Jun 2009 10:52:24 +0200	[thread overview]
Message-ID: <4A433AC8.4040702@drmicha.warpmail.net> (raw)
In-Reply-To: <1245862052581-3149948.post@n2.nabble.com>

Tom Lambda venit, vidit, dixit 24.06.2009 18:47:
> 
> If I am in 'master' and 'bugfix' is a remote branch in 'repo' which I do not
> have locally yet, running:
> 
> git pull repo bugfix:bugfix
> 
> creates a new local branch 'bugfix' equals to 'repo/bugfix' as expected.
> However, it also merges 'bugfix' into 'master', that surprises me since I
> explicitly specify that <dst> is 'bugfix'.
> 
> I know that I can get what I want by running:
> 
> git fetch repo bugfix:bugfix
> 
> But the git-pull behavior looks odd to me. I thought that <dst> was the
> current branch by default and it could be overridden by specifying it in the
> command line.

Well, the first line of git-pull's man page says:

Runs git-fetch with the given parameters, and calls git-merge to merge
the retrieved head(s) into the current branch.

So I can't help but call your surprise somewhat unjustified ;)

Michael

  reply	other threads:[~2009-06-25  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 16:47 git pull merges current branch even when <dst> is specified Tom Lambda
2009-06-25  8:52 ` Michael J Gruber [this message]
2009-06-25  9:44   ` Johannes Schindelin
2009-06-25 13:28     ` Tom Lambda

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=4A433AC8.4040702@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=tom.lambda@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.