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

Re: [PATCH] tests: Introduce test_seq

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 4, 2012, 16:38 UTC
Message-ID
<501D4FF0.4060109@kdbg.org>
In-Reply-To
<20120804000904.13c4162b@gmail.com>
Am 04.08.2012 00:09, schrieb Michał Kiedrowicz:
Show 10 quoted lines
> Junio C Hamano <gitster@pobox.com> wrote:
>> I do not have strong
>> opinion on calling this test_seq when it acts differently from seq;
>> it is not confusing enough to make me push something longer that is
>> different from "seq", e.g. test_sequence.
> 
> I prefer "test_seq" because it reminds seq which helps learning how to
> use it.  If some other seq feature is ever needed (e.g. increment value,
> decrementing), it may be added at any time (but I don't think so, there
> are only few usages after years of test suite existence).

And the reason for this is that we always told people "don't use seq" and they submitted an updated patch. What would we have to do now? We have to tell them "don't use seq, use test_seq". Therefore, the patch does not accomplish anything useful, IMO.

The function should really just be named 'seq'.
Or how about this strategy:
seq () {
	unset -f seq
	if ! seq 1 2 >/dev/null 2>&1
	then
		# don't have a working seq; provide it as a function
		seq () {
			insert your definition here
		}
	fi
	seq "$@"
}
but it is not my favorite.
-- Hannes
Previous: Michał KiedrowiczNext: Junio C Hamano
Message 14 of 34 in “Fix 'No newline...' annotation in rewrite diffs.”
  1. Fix 'No newline...' annotation in rewrite diffs.Adam Butcher, Aug 2, 2012
  2. Jeff KingAug 2, 2012
  3. Junio C HamanoAug 2, 2012
  4. Jeff KingAug 2, 2012
  5. Michał KiedrowiczAug 3, 2012
  6. Jeff KingAug 3, 2012
  7. Junio C HamanoAug 3, 2012
  8. Jeff KingAug 3, 2012
  9. tests: Introduce test_seqMichał Kiedrowicz, Aug 3, 2012
  10. Jeff KingAug 3, 2012
  11. Junio C HamanoAug 3, 2012
  12. Jeff KingAug 3, 2012
  13. Michał KiedrowiczAug 3, 2012
  14. Johannes SixtAug 4, 2012
  15. Junio C HamanoAug 4, 2012
  16. Michał KiedrowiczAug 6, 2012
  17. Jeff KingAug 6, 2012
  18. tests: Introduce test_seqMichał Kiedrowicz, Aug 3, 2012
  19. Junio C HamanoAug 3, 2012
  20. Jeff KingAug 3, 2012
  21. Junio C HamanoAug 3, 2012
  22. Michał KiedrowiczAug 4, 2012
  23. Adam ButcherAug 4, 2012
  24. tests: Introduce test_seqMichał Kiedrowicz, Aug 3, 2012
  25. Jeff KingAug 3, 2012
  26. Michał KiedrowiczAug 3, 2012
  27. tests: Introduce test_seqMichał Kiedrowicz, Aug 3, 2012
  28. Jeff KingAug 3, 2012
  29. Adam ButcherAug 2, 2012
  30. Junio C HamanoAug 2, 2012
  31. Adam ButcherAug 2, 2012
  32. Adam ButcherAug 4, 2012
  33. Junio C HamanoAug 5, 2012
  34. Fix '\ No newline...' annotation in rewrite diffsAdam Butcher, Aug 5, 2012

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.