Re: [PATCH 4/4] rebase -i: Add tests for "--edit-todo"

2012-09-17 Thread Martin von Zweigbergk
On Mon, Sep 17, 2012 at 10:23 PM, Andrew Wong  wrote:
> On 09/18/12 00:58, Martin von Zweigbergk wrote:
>> On Mon, Sep 17, 2012 at 6:28 PM, Andrew Wong  wrote:
>>> +   test M = $(git cat-file commit HEAD^ | sed -ne \$p) &&
>>> +   test L = $(git cat-file commit HEAD | sed -ne \$p)
>> I couldn't find "$" (match last line) in the POSIX man page for sed.
>> Besides, I think $(git show -s --format=%s HEAD) reads better.
> It's under "Addresses in sed":
> ... a '$' character that addresses the last line of input ...

Ah, I just didn't look hard enough; sorry. Good to know.

FWIW, Acked-by: Martin von Zweigbergk 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] rebase -i: Add tests for "--edit-todo"

2012-09-17 Thread Andrew Wong
On 09/18/12 00:58, Martin von Zweigbergk wrote:
> On Mon, Sep 17, 2012 at 6:28 PM, Andrew Wong  wrote:
>> +   test M = $(git cat-file commit HEAD^ | sed -ne \$p) &&
>> +   test L = $(git cat-file commit HEAD | sed -ne \$p)
> I couldn't find "$" (match last line) in the POSIX man page for sed.
> Besides, I think $(git show -s --format=%s HEAD) reads better.
It's under "Addresses in sed":
... a '$' character that addresses the last line of input ...
from:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/sed.html

Various places in that test get the content of files that way, so I
thought it's better to just follow the rest of the test. I agree that
there are better ways to achieve the same thing though.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] rebase -i: Add tests for "--edit-todo"

2012-09-17 Thread Martin von Zweigbergk
On Mon, Sep 17, 2012 at 6:28 PM, Andrew Wong  wrote:
> +   test M = $(git cat-file commit HEAD^ | sed -ne \$p) &&
> +   test L = $(git cat-file commit HEAD | sed -ne \$p)

I couldn't find "$" (match last line) in the POSIX man page for sed.
Besides, I think $(git show -s --format=%s HEAD) reads better.

For future reference, and if you haven't already, you may want to
install manpages-posix (or manpages-posix-dev?) and then you can run
e.g. "man 1p sed" to see the POSIX man page for sed.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html