static int thin;
static int deleterefs;
static const char *receivepack;
+static int verbosity;
+static int progress;
static const char **refspec;
static int refspec_nr;
{
int err;
int nonfastforward;
+
+ transport_set_verbosity(transport, verbosity, progress);
+
if (receivepack)
transport_set_option(transport,
TRANS_OPT_RECEIVEPACK, receivepack);
if (thin)
transport_set_option(transport, TRANS_OPT_THIN, "yes");
- if (flags & TRANSPORT_PUSH_VERBOSE)
+ if (verbosity > 0)
fprintf(stderr, "Pushing to %s\n", transport->url);
err = transport_push(transport, refspec_nr, refspec, flags,
&nonfastforward);
int rc;
const char *repo = NULL; /* default repository */
struct option options[] = {
- OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
- OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
+ OPT__VERBOSITY(&verbosity),
OPT_STRING( 0 , "repo", &repo, "repository", "repository"),
OPT_BIT( 0 , "all", &flags, "push all refs", TRANSPORT_PUSH_ALL),
OPT_BIT( 0 , "mirror", &flags, "mirror all refs",
OPT_STRING( 0 , "exec", &receivepack, "receive-pack", "receive pack program"),
OPT_BIT('u', "set-upstream", &flags, "set upstream for git pull/status",
TRANSPORT_PUSH_SET_UPSTREAM),
+ OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
OPT_END()
};