git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Allow tags as upstreams for --track

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 11, 2009, 14:42 UTC
Message-ID
<1242052974-28184-1-git-send-email-git@drmicha.warpmail.net>

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(-)
Next: Michael J Gruber
Message 1 of 4 in “Allow tags as upstreams for --track”
  1. 0/2 Allow tags as upstreams for --trackMichael J Gruber, May 11, 2009
  2. 1/2 Test tracking of non-commit upstreamsMichael J Gruber, May 11, 2009
  3. 2/2 Fix behavior with non-committish upstream referencesMichael J Gruber, May 11, 2009
  4. Michael J GruberMay 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.