summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 84f8851)
raw | patch | inline | side by side (parent: 84f8851)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Wed, 24 Feb 2010 12:50:23 +0000 (20:50 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Feb 2010 16:35:44 +0000 (08:35 -0800) |
transport_set_verbosity() is now provided to transport users.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch.c | patch | blob | history | |
transport.c | patch | blob | history | |
transport.h | patch | blob | history |
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 8654fa7a2dbe2c1ca76a493a4322447de5219b99..d23ea2a53e89b03418067d553a7c9e98ea2ed050 100644 (file)
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
die("Where do you want to fetch from today?");
transport = transport_get(remote, NULL);
- if (verbosity >= 2)
- transport->verbose = verbosity <= 3 ? verbosity : 3;
- if (verbosity < 0)
- transport->verbose = -1;
+ transport_set_verbosity(transport, verbosity);
if (upload_pack)
set_option(TRANS_OPT_UPLOADPACK, upload_pack);
if (keep)
diff --git a/transport.c b/transport.c
index 3846aacb476b552cefddd8774b9a055e353b6ebc..1632c4d0aab3195ee79a60b5dc44ab7c29cc10a4 100644 (file)
--- a/transport.c
+++ b/transport.c
return 1;
}
+void transport_set_verbosity(struct transport *transport, int verbosity)
+{
+ if (verbosity >= 2)
+ transport->verbose = verbosity <= 3 ? verbosity : 3;
+ if (verbosity < 0)
+ transport->verbose = -1;
+}
+
int transport_push(struct transport *transport,
int refspec_nr, const char **refspec, int flags,
int *nonfastforward)
diff --git a/transport.h b/transport.h
index 7cea5cc7234185b1c37ada818dfa1a9114621ad2..7d1a0b6b36dcf5cf4f7199fdb9e588441b849228 100644 (file)
--- a/transport.h
+++ b/transport.h
**/
int transport_set_option(struct transport *transport, const char *name,
const char *value);
+void transport_set_verbosity(struct transport *transport, int verbosity);
int transport_push(struct transport *connection,
int refspec_nr, const char **refspec, int flags,