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

Re: [PATCH 01/16] t/t5505-remote: modernize subshell-style of one test

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 21, 2013, 22:04 UTC
Message-ID
<7vehbvktmz.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1371813160-4200-2-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 6 quoted lines
> Since we plan to edit the test "migrate a remote from named file in
> $GIT_DIR/remotes" in later patches, modernize the subshell-style by
> putting the parenthesis on separate lines and indenting the body.
>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---

Good, but a "style only" patch like this should consider taking advantage of the occasion to clean up the entire file, as we do not often get enough chance to do so without conflicting with in-flight topics. Is there something else that would conflict if this step did so?

Show 22 quoted lines
>  t/t5505-remote.sh | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
> index dd10ff0..4d5810f 100755
> --- a/t/t5505-remote.sh
> +++ b/t/t5505-remote.sh
> @@ -691,13 +691,15 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '
>  test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
>  	git clone one six &&
>  	origin_url=$(pwd)/one &&
> -	(cd six &&
> -	 git remote rm origin &&
> -	 echo "$origin_url" > .git/branches/origin &&
> -	 git remote rename origin origin &&
> -	 ! test -f .git/branches/origin &&
> -	 test "$(git config remote.origin.url)" = "$origin_url" &&
> -	 test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin")
> +	(
> +		cd six &&
> +		git remote rm origin &&
> +		echo "$origin_url" > .git/branches/origin &&
A SP between > and the filename is still there?
Show 8 quoted lines
> +		git remote rename origin origin &&
> +		! test -f .git/branches/origin &&
> +		test "$(git config remote.origin.url)" = "$origin_url" &&
> +		test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin"
> +	)
>  '
>  
>  test_expect_success 'remote prune to cause a dangling symref' '
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 3 of 43 in “Cleanup {branches,remotes}-file cruft”
  1. 00/16 Cleanup {branches,remotes}-file cruftRamkumar Ramachandra, Jun 21, 2013
  2. 01/16 t/t5505-remote: modernize subshell-style of one testRamkumar Ramachandra, Jun 21, 2013
  3. Junio C HamanoJun 21, 2013
  4. Ramkumar RamachandraJun 22, 2013
  5. 02/16 t/t5505-remote: test push-refspec in branches-fileRamkumar Ramachandra, Jun 21, 2013
  6. Junio C HamanoJun 21, 2013
  7. 03/16 t/t5505-remote: use test_path_is_missingRamkumar Ramachandra, Jun 21, 2013
  8. 04/16 t/t5505-remote: remove dependency on $origin_urlRamkumar Ramachandra, Jun 21, 2013
  9. Junio C HamanoJun 21, 2013
  10. Ramkumar RamachandraJun 22, 2013
  11. Junio C HamanoJun 22, 2013
  12. Ramkumar RamachandraJun 23, 2013
  13. 05/16 remote: remove dead code in read_branches_file()Ramkumar Ramachandra, Jun 21, 2013
  14. Junio C HamanoJun 21, 2013
  15. Ramkumar RamachandraJun 22, 2013
  16. Junio C HamanoJun 23, 2013
  17. Ramkumar RamachandraJun 23, 2013
  18. Junio C HamanoJun 23, 2013
  19. 06/16 t/t5505-remote: test url-with-# in branches-fileRamkumar Ramachandra, Jun 21, 2013
  20. Junio C HamanoJun 21, 2013
  21. Ramkumar RamachandraJun 22, 2013
  22. 07/16 t/t5516-fetch-push: don't use branches-fileRamkumar Ramachandra, Jun 21, 2013
  23. Junio C HamanoJun 21, 2013
  24. 08/16 t/t5516-fetch-push: use test_config()Ramkumar Ramachandra, Jun 21, 2013
  25. Junio C HamanoJun 21, 2013
  26. Ramkumar RamachandraJun 22, 2013
  27. Johannes SixtJun 22, 2013
  28. 09/16 ls-remote doc: fix example invocation on git.gitRamkumar Ramachandra, Jun 21, 2013
  29. Junio C HamanoJun 21, 2013
  30. 10/16 ls-remote doc: rewrite <repository> paragraphRamkumar Ramachandra, Jun 21, 2013
  31. Junio C HamanoJun 21, 2013
  32. 11/16 ls-remote doc: don't encourage use of branches-fileRamkumar Ramachandra, Jun 21, 2013
  33. 12/16 t/t5505-remote: modernize subshell-style of one testRamkumar Ramachandra, Jun 21, 2013
  34. 13/16 t/t5505-remote: test multiple push/pull in remotes-fileRamkumar Ramachandra, Jun 21, 2013
  35. Eric SunshineJun 21, 2013
  36. Ramkumar RamachandraJun 22, 2013
  37. 14/16 t/t5510-fetch: don't use remotes-fileRamkumar Ramachandra, Jun 21, 2013
  38. 15/16 t/t5515-fetch-merge-logic: don't use {branches,remotes}-fileRamkumar Ramachandra, Jun 21, 2013
  39. 16/16 remote: deprecate read_{branches,remotes}_fileRamkumar Ramachandra, Jun 21, 2013
  40. Junio C HamanoJun 21, 2013
  41. Ramkumar RamachandraJun 21, 2013
  42. Junio C HamanoJun 21, 2013
  43. Ramkumar RamachandraJun 21, 2013

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.