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

Re: [PATCH v4/GSoC/MICRO] revision: forbid combining --graph and --no-walk

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2015, 23:18 UTC
Message-ID
<xmqq4mpjmcvv.fsf@gitster.dls.corp.google.com>
In-Reply-To
<c6c08cdbbc0060c6d834c86d13a142cde290dc5c.1426039099.git.dongcan.jiang@gmail.com>
Dongcan Jiang <dongcan.jiang@gmail.com> writes:
Show 9 quoted lines
> Because "--graph" is about connected history while --no-walk
> is about discrete points, it does not make sense to allow
> giving these two options at the same time. [1]
>
> This change makes a few calls to "show --graph" fail in
> t4052, but asking to show one commit with graph is a
> nonsensical thing to do. Thus, tests on "show --graph" in
> t4052 have been removed. [2,3] Same tests on "show" without
> --graph option have already been tested in 4052.
This looks almost perfect.
Show 11 quoted lines
>
> diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
> index b68afef..a989e8f 100755
> --- a/t/t4052-stat-output.sh
> +++ b/t/t4052-stat-output.sh
> @@ -99,7 +99,7 @@ do
>  		test_cmp "$expect" actual
>  	'
>  
> -	test "$cmd" != diff || continue
> +	test "$cmd" != diff -a "$cmd" != show || continue

I think we avoid -a and -o used with test (don't we have a write-up on this somewhere?). Write it like this

	test "$cmd" != diff &&
        test "$cmd" != show || continue
or perhaps like this
	case "$cmd" in diff|show) continue ;; esac
Other than that I do not see anything objectionable.
Thanks, good job.
Previous: Dongcan JiangNext: Eric Sunshine
Message 11 of 13 in “[GSoC][MICRO] Forbid "log --graph --no-walk"”
  1. [GSoC][MICRO] Forbid "log --graph --no-walk"Dongcan Jiang, Mar 6, 2015
  2. Eric SunshineMar 6, 2015
  3. Dongcan JiangMar 6, 2015
  4. Junio C HamanoMar 6, 2015
  5. René ScharfeMar 6, 2015
  6. revision: forbid combining --graph and --no-walkDongcan Jiang, Mar 7, 2015
  7. Junio C HamanoMar 8, 2015
  8. revision: forbid combining --graph and --no-walkDongcan Jiang, Mar 9, 2015
  9. Junio C HamanoMar 10, 2015
  10. revision: forbid combining --graph and --no-walkDongcan Jiang, Mar 11, 2015
  11. Junio C HamanoMar 17, 2015
  12. Eric SunshineMar 17, 2015
  13. revision: forbid combining --graph and --no-walkDongcan Jiang, Mar 18, 2015

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.