git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why doesn't merge fail if message has only sign-off?
@ 2017-07-02 12:03 Kaartic Sivaraam
  2017-07-03 17:21 ` Junio C Hamano
  0 siblings, 1 reply; 32+ messages in thread
From: Kaartic Sivaraam @ 2017-07-02 12:03 UTC (permalink / raw)
  To: git

While trying to merge a branch using "git merge" if a merge
message consists only of a "Sign-off" line it doesn't fail.
To be consistent with the behaviour of "git commit" shouldn't the merge
fail?

-- 
Kaartic

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH] branch: change the error messages to be more meaningful
@ 2017-07-30 11:59 Kaartic Sivaraam
  2017-08-21 13:36 ` [PATCH v2] " Kaartic Sivaraam
  0 siblings, 1 reply; 32+ messages in thread
From: Kaartic Sivaraam @ 2017-07-30 11:59 UTC (permalink / raw)
  To: gitster; +Cc: git

The error messages shown when the branch command is misused
by supplying it wrong number of parameters wasn't meaningful.
That's because it used the the phrase "too many branches"
assuming all parameters to be "valid" branch names. It's not
always the case as exemplified below,

        $ git branch
          foo
        * master

        $ git branch -m foo foo old
        fatal: too many branches for a rename operation

Change the messages to be more general thus making no assumptions
about the "parameters".

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
---
 Sending this patch to the correct thread. I apologise if this
 seems reduntant. I'm having hard time keeping up with the patch-flow
 without 'send-email'!

 builtin/branch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index a3bd2262b..59fedf085 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -707,12 +707,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 		else if (argc == 2)
 			rename_branch(argv[0], argv[1], rename > 1);
 		else
-			die(_("too many branches for a rename operation"));
+			die(_("too many parameters for a rename operation"));
 	} else if (new_upstream) {
 		struct branch *branch = branch_get(argv[0]);
 
 		if (argc > 1)
-			die(_("too many branches to set new upstream"));
+			die(_("too many parameters to set new upstream"));
 
 		if (!branch) {
 			if (!argc || !strcmp(argv[0], "HEAD"))
@@ -735,7 +735,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 		struct strbuf buf = STRBUF_INIT;
 
 		if (argc > 1)
-			die(_("too many branches to unset upstream"));
+			die(_("too many parameters to unset upstream"));
 
 		if (!branch) {
 			if (!argc || !strcmp(argv[0], "HEAD"))
-- 
2.14.0.rc1.434.g6eded367a


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-10-05 12:14 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-02 12:03 Why doesn't merge fail if message has only sign-off? Kaartic Sivaraam
2017-07-03 17:21 ` Junio C Hamano
2017-07-04 20:03   ` Kaartic Sivaraam
2017-07-06  3:31   ` [PATCH] merge-message: change meaning of "empty merge message" Kaartic Sivaraam
2017-07-06  4:46     ` Kevin Daudt
2017-07-06 12:20       ` Kaartic Sivaraam
2017-07-11 14:12       ` [PATCH] commit & merge: modularize the empty message validator Kaartic Sivaraam
2017-07-11 14:41         ` [PATCH/RFC] " Kaartic Sivaraam
2017-07-11 20:22         ` [PATCH] " Junio C Hamano
2017-07-13 13:00           ` Kaartic Sivaraam
2017-07-13 17:58             ` Junio C Hamano
2017-07-14 13:31               ` Kaartic Sivaraam
2017-07-17  9:08               ` Christian Brabandt
2017-07-17 17:16                 ` Junio C Hamano
2017-07-13 18:15           ` Kaartic Sivaraam
2017-07-13 19:23             ` Junio C Hamano
2017-07-14 17:49               ` Kaartic Sivaraam
2017-07-15  8:33                 ` Kaartic Sivaraam
2017-08-21 13:34                   ` [PATCH v2] branch: change the error messages to be more meaningful Kaartic Sivaraam
2017-08-21 13:52                     ` Kaartic Sivaraam
2017-08-21 14:05                   ` [PATCH v2/RFC] commit: change the meaning of an empty commit message Kaartic Sivaraam
2017-08-24 20:19                     ` Junio C Hamano
2017-08-31 13:36                       ` Kaartic Sivaraam
2017-10-02 17:20                         ` Kaartic Sivaraam
  -- strict thread matches above, loose matches on Subject: below --
2017-07-30 11:59 [PATCH] branch: change the error messages to be more meaningful Kaartic Sivaraam
2017-08-21 13:36 ` [PATCH v2] " Kaartic Sivaraam
2017-10-02 17:19   ` Kaartic Sivaraam
2017-10-03  0:21     ` Junio C Hamano
2017-10-03 19:14       ` Kaartic Sivaraam
2017-10-04  4:11         ` Junio C Hamano
2017-10-04 12:46           ` Kaartic Sivaraam
2017-10-05  1:13             ` Junio C Hamano
2017-10-05 12:13               ` Kaartic Sivaraam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).