git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Knittl <knittl89@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] builtin/fetch: print hash of deleted tag when updating
Date: Mon, 27 Sep 2010 09:09:19 +0200	[thread overview]
Message-ID: <AANLkTinrx-S-6FpLAOnAVWk4gRH8sHStqDf973TZkseG@mail.gmail.com> (raw)
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:
> 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!

  reply	other threads:[~2010-09-27  7:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 16:10 [PATCH] builtin/fetch: print hash of deleted tag when updating Knittl
2010-09-26 21:41 ` Junio C Hamano
2010-09-27  7:09   ` Knittl [this message]
2010-09-27 11:37   ` Peter Kjellerstedt
2010-09-27 16:38     ` Junio C Hamano
2010-10-10 13:17       ` Knittl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinrx-S-6FpLAOnAVWk4gRH8sHStqDf973TZkseG@mail.gmail.com \
    --to=knittl89@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).