summaryrefslogtreecommitdiff
path: root/Documentation/git-filter-branch.txt
diff options
context:
space:
mode:
authorLibravatar Patrick Steinhardt <ps@pks.im>2020-04-02 09:09:57 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-02 11:09:49 -0700
commit94fd491a54b955990146f63e7283e9813dc85fef (patch)
tree031acd3d064226897ed11ebeacf4615cdccdf10d /Documentation/git-filter-branch.txt
parentupdate-ref: move transaction handling into `update_refs_stdin()` (diff)
downloadtgif-94fd491a54b955990146f63e7283e9813dc85fef.tar.xz
update-ref: read commands in a line-wise fashion
The git-update-ref(1) supports a `--stdin` mode that allows it to read all reference updates from standard input. This is mainly used to allow for atomic reference updates that are all or nothing, so that either all references will get updated or none. Currently, git-update-ref(1) reads all commands as a single block of up to 1000 characters and only starts processing after stdin gets closed. This is less flexible than one might wish for, as it doesn't really allow for longer-lived transactions and doesn't allow any verification without committing everything. E.g. one may imagine the following exchange: > start < start: ok > update refs/heads/master $NEWOID1 $OLDOID1 > update refs/heads/branch $NEWOID2 $OLDOID2 > prepare < prepare: ok > commit < commit: ok When reading all input as a whole block, the above interactive protocol is obviously impossible to achieve. But by converting the command to read commands linewise, we can make it more interactive than before. Obviously, the linewise interface is only a first step in making git-update-ref(1) work in a more transaction-oriented way. Missing is most importantly support for transactional commands that manage the current transaction. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-filter-branch.txt')
0 files changed, 0 insertions, 0 deletions