]> git.ipfire.org Git - thirdparty/git.git/commit
name-rev: factor code for sharing with a new command
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Mon, 11 May 2026 15:45:47 +0000 (17:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 May 2026 00:09:50 +0000 (09:09 +0900)
commite2916329dbea62d033091a625340d3d79b686dc6
tree472c55b308704cac4c3882e9cbe86b91acc3fba3
parentb9c1be43eb30084570781569920a92799afdceaf
name-rev: factor code for sharing with a new command

We are about to introduce a new command git-format-rev(1) to this
file. Let’s factor some code so that we can share it with the new
command.

We want to be able to format commits found in freeform text, and
git-name-rev(1) already has a function for that but for symbolic
names. Let’s use a tagged union for the command-specific payload.

No functional changes.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/name-rev.c