git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer
@ 2025-04-02 18:48 Martin von Zweigbergk
  2025-04-02 19:34 ` Remo Senekowitsch
                   ` (6 more replies)
  0 siblings, 7 replies; 118+ messages in thread
From: Martin von Zweigbergk @ 2025-04-02 18:48 UTC (permalink / raw)
  To: Git Mailing List
  Cc: Edwin Kempin, Scott Chacon, remo, philipmetzger@bluewin.ch

Hi,

The Gerrit, GitButler, and Jujutsu projects all have a concept of
a "change id", and it behaves in a similar way between the three
tools. The change id is conceptually associated with a commit.
It follows a commit as its rewritten (e.g. by amending and
rebasing). The three projects currently store and format the
change id differently. We would like to unify that so we can
interoperate better. We hope the Git project is also interested
in preserving and using this header.

There are many benefits to having a change id even if it's just
local. I mentioned some in my email to this mailing list in [1].
For example, it enables
`git rebase main <change ID>; git switch <change ID>` without
requiring the user to look up the hash of the rewritten commit.
If the change id also transferred between repos and preserved by
a forge (such as Gerrit), it enables the change id to be used to
identify a code review.

Here's how the change ids are currently stored and formatted:

 * Gerrit currently stores change ids in a commit trailer called
   `Change-Id`. It always starts with the letter 'I' and is
   followed by 40 hex digits. For example:
   `Change-Id: Ib563e78c3fedcff262255fa025441daa3202311b`.

 * GitButler currently stores change ids in a commit footer
   called `gitbutler-change-id` (older versions used
   `change-id`). It's written as 32 hex digits separated by
   dashes as in the UUID  format. For example:
   `gitbutler-change-id  7d0fbc63-032d-413c-8ae8-610fbeb713c0`.

 * Jujutsu currently stores change ids in a local storage outside
   of the Git repo and is therefore not part of the Git commit
   id. It is stored as 16 bytes. It is rendered to the user as
  "reverse hex" using 'z' through 'k' as hex digits ('z' = 0,
  'k' = 15). This allows even short prefixes to be distinguished
   from commit  ids, which is a very useful property when used in
   the CLI.

As mentioned, the three projects would like to use the same
storage and format. I think we have a consensus to store it in a
Git commit header called `change-id` as a 32 reverse-hex digis.
For example: `change-id ywlktllmukprnxnmzzprukpuwyztylwt`.

There is a design doc [2] about the impact on Gerrit and how to
handle various cases where the client doesn't understand the
`change-id` header. That also includes some discussion about
whether cherry-picking should preserve the change id or create a
new one. I think there is a lot of value in having a
standardized header regardless of what we decide about
cherry-picks.

So, to be clear, this is mostly a heads up at this point; we don't
depend on any immediate changes from the Git project.

Thanks,
Martin


[1] https://lore.kernel.org/git/CANiSa6gwup5vXU235mG+Ybbc+P=SbwoNFEmuhg=iYu0yGvSXVA@mail.gmail.com/
[2] https://gerrit-review.googlesource.com/c/homepage/+/464287

^ permalink raw reply	[flat|nested] 118+ messages in thread

end of thread, other threads:[~2025-08-19 16:45 UTC | newest]

Thread overview: 118+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 18:48 Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer Martin von Zweigbergk
2025-04-02 19:34 ` Remo Senekowitsch
2025-04-02 19:49   ` Konstantin Ryabitsev
2025-04-02 19:45 ` Konstantin Ryabitsev
2025-04-02 19:52 ` Martin von Zweigbergk
2025-04-03  9:09 ` Patrick Steinhardt
2025-04-03 10:38   ` Remo Senekowitsch
2025-04-03 11:06     ` Patrick Steinhardt
2025-04-03 15:56   ` Elijah Newren
2025-04-03 16:25     ` Remo Senekowitsch
2025-04-03 16:38       ` Elijah Newren
2025-04-03 21:46         ` Martin von Zweigbergk
2025-04-04  9:41     ` Patrick Steinhardt
2025-04-03 15:39 ` Elijah Newren
2025-04-03 16:40   ` Remo Senekowitsch
2025-04-03 22:11     ` Kane York
2025-04-04  2:28     ` Elijah Newren
2025-04-04  2:40       ` Elijah Newren
2025-04-04  3:47         ` Martin von Zweigbergk
2025-04-04  4:03           ` Nico Williams
2025-04-04  4:59           ` Elijah Newren
2025-04-04  5:21             ` Martin von Zweigbergk
2025-04-04  9:29               ` Patrick Steinhardt
2025-04-03 17:48   ` Theodore Ts'o
2025-04-03 20:31     ` Remo Senekowitsch
2025-04-05  2:09       ` Theodore Ts'o
2025-04-03 18:10   ` Nico Williams
2025-04-03 21:45     ` Remo Senekowitsch
     [not found]       ` <Z+8GoNrdaJlmNpGm@ubby>
2025-04-04  0:05         ` Remo Senekowitsch
2025-04-04  3:52           ` Nico Williams
2025-04-04  7:41             ` Remo Senekowitsch
2025-04-04 16:08               ` Nico Williams
2025-04-03 22:05     ` Martin von Zweigbergk
2025-04-03 22:13       ` Nico Williams
2025-04-03 22:47         ` Martin von Zweigbergk
2025-04-04  2:06           ` Elijah Newren
2025-04-04  3:11           ` Nico Williams
2025-04-04  4:08             ` Martin von Zweigbergk
2025-04-04  4:23               ` Nico Williams
2025-04-04  9:34                 ` Patrick Steinhardt
2025-04-04 16:04                   ` Nico Williams
2025-04-07  8:00                     ` Patrick Steinhardt
2025-04-07 20:59 ` Junio C Hamano
2025-04-07 21:36   ` Nico Williams
2025-04-08 12:55     ` Theodore Ts'o
2025-04-08 15:53       ` Nico Williams
2025-04-09 12:19         ` Theodore Ts'o
2025-04-09 12:56           ` Junio C Hamano
2025-04-09 19:13             ` Nico Williams
2025-04-10  8:29               ` Junio C Hamano
2025-04-10 21:40                 ` Martin von Zweigbergk
2025-04-09 16:54           ` Semantics of change IDs (Re: Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer) Nico Williams
2025-04-09 18:02             ` Junio C Hamano
2025-04-09 18:35               ` Nico Williams
2025-04-09 19:14                 ` Eric Sunshine
2025-04-09 19:31                   ` Nico Williams
2025-04-10 13:44                 ` Theodore Ts'o
2025-04-10 16:18                   ` Junio C Hamano
2025-04-11 15:48                     ` Theodore Ts'o
2025-04-11 16:38                       ` Konstantin Ryabitsev
2025-04-11 17:44                       ` Junio C Hamano
2025-04-12 23:13                         ` Theodore Ts'o
2025-04-14 15:13                           ` Junio C Hamano
2025-04-15 22:30                             ` Remo Senekowitsch
2025-04-16  0:09                               ` Junio C Hamano
2025-04-16  0:21                               ` Jacob Keller
2025-04-15 21:38                           ` Jacob Keller
2025-04-14 19:54             ` D. Ben Knoble
2025-04-14 21:34               ` Nico Williams
2025-04-15 21:44               ` Jacob Keller
2025-04-16 11:36               ` Remo Senekowitsch
2025-04-22 20:17                 ` D. Ben Knoble
2025-04-22 22:24                   ` Remo Senekowitsch
2025-04-22 22:42                     ` Junio C Hamano
2025-04-22 22:51                       ` Nico Williams
2025-04-22 23:47                         ` Remo Senekowitsch
2025-04-23  0:32                           ` Nico Williams
2025-04-23  1:15                             ` Remo Senekowitsch
2025-04-23  4:45                               ` Nico Williams
2025-04-22 23:49                         ` Junio C Hamano
2025-04-23  1:02                           ` Nico Williams
2025-04-23  4:47                             ` Nico Williams
2025-04-22 23:21                       ` Remo Senekowitsch
2025-04-23  5:07                       ` Martin von Zweigbergk
2025-04-23 15:51                         ` Junio C Hamano
2025-04-23 16:19                           ` Martin von Zweigbergk
2025-06-06 13:04                             ` Toon Claes
     [not found]                   ` <aAgWytQNqtLzg2TU@ubby>
2025-04-23  0:25                     ` Remo Senekowitsch
2025-04-23  0:45                       ` Nico Williams
2025-04-23 12:58                         ` How GitLab does/doesn't need change IDs (was Re: Semantics of change IDs) Toon Claes
2025-04-23 18:59                           ` Nico Williams
2025-05-10 19:32                     ` Semantics of change IDs (Re: Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer) D. Ben Knoble
2025-05-10 19:46                       ` D. Ben Knoble
2025-05-10 20:31                         ` Martin von Zweigbergk
2025-05-12 17:03                           ` Junio C Hamano
2025-05-12 17:19                             ` Martin von Zweigbergk
2025-05-14 14:38                               ` Junio C Hamano
2025-05-15 10:31                                 ` Oswald Buddenhagen
2025-05-15 16:32                                   ` Jacob Keller
2025-05-15 19:59                                     ` Junio C Hamano
2025-05-15 20:10                                       ` Nico Williams
     [not found]                           ` <aCJi+4q6DZhnfdy+@ubby>
2025-05-12 21:43                             ` Martin von Zweigbergk
2025-05-12 22:04                               ` brian m. carlson
2025-06-06 12:28                                 ` Toon Claes
2025-06-06 15:44                                   ` Junio C Hamano
2025-05-13 21:22                               ` D. Ben Knoble
2025-04-07 22:51   ` Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer Remo Senekowitsch
2025-04-08  0:10   ` Junio C Hamano
2025-04-08  5:35     ` Martin von Zweigbergk
2025-04-08 14:27       ` Junio C Hamano
2025-04-08 15:58         ` Phillip Wood
2025-04-08 16:27           ` Nico Williams
2025-04-12 21:32           ` Junio C Hamano
2025-04-16  0:24         ` Jacob Keller
2025-05-14 15:08         ` Kristoffer Haugsbakk
2025-04-08 14:27       ` Junio C Hamano
2025-08-19 14:04 ` Askar Safin
2025-08-19 16:44   ` Ben Knoble

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).