Re: [PATCH] Force new line at end of commit message

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

>>  		echo "# This is a combination of $COUNT commits."
>> -		sed -n "2,\$p" < "$SQUASH_MSG"
>> +		sed -e 1d -e '2,/^./{
>> +			/^$/d
>> +		}' <"$SQUASH_MSG"
>
> If I read this correctly (haven't tested), then _all_ empty lines are 
> removed from the SQUASH_MSG, right?  This is not what I want.

That is no what I wanted either.

"1d" removes the "# This is a combination of <$n> commits." from
the previous round, "2,/^./{ ... }" says apply what's in {} to
lines from second line to the first non-empty line, and what's
in {} is to remove empty ones.

> Unfortunately, I am unable to provide a proper patch with proper testing 
> right now,...

That's Ok.  Seeing what the patch already in front of you does
would be less time consuming.


-
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]

  Powered by Linux