Re: [PATCH 2/2] add: add a newline at the end of pathless 'add [-u|-A]' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> I'm fine with either dropping my patch or applying it as-is (with
> s/newline/blank line/ in the commit message).

OK; let's insert it immediately after e24afab09137 (add: make
pathless 'add [-u|-A]' warning a file-global function, 2013-03-19),
like the attached.

I'd prefer to spell this

	die("...\n"
	    "");

over

	die("...\n");

as the latter _looks_ as if the author didn't know die() gives us
line termination.  The former hopefully is more explicit that we do
want an empty line at the end.

commit a8ed21a59219e8fe81b76ed0961641555f25cdad
Author: Matthieu Moy <Matthieu.Moy@xxxxxxx>
Date:   Mon Mar 11 09:01:33 2013 +0100

    add: add a blank line at the end of pathless 'add [-u|-A]' warning
    
    When the commands give an actual output (e.g. when ran with -v), the
    output is visually mixed with the warning.
    
    An additional blank line makes the actual output more visible.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx>
    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>

diff --git a/builtin/add.c b/builtin/add.c
index a4028ee..db02233 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -57,7 +57,9 @@ static void warn_pathless_add(void)
 		  "  git add %s .\n"
 		  "  (or git add %s .)\n"
 		  "\n"
-		  "With the current Git version, the command is restricted to the current directory."),
+		  "With the current Git version, the command is restricted to "
+		  "the current directory.\n",
+		  ""),
 		option_with_implicit_dot, short_option_with_implicit_dot,
 		option_with_implicit_dot, short_option_with_implicit_dot,
 		option_with_implicit_dot, short_option_with_implicit_dot);
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]