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

Re: [PATCH] builtin/fetch: print hash of deleted tag when updating

From
Knittl <knittl89@googlemail.com>
Date
Sep 27, 2010, 07:09 UTC
Message-ID
<AANLkTinrx-S-6FpLAOnAVWk4gRH8sHStqDf973TZkseG@mail.gmail.com>
In-Reply-To
<7vsk0wmbcd.fsf@alter.siamese.dyndns.org>
On Sun, Sep 26, 2010 at 11:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Knittl <knittl89@googlemail.com> writes:
>
>> From b1c2b07aa1f5db25ebdf190aa12ccb66a17f131a Mon Sep 17 00:00:00 2001
>> From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
>> Date: Sun, 26 Sep 2010 11:29:16 +0200
>> Subject: [PATCH] builtin/fetch: print hash of deleted tag when updating
>>
>> `git fetch --tags` will unconditionally update (and thus overwrite)
>> existing tags, which is especially annoying for annotated and signed
>> tags.
>
> The first question is why s/he is running fetch with --tags if overwriting
> is unwelcome/annoying.  "--tags" is meant to be used when the auto-follow
> behaviour of normal fetch is not sufficient and the user actively wants to
> get the latest (potentially updated) ones; would it be possible that you
> are solving a wrong problem?

yes, i know that tags are only overwritten with `git fetch --tags` and not during normal fetch operations. nevertheless, manually looking at tags and find the ones which would be overwritten is cumbersome and errorprone.

imho this patch doesn't hurt, only adding "(was $HASH)" -- and in case a user decides, that he suddenly wants to keep one of his (updated) tags, he can recover them quickly by echoing the hash into .git/refs/tags/new-name-for-my-tag. otherwise the use would have to run git fsck and find dangling hashes.

again, i'm not changing behavior of `git fetch --tags`, i'm simply providing additional output to help you recover your own tags. case: possibly conflicting tags and you want to 'merge' your tags with upstream tags.

if you deem it unnecessary, ok, nothing i can do about that ;)
-- 
typed with http://neo-layout.org
myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!
Previous: Junio C HamanoNext: Peter Kjellerstedt
Message 3 of 6 in “builtin/fetch: print hash of deleted tag when updating”
  1. builtin/fetch: print hash of deleted tag when updatingKnittl, Sep 26, 2010
  2. Junio C HamanoSep 26, 2010
  3. KnittlSep 27, 2010
  4. Peter KjellerstedtSep 27, 2010
  5. Junio C HamanoSep 27, 2010
  6. KnittlOct 10, 2010

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.