X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=transport.c;h=ea9dcb6612d92c123c66c2eee03bc933ccb2b13a;hb=926b1ec63ee045503f609e88ca445b94c06bd5d7;hp=cac0c065ff9f82011b204f932932283b01a5d034;hpb=a67c23544888761e940452f7533953b3c368456f;p=git.git diff --git a/transport.c b/transport.c index cac0c065f..ea9dcb661 100644 --- a/transport.c +++ b/transport.c @@ -993,11 +993,15 @@ void transport_set_verbosity(struct transport *transport, int verbosity, * Rules used to determine whether to report progress (processing aborts * when a rule is satisfied): * - * 1. Report progress, if force_progress is 1 (ie. --progress). - * 2. Don't report progress, if verbosity < 0 (ie. -q/--quiet ). - * 3. Report progress if isatty(2) is 1. + * . Report progress, if force_progress is 1 (ie. --progress). + * . Don't report progress, if force_progress is 0 (ie. --no-progress). + * . Don't report progress, if verbosity < 0 (ie. -q/--quiet ). + * . Report progress if isatty(2) is 1. **/ - transport->progress = force_progress || (verbosity >= 0 && isatty(2)); + if (force_progress >= 0) + transport->progress = !!force_progress; + else + transport->progress = verbosity >= 0 && isatty(2); } int transport_push(struct transport *transport, @@ -1028,6 +1032,8 @@ int transport_push(struct transport *transport, match_flags |= MATCH_REFS_ALL; if (flags & TRANSPORT_PUSH_MIRROR) match_flags |= MATCH_REFS_MIRROR; + if (flags & TRANSPORT_PUSH_PRUNE) + match_flags |= MATCH_REFS_PRUNE; if (match_push_refs(local_refs, &remote_refs, refspec_nr, refspec, match_flags)) { @@ -1148,7 +1154,7 @@ int transport_disconnect(struct transport *transport) } /* - * Strip username (and password) from an url and return + * Strip username (and password) from a URL and return * it in a newly allocated string. */ char *transport_anonymize_url(const char *url)