Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread Junio C Hamano
John Keeping writes: > On Tue, Feb 12, 2013 at 10:00:26AM -0800, Junio C Hamano wrote: >> >> So it needs to be more like this, and I think it still is more >> readable. > > Agreed. Will you squash this in or do you want a re-roll? I can squash this and the previous one into your original to a s

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread Junio C Hamano
John Keeping writes: >> I am not sure if I understand what you meant by "literal backslash >> blah blah", though. > > It turns out that having this in the script works (in bash and dash > although I haven't checked what Posix has to say about it): > > sed -e "2,$ s/^/\\\/" > > and is equivale

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread John Keeping
On Tue, Feb 12, 2013 at 10:00:26AM -0800, Junio C Hamano wrote: > > So it needs to be more like this, and I think it still is more > readable. Agreed. Will you squash this in or do you want a re-roll? > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > index cbe36bf..8

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread Junio C Hamano
Junio C Hamano writes: >> cat >comment-lines.sh <> #!$SHELL_PATH >> -sed -e "2,\$ s/^/\\/" "\$1" >"\$1".tmp >> +sed -e "2,\$ s/^//" "\$1" >"\$1".tmp >> mv "\$1".tmp "\$1" >> EOF >> chmod a+x comment-lines.sh && > > Yeek. If you used write_script with here-text that does

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread John Keeping
On Tue, Feb 12, 2013 at 09:29:26AM -0800, Junio C Hamano wrote: > John Keeping writes: > > > ... the following fixup is also needed to avoid relying on the shell > > emitting a literal backslash when a backslash isn't followed by a known > > escape character. > > > > -- >8 -- > > > > diff --git a

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread Junio C Hamano
John Keeping writes: > ... the following fixup is also needed to avoid relying on the shell > emitting a literal backslash when a backslash isn't followed by a known > escape character. > > -- >8 -- > > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > index cbe36bf..84

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-12 Thread John Keeping
On Mon, Feb 11, 2013 at 04:13:31PM -0800, Junio C Hamano wrote: > John Keeping writes: > > > @@ -179,7 +182,9 @@ die_abort () { > > } > > > > has_action () { > > - sane_grep '^[^#]' "$1" >/dev/null > > + echo "space stripped actions:" >&2 > > + git stripspace --strip-comments <"$1" >&2

Re: [PATCH v2] rebase -i: respect core.commentchar

2013-02-11 Thread Junio C Hamano
John Keeping writes: > @@ -179,7 +182,9 @@ die_abort () { > } > > has_action () { > - sane_grep '^[^#]' "$1" >/dev/null > + echo "space stripped actions:" >&2 > + git stripspace --strip-comments <"$1" >&2 > + test -n "$(git stripspace --strip-comments <"$1")" > } I'll remove