Skip to content

git: Pass rev-list arguments via stdin in the ObjectsSize RPC

James Liu requested to merge jliu-rev-list-args-stdin into master

Issue: #5708 (closed)

Modifies the ObjectsSize RPC to pass arguments to the rev-list command via stdin instead of the command line. This is now possible after the upgrade to Git v2.42 as pseudo-options are now supported when the --stdin mode is used.

The RPC logic is restructured such that we create the command and wait for execution in separate steps so revisions can directly be written to stdin, without the use of an intermediary buffer.

Additionally, a test has been added to ensure that revisions containing newlines are rejected by existing logic, since we now rely on newlines to delimit successive revisions and options.

Edited by James Liu

Merge request reports

Loading