Browse Source
In a subsequent patch, in some cases, PackWriter#writePack will be responsible for both the "packfile-uris" and "packfile" sections, meaning that (in these cases) it must write the "packfile" section header itself. In preparation for that patch, move the writing of the "packfile" section header closer to the invocation of PackWriter#writePack when the entire fetch response is configured to use the sideband. This means that "packfile" is written *after* objects are counted (and progress messages sent to the client in sideband 2) when the "sideband-all" feature is used (whether "packfile-uris" is used or not), and written *before* objects are counted otherwise. Having code to write "packfile" in two places is unfortunate but necessary. When "sideband-all" is not used, object counting has to happen after "packfile" is written, because "packfile" activates the sideband that allows counting progress to be transmitted. When "packfile-uris" is used, object counting has to happen before "packfile" is written, because object counting determines whether to send "packfile-uris" or "packfile". When "sideband-all" is used but "packfile-uris" is not used, either way works; this commit uses "packfile-uris" behavior in this case. Also make the naming of the sideband-activating methods in PacketLineOut more consistent. Change-Id: Ifbfd26cc26af10c41b77758168833702d6983df1 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>stable-5.5
Jonathan Tan
6 years ago
3 changed files with 36 additions and 10 deletions
Loading…
Reference in new issue