GIT-FORMAT-REV(1) (NAME) git-format-rev - (SYNOPSIS) (EXPERIMENTAL!) git format-rev --stdin-mode= --format= [--[no-]notes=] [-z] [--[no-]null-output] [--[no-]null-input] (DESCRIPTION) (revisions) . . . (OPTIONS) --stdin-mode= : revs ( ) . ( gitrevisions(7)). (peel) ( gitglossary(7)). rev . text . () . ( ). --format= (pretty format). --notes=, --no-notes . %N . git- notes(1). -z, --null NUL (newline). . NUL . --stdin-mode=text git last-modified -z . --null-output, --no-null-output NUL . --no-null-output . %n ( ) . --null-input, --no-null-input NUL . --no-null-input . . (INPUT AND OUTPUT FORMAT) . NUL -z --null-output --null-input . --stdin-mode=revs . ( <<>> ). ( NUL) (terminator) (separator). . --stdin-mode=text %s . : Did we not fix this in ""? (flush) . (EXAMPLES) git-last-modified(1) . $ git last-modified -- README.md Makefile 7798034171030be0909c56377a4e0e10e6d2df93 Makefile c50fbb2dd225e7e82abba4380423ae105089f4d7 README.md (pipe) . $ git last-modified -- README.md Makefile | git format-rev --stdin-mode=text --format=%an Junio C Hamano Makefile Todd Zullinger README.md . : Fix off-by-one error Fix off-by-one error introduced in e83c5163316f89bfbde7d9ab23ca2e25604af290. We thought we fixed this in 5569bf9bbedd63a00780fc5c110e0cfab3aa97b9 but that only covered 1/3 of the faulty cases. par(1) commit-msg: $ git config set hook.reference-commits.event commit-msg $ git config set hook.reference-commits.command reference-commits $ cat $(which reference-commits) #/bin/sh msg="$1" rewritten=$(mktemp) git format-rev --stdin-mode=text --format=reference <"$msg" | par >"$rewritten" mv "$rewritten" "$msg" : Fix off-by-one error Fix off-by-one error introduced in e83c5163316 (Implement better memory allocator, 2005-04-07). We thought we fixed this in 5569bf9bbed (Fix memory allocator, 2005-06-22) but that only covered 1/3 of the faulty cases. (DISCUSSION) . git-last-modified(1) : 1. 2. git-log(1) git- show(1) . . o git-last-modified(1) . . o git show git log --no-walk -1 . . o . . ( --stdin ). . . o . . . . . (SEE ALSO) git-name-rev(1), git-log(1). (GIT) git(1) Git 2.55.0 2026-06-29 GIT-FORMAT-REV(1)