Live data from Hacker News

Git Notes: Git's coolest, most unloved­ feature (2022)

tylercipriani.com

11–20 of 147 posts

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#11
Another little-known feature is git trailers:

https://alchemists.io/articles/git_trailers

These are key-value structures data that can be included on a commit when it is created. These are used by some systems for attaching metadata. For example, Gerrit uses this for attaching its Change-Id.

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#12

Another little-known feature is git trailers: https://alchemists.io/articles/git_trailers These are key-value structures data that can be included on a commit when it is created. These are used by some systems for attaching metadata. For example, Gerrit uses this for attaching its Change-Id.

One more similar feature from a different system: PostgreSQL COMMENT

https://www.postgresql.org/docs/17/sql-comment.html

This allows you to attach text to various database objects in PostgreSQL.

I wish PostgreSQL had a feature that was more like structured key-value database object metadata that could be edited.

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#13
post #6

I've been using git for probably 10 years and I didn't know git notes existed. Cool! > Here is a plea for all forges: make code review metadata available offline, inside git. I think this will fall on deaf ears as far as commercial forges like GitHub go, since as you yourself observe: > But much of the value of git repos ends up locked into forges, like GitHub. For-profit enterprises are not generally excited about c…

You have to start a new service that offers that feature as one of its differentiators, then the competitors might add it (back) to catch up.

any reason why Forgejo/Codeberg couldn't/wouldn't adopt this?

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#14
post #5

Git notes are only cool if you frequently add text to a commit after the commit has happened and visible to others. The Acked-By and mailing list discussion link examples don't seem to be good examples. Both of these are likely already known when the commit is made. And git commit message basically can have an unlimited length, so you could very well copy all the discussions about the commit that happened on a forge…

Discussion can keep happening after the commit is created.

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#16
post #13
post #6

Earlier quoted context omitted.

You have to start a new service that offers that feature as one of its differentiators, then the competitors might add it (back) to catch up.

any reason why Forgejo/Codeberg couldn't/wouldn't adopt this?

The only git-notes related issue I found is https://codeberg.org/forgejo/forgejo/issues/6385. So, probably because nobody has raised it.

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#17

I bet it already exists, but what about an issue tracker in plain text maintained by git itself?

> I bet it already exists, but what about an issue tracker in plain text maintained by git itself?

I have an issue tracker file that can be added to a project. While it's technically plain text, the interface for the file ensures that a format is used, and the format ensures that changes reflect only a single ticket.

Just as long as no one edits the file using a different program, it will work just fine.

Don't think anyone uses it, though.

https://github.com/lelanthran/rotsit

Re: Git Notes: Git's coolest, most unloved­ feature (2022)

#19

Another little-known feature is git trailers: https://alchemists.io/articles/git_trailers These are key-value structures data that can be included on a commit when it is created. These are used by some systems for attaching metadata. For example, Gerrit uses this for attaching its Change-Id.

Yeah I love trailers. I remember trying to use notes for certain things, and they were just kind of a pain (though I cannot remember exactly what roadblocks I hit). Trailers met my needs nicely.
Post reply on HN