Re: [PATCH/RFC 0/2] custom format for interactive rebase todo
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 9, 2014, 16:58 UTC
- Message-ID
- <xmqqtx4gloii.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <864mwhi9qu.fsf@gmail.com>
William Clifford <mr.william.clifford@gmail.com> writes:
Show 7 quoted lines
> A couple of examples: > > - `git config sequence.format "%<(12,trunc)%ae %s"` > - `git config sequence.format "%s <%aN %aE>"` > - `git config sequence.format "%s%n%%n%b"` > ... I'm unsure what would happen if I tried to rebase with the > third style unedited or uncommented.
It should be simply forbidden. The body part may have a line that is similar enough (i.e. starting with one of the command words and then a hexadecimal string) to confuse the sequencing machinery.
Other than that safety issue, I am not fundamentally opposed to the idea.
As to the implementation in 1/2, your unconditional use of ">%h" is wrong (you would end up including the commits from the left side).
Use '%m' instead of a hardcoded '>', perhaps?