From ef31451f4b21c711715b81db6349387ac66425fb Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 16 Jan 2013 12:33:24 +0100 Subject: [PATCH] git-remote show: adjust indentation of URL section The URL section deviates quite a bit from rest. Make it use the same indentation style. --- builtin/remote.c | 7 ++++--- t/t5505-remote.sh | 15 +++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index ec07109ff8..fa5d1e1784 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -1116,7 +1116,8 @@ static int show(int argc, const char **argv) get_remote_ref_states(*argv, &states, query_flag); printf_ln(_("* remote %s"), *argv); - printf_ln(_(" Fetch URL: %s"), states.remote->url_nr > 0 ? + printf_ln(_(" URLs:")); + printf_ln(_(" Fetch: %s"), states.remote->url_nr > 0 ? states.remote->url[0] : _("(no URL)")); if (states.remote->pushurl_nr) { url = states.remote->pushurl; @@ -1126,9 +1127,9 @@ static int show(int argc, const char **argv) url_nr = states.remote->url_nr; } for (i = 0; i < url_nr; i++) - printf_ln(_(" Push URL: %s"), url[i]); + printf_ln(_(" Push: %s"), url[i]); if (!i) - printf_ln(_(" Push URL: %s"), "(no URL)"); + printf_ln(_(" Push: %s"), "(no URL)"); if (no_query) printf_ln(_(" HEAD branch: %s"), "(not queried)"); else if (!states.heads.nr) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 6579a86724..ba8cf74dbb 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -144,8 +144,9 @@ EOF cat > test/expect << EOF * remote origin - Fetch URL: $(pwd)/one - Push URL: $(pwd)/one + URLs: + Fetch: $(pwd)/one + Push: $(pwd)/one HEAD branch: master Remote branches: master new (next fetch will store in remotes/origin) @@ -161,8 +162,9 @@ cat > test/expect << EOF master pushes to master (local out of date) master pushes to upstream (create) * remote two - Fetch URL: ../two - Push URL: ../three + URLs: + Fetch: ../two + Push: ../three HEAD branch (remote HEAD is ambiguous, may be one of the following): another master @@ -203,8 +205,9 @@ test_expect_success 'show' ' cat > test/expect << EOF * remote origin - Fetch URL: $(pwd)/one - Push URL: $(pwd)/one + URLs: + Fetch: $(pwd)/one + Push: $(pwd)/one HEAD branch: (not queried) Remote branches: (status not queried) master -- 2.11.4.GIT