git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] t3401: modernize style

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Dec 9, 2011, 18:51 UTC
Message-ID
<CALkWK0mip_pzUDQO=YLxaVwsWEAUdrk_EKcNG94Xr5+N+kzBtw@mail.gmail.com>
In-Reply-To
<1323449952-14161-1-git-send-email-martin.von.zweigbergk@gmail.com>
Hi Martin,

No cover letter, so I'm assuming these are just two random one-off patches. The motivation is unclear: lazy afternoon? :P

Martin von Zweigbergk wrote:
Show 18 quoted lines
> [...]
> diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
> index aea6685..d7c874c 100755
> --- a/t/t3401-rebase-partial.sh
> +++ b/t/t3401-rebase-partial.sh
> @@ -11,51 +11,50 @@ local branch.
>  '
>  . ./test-lib.sh
>
> -test_expect_success \
> -    'prepare repository with topic branch' \
> -    'echo First > A &&
> -     git update-index --add A &&
> -     git commit -m "Add A." &&
> +test_expect_success 'prepare repository with topic branch' '
> +       echo First > A &&
> +       git update-index --add A &&
> +       git commit -m "Add A." &&
Style nit: >[^ ] is prevalent FWIW.

$ git grep '> [^ ]' t/ | wc -l 3091 $ git grep '>[^ ]' t/ | wc -l 9271

Sure, the regular expressions aren't tailored to make sure that only redirections are caught, but I suppose it's safe to assume that one number is significantly larger than the other.

Show 8 quoted lines
> [...]
> -test_expect_success \
> -    'rebase topic branch against new master and check git am did not get halted' \
> -    'git rebase master && test ! -d .git/rebase-apply'
> +test_expect_success 'rebase topic branch against new master and check git am did not get halted' '
> +       git rebase master &&
> +       test ! -d .git/rebase-apply
> +'

While at it, why not change this "test ! -d" to "test_path_is_missing"? My rationale is that you're touching the file anyway to do a generic cleanup; might as well finish it.

Thanks.
-- Ram
Previous: Jonathan NiederNext: Jonathan Nieder
Message 5 of 7 in “t3401: modernize style”
  1. 1/2 t3401: modernize styleMartin von Zweigbergk, Dec 9, 2011
  2. 2/2 t3401: use test_commit in setupMartin von Zweigbergk, Dec 9, 2011
  3. Ramkumar RamachandraDec 9, 2011
  4. Jonathan NiederDec 9, 2011
  5. Ramkumar RamachandraDec 9, 2011
  6. Jonathan NiederDec 9, 2011
  7. Martin von ZweigbergkDec 10, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.