git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Allow tags as upstreams for --track
@ 2009-05-11 14:42 Michael J Gruber
  2009-05-11 14:42 ` [PATCH 1/2] Test tracking of non-commit upstreams Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2009-05-11 14:42 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

I sent this patch during rc without a test and it received the
appropriate reaction ;)

Now, comes with test and all that...

This is about using tags as the upstream for --track (checkout,
branch). Currently, git allows to do that but all status generating
commands (status, checkout, branch -v) barf when the upstream is not a
commit, such as an annotated tag. So, either we should disallow this or
deal with it. The latter is actually easier, sometimes useful and does
not harm any living creatures.

The first patch exposes the issue by 2 tests: lightweight tags are OK,
annotated tags are not.

The second patch teaches stat_tracking_info() to resolve a reference to
a commit before using it.

Tags as upstreams can be useful because then branch -vv gives you concise
information about how much work you have done say on top of a released
version, in case where the "behind" information with respect to a branch
would be less informative (Where did I fork?) and confusing (Behind?
What do you mean behind for a branch on top of a released version?).

Michael J Gruber (2):
  Test tracking of non-commit upstreams
  Fix behavior with non-committish upstream references

 remote.c                 |    4 ++--
 t/t6040-tracking-info.sh |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-14  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-11 14:42 [PATCH 0/2] Allow tags as upstreams for --track Michael J Gruber
2009-05-11 14:42 ` [PATCH 1/2] Test tracking of non-commit upstreams Michael J Gruber
2009-05-11 14:42   ` [PATCH 2/2] Fix behavior with non-committish upstream references Michael J Gruber
2009-05-14  7:51     ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).