From: Junio C Hamano Date: Mon, 10 Mar 2025 21:08:40 GMT Subject: Re: [PATCH 0/4] rev-list: introduce NUL-delimited output mode Message-ID: In-Reply-To: Junio C Hamano writes: > As this topic is designing essentially a new and machine parseable > format, we could even unify all three formats into one. For example, > the format could be like this: > > NUL [= NUL]... > > where (0) "rev-list" that gives only a sequence of "" for commit-ish, as well as "rev-list --boundary", would fall out as a natural consequence. Bog-standard "list of commits" would see a sequence of " NUL", while a boundary object would see " NUL boundary=yes NUL". > (1) A record ends when a new record begins. > > (2) The beginning of a new record is signaled by that is all > hexadecimal and does not have any '=' in it. > > (3) The traditional "rev-list --objects" output that gives path in > addition to the object name uses "path" as the name, > i.e. such a record looks like " NUL path= NUL". > > (4) The traditional "rev-list --missing" output loses the leading > "?"; it is replaced by "missing" as the name, i.e. such > a record may look like " NUL missing=yes NUL..." together > with other "= NUL" pairs appended as needed at > the end.