summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-21 15:28:07 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-21 15:28:07 -0700
commit11fd66de9bceac5ffb70ad3ad225203b95d19aa2 (patch)
treec63314bc1bd51798bddde160e4ce52f95d698092 /transport.h
parent901f3d403ef2416fb287399f8ed9c5dc5fb632f9 (diff)
downloadgit-11fd66de9bceac5ffb70ad3ad225203b95d19aa2.tar.gz
transport: allow summary-width to be computed dynamically
Now we have identified three callchains that have a set of refs that they want to show their <old, new> object names in an aligned output, we can replace their reference to the constant TRANSPORT_SUMMARY_WIDTH with a helper function call to transport_summary_width() that takes the set of ref as a parameter. This step does not yet iterate over the refs and compute, which is left as an exercise to the readers. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport.h b/transport.h
index e783377e40..706d99e818 100644
--- a/transport.h
+++ b/transport.h
@@ -142,7 +142,7 @@ struct transport {
#define TRANSPORT_PUSH_ATOMIC 8192
#define TRANSPORT_PUSH_OPTIONS 16384
-#define TRANSPORT_SUMMARY_WIDTH (2 * FALLBACK_DEFAULT_ABBREV + 3)
+extern int transport_summary_width(const struct ref *refs);
/* Returns a transport suitable for the url */
struct transport *transport_get(struct remote *, const char *);