Re: [PATCH 3/3] commit: give a hint when a commit message has been abandoned

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Mon, Jul 23, 2012 at 02:35:01PM -0700, Junio C Hamano wrote:
> ...
>> I also wondered if something like the following might be useful, but
>> it probably falls into the "water under the bridge" category.
>> 
>>  builtin/commit.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git a/builtin/commit.c b/builtin/commit.c
>> index 149e07d..83bcee4 100644
>> --- a/builtin/commit.c
>> +++ b/builtin/commit.c
>> @@ -768,6 +768,11 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
>>  				"with '#' will be kept; you may remove them"
>>  				" yourself if you want to.\n"
>>  				"An empty message aborts the commit.\n"));
>> +		status_printf(s, GIT_COLOR_NORMAL,
>> +			      _("The file '%s' keeps a copy of the log message\n"
>> +				"you edited, if you wish to inspect it later.\n"
>> +				"It will be wiped by the next invocation of 'git commit'.\n"),
>> +			      git_path("COMMIT_EDITMSG"));
>
> That seems excessive, as it is inside the file itself. Unless your
> editor is terrible, it already shows you that information.

The pathname was not the part that was interesting; "If you wish to
inspect it later" was.

But that is what makes it water under the bridge.  The message will
be gone by the time you really need it.
--
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]