From: anatoly techtonik <email@example.com>
To: "Ævar Arnfjörð Bjarmason" <firstname.lastname@example.org>
Cc: "Randall S. Becker" <email@example.com>,
Junio C Hamano <firstname.lastname@example.org>,
Git Mailing List <email@example.com>,
Igor Djordjevic <firstname.lastname@example.org>
Subject: Re: Re: Unify annotated and non-annotated tags
Date: Sun, 3 Dec 2017 00:26:59 +0300 [thread overview]
Message-ID: <CAPkN8xKDQrf+LMpj9GHw9n_crJ1UUwq7Zek+Z1dgQ0n2Jz5U6g@mail.gmail.com> (raw)
On Fri, Nov 24, 2017 at 1:24 PM, Ævar Arnfjörð Bjarmason
> On Fri, Nov 24, 2017 at 10:52 AM, anatoly techtonik <email@example.com> wrote:
>> On Thu, Nov 23, 2017 at 6:08 PM, Randall S. Becker
>> <firstname.lastname@example.org> wrote:
>>> On 2017-11-23 02:31 (GMT-05:00) anatoly techtonik wrote
>>>>Subject: Re: Unify annotated and non-annotated tags
>>>>On Sat, Nov 11, 2017 at 5:06 AM, Junio C Hamano <email@example.com> wrote:
>>>>> Igor Djordjevic <firstname.lastname@example.org> writes:
>>>>>> If you would like to mimic output of "git show-ref", repeating
>>>>>> commits for each tag pointing to it and showing full tag name as
>>>>>> well, you could do something like this, for example:
>>>>>> for tag in $(git for-each-ref --format="%(refname)" refs/tags)
>>>>>> printf '%s %s\n' "$(git rev-parse $tag^0)" "$tag"
>>>>>> Hope that helps a bit.
>>>>> If you use for-each-ref's --format option, you could do something
>>>>> like (pardon a long line):
>>>>> git for-each-ref --format='%(if)%(*objectname)%(then)%(*objectname)%(else)%(objectname)%(end) %(refname)' refs/tags
>>>>> without any loop, I would think.
>>>>Thanks. That helps.
>>>>So my proposal is to get rid of non-annotated tags, so to get all
>>>>tags with commits that they point to, one would use:
>>>>git for-each-ref --format='%(*objectname) %(refname)' refs/tags>
>>>>For so-called non-annotated tags just leave the message empty.
>>>>I don't see why anyone would need non-annotated tags though.
>>> I have seen non-annotated tags used in automations (not necessarily well written ones) that create tags as a record of automation activity. I am not sure we should be writing off the concept of unannotated tags entirely. This may cause breakage based on existing expectations of how tags work at present. My take is that tags should include whodunnit, even if it's just the version of the automation being used, but I don't always get to have my wishes fulfilled. In essence, whatever behaviour a non-annotated tag has now may need to be emulated in future even if reconciliation happens. An option to preserve empty tag compatibility with pre-2.16 behaviour, perhaps? Sadly, I cannot supply examples of this usage based on a human memory page-fault and NDAs.
>> Are there any windows for backward compatibility breaks, or git is
>> doomed to preserve it forever?
>> Automation without support won't survive for long, and people who rely
>> on that, like Chromium team, usually hard set the version used.
> Git is not doomed to preserve anything forever. We've gradually broken
> backwards compatibility for a few core things like these.
> However, just as a bystander reading this thread I haven't seen any
> compelling reason for why these should be removed. You initially had
> questions about how to extract info about them, which you got answers
> So what reasons remain for why they need to be removed?
To reduce complexity and prior knowledge when dealing with Git tags.
For example, http://readthedocs.io/ site contains a lot of broken
"Edit on GitHub" links, for example - http://git-memo.readthedocs.io/en/stable/
And it appeared that the reason for that is discrepancy between git
annotated and non-annotated tags. The pull request that fixes the issue
after it was researched and understood is simple
However, while looking through linked issues and PRs, one can try to
imagine how many days it took for people to come up with the solution,
which came from this thread.
next prev parent reply other threads:[~2017-12-02 21:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201711231458.vANEwUMK048049@elephants.elehost.com>
2017-11-23 15:08 ` Re: Unify annotated and non-annotated tags Randall S. Becker
2017-11-23 21:24 ` Thomas Braun
2017-11-24 9:52 ` anatoly techtonik
2017-11-24 10:24 ` Ævar Arnfjörð Bjarmason
2017-12-02 21:26 ` anatoly techtonik [this message]
2017-12-02 22:25 ` Philip Oakley
2017-12-23 13:41 ` anatoly techtonik
2017-12-24 12:31 ` Philip Oakley
2017-12-03 5:54 ` Junio C Hamano
2017-11-24 14:11 ` Randall S. Becker
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:
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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.
Code repositories for project(s) associated with this public inbox
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 read-only IMAP folder(s) and NNTP newsgroup(s).