threads / patch / 9710

patchRe: [PATCH] Adding rebase merge strategy

Subject: Re: [PATCH] Adding rebase merge strategy

## tl;dr

2 messages between Aug 30, 2007 and Aug 30, 2007. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Tom Clarke· Aug 30, 2007, 19:36 UTC · lore
On 8/30/07, Tom Clarke <tom@u2i.com> wrote:
Show 7 quoted lines
> +               ( git log --pretty=format:"%s" ) >actual &&
> +       (
> +               echo "onbranch"
> +               echo "update"
> +               echo -n "initial"
> +       ) >expected &&
> +       git diff -w -u expected actual

One issue that I'm curious about. Is it expected that the git log format above doesn't finish with a new line? I couldn't get this test to work otherwise.

-Tom
Johannes Schindelin· Aug 30, 2007, 19:53 UTC · re: Tom Clarke · lore
Hi,
On Thu, 30 Aug 2007, Tom Clarke wrote:
Show 12 quoted lines
> On 8/30/07, Tom Clarke <tom@u2i.com> wrote:
> > +               ( git log --pretty=format:"%s" ) >actual &&
> > +       (
> > +               echo "onbranch"
> > +               echo "update"
> > +               echo -n "initial"
> > +       ) >expected &&
> > +       git diff -w -u expected actual
> 
> One issue that I'm curious about. Is it expected that the git log
> format above doesn't finish with a new line? I couldn't get this test
> to work otherwise.

Indeed, it does not end in a newline. However, I'd solve the issue differently:

- I'd use --pretty=oneline (and use test_tick before every commit, to 
  guarantee consistent object names).
- If you _have_ to keep your way, please use "printf", since "echo -n" is 
  not portable AFAIK.
- Or just do "echo > actual".  And use "cat << EOF" like in most of the 
  other tests.

Ciao, Dscho

← back to recent threads