Skip to content

Commit 39149df

Browse files
committed
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
2 parents 221b755 + 5a07c6c commit 39149df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ static int set_head(int argc, const char **argv)
13561356
result |= error(_("Not a valid ref: %s"), buf2.buf);
13571357
else if (create_symref(buf.buf, buf2.buf, "remote set-head"))
13581358
result |= error(_("Could not setup %s"), buf.buf);
1359-
if (opt_a)
1359+
else if (opt_a)
13601360
printf("%s/HEAD set to %s\n", argv[0], head_name);
13611361
free(head_name);
13621362
}

0 commit comments

Comments
 (0)