summaryrefslogtreecommitdiff
path: root/builtin/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-22 19:36:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-22 19:36:32 (GMT)
commit39149df36426ee106367c701feb5a8c8662c9f74 (patch)
tree5d082de08a1c4a6a82712777c0ffac15bb970c08 /builtin/remote.c
parent221b755f3a99f600d08441fc5436d0f2ffe57065 (diff)
parent5a07c6c3c2723297f1fbf18e3abcf0cd26e02293 (diff)
downloadgit-39149df36426ee106367c701feb5a8c8662c9f74.zip
git-39149df36426ee106367c701feb5a8c8662c9f74.tar.gz
git-39149df36426ee106367c701feb5a8c8662c9f74.tar.bz2
Merge branch 'cs/don-t-pretend-a-failed-remote-set-head-succeeded'
"git remote set-head" that failed still said something that hints the operation went through, which was misleading. * cs/don-t-pretend-a-failed-remote-set-head-succeeded: remote: don't show success message when set-head fails
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 542f56e..64b4b55 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1356,7 +1356,7 @@ static int set_head(int argc, const char **argv)
result |= error(_("Not a valid ref: %s"), buf2.buf);
else if (create_symref(buf.buf, buf2.buf, "remote set-head"))
result |= error(_("Could not setup %s"), buf.buf);
- if (opt_a)
+ else if (opt_a)
printf("%s/HEAD set to %s\n", argv[0], head_name);
free(head_name);
}