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

Re: [RFC PATCH v5] Implement --first-parent for git rev-list --bisect

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 28, 2018, 13:08 UTC
Message-ID
<nycvar.QRO.7.76.6.1806281505160.73@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqwoukgpr9.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Wed, 27 Jun 2018, Junio C Hamano wrote:
Show 14 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > 	git rev-list --bisect-all --first-parent F..E >revs &&
> > 	# only E, e1..e8 should be listed, nothing else
> > 	test_line_count = 9 revs &&
> > 	for rev in E e1 e2 e3 e4 e5 e6 e7 e8
> > 	do
> > 		grep "^$(git rev-parse $rev) " revs || return
> > 	done
> >
> > I am faster by... a lot. Like, seconds instead of minutes.
> 
> I'm fine either way.  I just thought you would not want 9 separate
> invocations of grep ;-)
I don't.
I like the unnecessary test_commit calls even less ;-)

And yes, we could avoid those `grep` calls, I know. By something as convoluted as

	revs="$(cat revs)" &&
	for rev in $(git rev-parse E e1 e2 e3 e4 e5 e6 e7 e8)
	do
		case "$LF$revs" in
		*"$LF$rev "*) ;; # okay
		*) echo "Missing: $rev">&2; return 1;;
		esac
	done

Is this really what you would call an easy-to-understand test? Maybe for you, a Unix oldtimer and shell scripting king.

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 18 in “Implement --first-parent for git rev-list --bisect”
  1. Implement --first-parent for git rev-list --bisectTiago Botelho, Jun 22, 2018
  2. Junio C HamanoJun 25, 2018
  3. Christian CouderJun 26, 2018
  4. Johannes SchindelinJun 26, 2018
  5. Christian CouderJun 26, 2018
  6. Johannes SchindelinJun 26, 2018
  7. Junio C HamanoJun 26, 2018
  8. Johannes SchindelinJun 27, 2018
  9. Junio C HamanoJun 27, 2018
  10. Johannes SchindelinJun 28, 2018
  11. Junio C HamanoJun 28, 2018
  12. Johannes SchindelinJun 29, 2018
  13. Tiago BotelhoJul 3, 2018
  14. Junio C HamanoJul 3, 2018
  15. Johannes SchindelinJul 4, 2018
  16. Junio C HamanoJul 6, 2018
  17. Johannes SchindelinJul 6, 2018
  18. Junio C HamanoJul 6, 2018

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.