Re: [question] how can i verify whether a local branch is tracking a remote branch?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 6, 2009, 05:28 UTC
- Message-ID
- <7vy6uecpwd.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20090406043426.GC12341@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I don't think it would be unreasonable to expose this functionality via > "for-each-ref". Something like this (which would need cleanup, > documentation, and perhaps a :short variant):
I think that is a sane approach, but isn't "tracking" a misnomer? I think what you are describing is what is called "the upstream branch" by the description of Documentation/config.txt::branch.<name>.merge, and not what people call "tracking branch" (see Documentation/glossary-content.txt).
In a repository with a handcrafted fetch refspec, being able to show "tracking" information would also be interesting (e.g. a clone of git.git made with pre-1.5.0 git would say "origin's master" for refs/heads/origin and "origin's next" for refs/heads/next), but the separate-remote layout is the default these days, so it wouldn't be so interesting anymore. In other words, I am not suggesting you to add "tracking" information.
I also wonder if you want to say "this remote" and "that branch" separately. As far as I can tell you are not giving the former but only the latter information?