You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This WIP patch is mostly stealing code from builtin/update-ref.c and
implementing the same sort of prefixed command-mode that it
supports. I.e. in addition to --batch now supporting:
<object> LF
It'll support with --stdin-cmd, with and without -z, respectively:
object <object> NL
object <object> NUL
The plus being that we can now implement additional commands. Let's
start that by scratching the itch John Cai wanted to address in [1]
and implement a (with and without -z):
fflush NL
fflush NUL
That command simply calls fflush(stdout), which could be done as an
emergent effect before by feeding the input a "NL".
I think this will be useful for other things, e.g. I've observed in
the past that a not-trivial part of "cat-file --batch" time is spent
on parsing its <object> argument and seeing if it's a revision, ref
etc.
So we could e.g. add a command that only accepts a full-length 40
character SHA-1, or switch the --format output mid-request etc.
1. https://lore.kernel.org/git/pull.1124.git.git.1636149400.gitgitgadget@gmail.com/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
0 commit comments