Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Justo <rjusto@gmail.com>2022-10-26 01:57:18 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-26 20:52:37 +0300
commit8f241151656053e3ae130e9e0025b9cf71ccc3ce (patch)
tree87b8fd8798a6076d9a1c92cacace5a5074696a49 /builtin
parentdb29e6bbaed156ae9025ff0474fd788e58230367 (diff)
branch: error code with --edit-description
Since c2d17ba3db0d (branch --edit-description: protect against mistyped branch name, 2012-02-05) we return -1 on error editing the branch description. Let's change to 1, which follows the established convention and it is better for portability reasons. Signed-off-by: Rubén Justo <rjusto@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 407517ba68..4df001f579 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -816,7 +816,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
strbuf_addf(&branch_ref, "refs/heads/%s", branch_name);
if (!ref_exists(branch_ref.buf))
- ret = error((!argc || !strcmp(head, branch_name))
+ error((!argc || !strcmp(head, branch_name))
? _("No commit on branch '%s' yet.")
: _("No branch named '%s'."),
branch_name);