Message ID | pull.848.git.git.1600356459092.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 39149df36426ee106367c701feb5a8c8662c9f74 |
Headers | show |
Series | remote: in case of error don't show success message. | expand |
"Christian Schlack via GitGitGadget" <gitgitgadget@gmail.com> writes: > diff --git a/builtin/remote.c b/builtin/remote.c > index 542f56e387..64b4b551eb 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); > } > Quite straight-forward and looks obviously good. Thanks, will queue.
diff --git a/builtin/remote.c b/builtin/remote.c index 542f56e387..64b4b551eb 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); }