{"thread":{"id":"19832","subject":"git-branch: Actually using the current branch as default start-point","startedAt":"2009-06-16T19:13:09Z","lastAt":"2009-06-16T21:28:56Z","messageCount":2,"participants":["Martin Nordholts","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116437","messageId":"4A37EEC5.4020007@gmail.com","threadId":"19832","inReplyTo":null,"subject":"git-branch: Actually using the current branch as default start-point","fromName":"Martin Nordholts","fromEmail":"enselic@gmail.com","sentAt":"2009-06-16T19:13:09Z","receivedAt":"2009-06-16T19:13:09Z","isPatch":false,"sender":{"key":"enselic@gmail.com","avatar":"https://gravatar.com/avatar/74df556deac89f8da8c185cdbf811d51d7205eb48770305e84d7c1435755510e?d=mp&s=160"},"body":"Hi\n\nThe git-branch documentation states that the start-point defaults to\nthe current branch if omitted. I interpret that to mean that\n\n  git checkout origin/somebranch\n  git branch newbranch\n\nis equivalent to\n\n  git branch newbranch origin/somebranch\n\nbut that is currently not the case. If you checkout a remote branch\nthen you are not considered to _be_ on the remote branch, so the\nstart-point will behave as if an arbitrary commit was specified,\ni.e. tracking will not be setup correctly.\n\nThis is an easy patch and I have something working, I just need to \nfinalize it. Does this sound like a sane patch to you?\n\nBest regards,\nMartin Nordholts\n"},{"id":"116444","messageId":"alpine.DEB.1.00.0906162326210.26154@pacific.mpi-cbg.de","threadId":"19832","inReplyTo":"4A37EEC5.4020007@gmail.com","subject":"Re: git-branch: Actually using the current branch as default start-point","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-06-16T21:28:56Z","receivedAt":"2009-06-16T21:28:56Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 16 Jun 2009, Martin Nordholts wrote:\n\n> The git-branch documentation states that the start-point defaults to the \n> current branch if omitted. I interpret that to mean that\n> \n>  git checkout origin/somebranch\n\nThis detaches the HEAD.\n\n>  git branch newbranch\n\nThis gives the detached HEAD a name.\n\n> is equivalent to\n> \n>  git branch newbranch origin/somebranch\n\nIn this case, we know exactly from which remote branch the new branch was \ncreated.\n\nThe difference?\n\nIn the former case, origin can be long gone by the time the new branch is \ncreated.  And you have to make sure that once we switch away (by whatever \nmeans) from the detached HEAD, the tracking information is deleted.\n\nAll in all, your wish sounds rather fragile and thus not desirable to me.\n\nCiao,\nDscho\n\nP.S.: Disclaimer skipped as we talked on IRC about it, and I am actually \nsurprised you still think it would be a sensible idea.\n"}]}