# [RFC] Support for arbitrary tags in commits

4 messages from 2011-01-11 to 2011-01-11. Participants: Philipp Marek, Thomas Rast.
Thread: https://gitlist.dev/t/26259

## Philipp Marek, 2011-01-11 12:23

Subject: [RFC] Support for arbitrary tags in commits
Message-ID: <74b0628dffbd2bc0adabe5e8b0a10960.squirrel@webmail.hitco.org>
URL: https://gitlist.dev/e/74b0628dffbd2bc0adabe5e8b0a10960.squirrel%40webmail.hitco.org

```
Hello everybody,

I'd like to attach some additional data to commits.

The best way I've found (so far) is to put an additional header line in the
commit header that references an additional blob.


Currently I've found "tree", "parent", "author", "committer", and so on; git
accepts additional lines before the "\n\n" separator (and the commit message),
so that's where I'd like to put the line.

"git fsck" allows that, too; only "rebase -i" and similar don't know about them
(yet), and discard them.


Now I want to ask:
 * Is this acceptable?
 * If yes, I'd try to provide a patch to make "amend" and similar keep the
   header-lines (by collecting them in order - obviously with editing commits
   a header could exist multiple times).
 * Perhaps there should be an option for "git-commit" that inserts arbitrary
   header lines?
 * Is there some documentation for the commit-file format so that this can be
   written down?
 * How should namespace-issues be handled?
   I can imagine that multiple people want to put data there, how should the
   tag be allocated?
   This could be solved by the previous point, ie. there's some page that
   header tags should be registered at to avoid collisions.


Thank you for all feedback.


Regards,

Phil


-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

```

## Thomas Rast, 2011-01-11 12:40

Subject: Re: [RFC] Support for arbitrary tags in commits
Message-ID: <201101111340.50508.trast@student.ethz.ch>
URL: https://gitlist.dev/e/201101111340.50508.trast%40student.ethz.ch
In-Reply-To: <74b0628dffbd2bc0adabe5e8b0a10960.squirrel@webmail.hitco.org>

```
Philipp Marek wrote:
> 
> The best way I've found (so far) is to put an additional header line in the
> commit header that references an additional blob.

This comes up every few months.  The last large discussion about this
that we had IIRC was

  http://thread.gmane.org/gmane.comp.version-control.git/138848

Can you please look through that thread and state in what way your
use-case invalidates the previous reasoning?

In particular, in what way do notes (as in git-notes(1)) fail to solve
your problem?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## Philipp Marek, 2011-01-11 13:48

Subject: Re: [RFC] Support for arbitrary tags in commits
Message-ID: <edec2e42a531b00ffd6a2689095460d5.squirrel@webmail.hitco.org>
URL: https://gitlist.dev/e/edec2e42a531b00ffd6a2689095460d5.squirrel%40webmail.hitco.org
In-Reply-To: <201101111340.50508.trast@student.ethz.ch>

```
Hello Thomas,

thank you very much for the quick answer.

>> The best way I've found (so far) is to put an additional header line in the
>> commit header that references an additional blob.
>
> This comes up every few months.  The last large discussion about this
> that we had IIRC was
>
>   http://thread.gmane.org/gmane.comp.version-control.git/138848
>
> Can you please look through that thread and state in what way your
> use-case invalidates the previous reasoning?
Thank you, just reading it.

> In particular, in what way do notes (as in git-notes(1)) fail to solve
> your problem?
Well, my biggest concerns are that users might trash them, and that they are
voided by amend, rebase etc. (which I tried to address by collecting header
lines).


Well, from this thread I suppose the "best" (or at least easiest) way forward
is to use notes, if necessary.


Thank you!


Regards,

Phil


-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

```

## Thomas Rast, 2011-01-11 13:53

Subject: Re: [RFC] Support for arbitrary tags in commits
Message-ID: <201101111453.08178.trast@student.ethz.ch>
URL: https://gitlist.dev/e/201101111453.08178.trast%40student.ethz.ch
In-Reply-To: <edec2e42a531b00ffd6a2689095460d5.squirrel@webmail.hitco.org>

```
Philipp Marek wrote:
> > In particular, in what way do notes (as in git-notes(1)) fail to solve
> > your problem?
> Well, my biggest concerns are that users might trash them, and that they are
> voided by amend, rebase etc. (which I tried to address by collecting header
> lines).

They aren't lost any more (since 1.7.1) if you properly configure
notes.rewriteRef.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```
