summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-16 04:35:22 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-16 04:36:35 (GMT)
commitfe5d1d3eb42e6cf3dca93b2277be9464b026fcf2 (patch)
treeb5d134260150fc4e7fad0d47df4f7793aeee167b /transport.c
parentee020f3598f0dc86a939fb8597845594bf664898 (diff)
downloadgit-fe5d1d3eb42e6cf3dca93b2277be9464b026fcf2.zip
git-fe5d1d3eb42e6cf3dca93b2277be9464b026fcf2.tar.gz
git-fe5d1d3eb42e6cf3dca93b2277be9464b026fcf2.tar.bz2
Support 'push --dry-run' for http transport
If the end-user requested a dry-run push we need to pass that flag over to http-push and additionally make sure it does not actually upload any changes to the remote server. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index f34d197..400af71 100644
--- a/transport.c
+++ b/transport.c
@@ -392,6 +392,8 @@ static int curl_transport_push(struct transport *transport, int refspec_nr, cons
argv[argc++] = "--all";
if (flags & TRANSPORT_PUSH_FORCE)
argv[argc++] = "--force";
+ if (flags & TRANSPORT_PUSH_DRY_RUN)
+ argv[argc++] = "--dry-run";
argv[argc++] = transport->url;
while (refspec_nr--)
argv[argc++] = *refspec++;