From 11fd66de9bceac5ffb70ad3ad225203b95d19aa2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 21 Oct 2016 15:28:07 -0700 Subject: 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 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 --- transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transport.h') diff --git a/transport.h b/transport.h index e783377e4..706d99e81 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 *); -- cgit v1.2.1