On Wed, Feb 20, 2008 at 03:05:23PM -0800, Junio C Hamano wrote:
Shouldn't this be branch_get(new->name)? branch_get calls read_config(),
which caches the "current branch" information, so it's possible to end
up with stale branch info. Try:
git clone git://git.kernel.org/pub/scm/git/git.git
git checkout -b next origin/next
I get:
Branch next set up to track remote branch refs/remotes/origin/next.
Switched to a new branch "next"
Your branch is ahead of the tracked remote branch 'origin/master' by 76
commits.
Switching to master and then back to the already-created "next" works
fine.
Even safer, I think, would be a way to invalidate the information cached
in read_config when we change branches; this would fix it for any other
callsites that look at the current branch from the same git invocation
that changes the current branch.
While not uncommon colloquially, "behind of" is not grammatically
correct. "behind" is a preposition, so the "of" is redundant (it is
necessary in the top string because "ahead" is an adverb).
-Peff
-
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