Git development
 help / color / mirror / Atom feed
From: Martin Nordholts <enselic@gmail.com>
To: git@vger.kernel.org
Subject: git-branch: Actually using the current branch as default start-point
Date: Tue, 16 Jun 2009 21:13:09 +0200	[thread overview]
Message-ID: <4A37EEC5.4020007@gmail.com> (raw)

Hi

The git-branch documentation states that the start-point defaults to
the current branch if omitted. I interpret that to mean that

  git checkout origin/somebranch
  git branch newbranch

is equivalent to

  git branch newbranch origin/somebranch

but that is currently not the case. If you checkout a remote branch
then you are not considered to _be_ on the remote branch, so the
start-point will behave as if an arbitrary commit was specified,
i.e. tracking will not be setup correctly.

This is an easy patch and I have something working, I just need to 
finalize it. Does this sound like a sane patch to you?

Best regards,
Martin Nordholts

             reply	other threads:[~2009-06-16 19:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 19:13 Martin Nordholts [this message]
2009-06-16 21:28 ` git-branch: Actually using the current branch as default start-point Johannes Schindelin

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=4A37EEC5.4020007@gmail.com \
    --to=enselic@gmail.com \
    --cc=git@vger.kernel.org \
    /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