path: root/send-pack.h
AgeCommit message (Collapse)Author
2010-10-18push: pass --progress down to git-pack-objectsJeff King
When pushing via builtin transports (like file://, git://), the underlying transport helper (in this case, git-pack-objects) did not get the --progress option, even if it was passed to git push. Fix this, and update the tests to reflect this. Note that according to the git-pack-objects documentation, we can safely apply the usual --progress semantics for the transport commands like clone and fetch (and for pushing over other smart transports). Reported-by: Chase Brammer <> Helped-by: Jonathan Nieder <> Signed-off-by: Jeff King <> Signed-off-by: Tay Ray Chuan <> Reviewed-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
2010-02-28git-push: make git push --porcelain print "Done"Larry D'Anna
The script calling git push --porcelain --dry-run can see clearly from the output if an update was rejected. However, it will probably need to distinguish this condition from the push failing for other reasons, such as the remote not being reachable. This patch modifies git push --porcelain to print "Done" after the rest of its output unless any errors have occurred. For the purpose of the "Done" line, knowing a ref will be rejected in a --dry-run does not count as an error. Actual rejections in non --dry-run pushes do count as errors. Signed-off-by: Larry D'Anna <> Acked-by: Tay Ray Chuan <> Signed-off-by: Junio C Hamano <>
2009-11-05Smart push over HTTP: client sideShawn O. Pearce
The git-remote-curl backend detects if the remote server supports the git-receive-pack service, and if so, runs git-send-pack in a pipe to dump the command and pack data as a single POST request. The advertisements from the server that were obtained during the discovery are passed into git-send-pack before the POST request starts. This permits git-send-pack to operate largely unmodified. For smaller packs (those under 1 MiB) a HTTP/1.0 POST with a Content-Length is used, permitting interaction with any server. The 1 MiB limit is arbitrary, but is sufficent to fit most deltas created by human authors against text sources with the occasional small binary file (e.g. few KiB icon image). The configuration option http.postBuffer can be used to increase (or shink) this buffer if the default is not sufficient. For larger packs which cannot be spooled entirely into the helper's memory space (due to http.postBuffer being too small), the POST request requires HTTP/1.1 and sets "Transfer-Encoding: chunked". This permits the client to upload an unknown amount of data in one HTTP transaction without needing to pregenerate the entire pack file locally. Signed-off-by: Shawn O. Pearce <> CC: Daniel Barkalow <> Signed-off-by: Junio C Hamano <>
2009-08-06transport: pass "quiet" flag to pack-objectsJeff King
When pushing over the git protocol, pack-objects gives progress reports about the pack being sent. If "push" is given the --quiet flag, it now passes "-q" to pack-objects, suppressing this output. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
2009-05-02allow OFS_DELTA objects during a pushNicolas Pitre
The fetching of OFS_DELTA objects has been negotiated between both peers since git version 1.4.4. However, this was missing from the push side where every OFS_DELTA objects were always converted to REF_DELTA objects causing an increase in transferred data. To fix this, both the client and the server processes have to be modified: the former to invoke pack-objects with --delta-base-offset when the server provides the ofs-delta capability, and the later to send that capability when OFS_DELTA objects are allowed as already indicated by the repack.usedeltabaseoffset config variable which is TRUE by default since git v1.6.0. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
2009-03-09Move push matching and reporting logic into transport.cDaniel Barkalow
For native-protocol pushes (and other protocols as they are converted to the new method), this moves the refspec match, tracking update, and report message out of send-pack() and into transport_push(), where it can be shared completely with other protocols. This also makes fetch and push more similar in terms of what code is in what file. Signed-off-by: Daniel Barkalow <> Signed-off-by: Junio C Hamano <>
2007-11-10Teach send-pack a mirror modeAndy Whitcroft
Existing "git push --all" is almost perfect for backing up to another repository, except that "--all" only means "all branches" in modern git, and it does not delete old branches and tags that exist at the back-up repository that you have removed from your local repository. This teaches "git-send-pack" a new "--mirror" option. The difference from the "--all" option are that (1) it sends all refs, not just branches, and (2) it deletes old refs you no longer have on the local side from the remote side. Original patch by Junio C Hamano. Signed-off-by: Andy Whitcroft <> Signed-off-by: Junio C Hamano <>
2007-11-03Build-in send-pack, with an API for other programs to call.Daniel Barkalow
Also marks some more things as const, as needed. Signed-off-by: Daniel Barkalow <> Signed-off-by: Junio C Hamano <>