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

Re: [RFC PATCH] diff --no-index: test for pager after option parsing

From
Thomas Rast <trast@student.ethz.ch>
Date
Jan 7, 2009, 00:09 UTC
Message-ID
<200901070109.25579.trast@student.ethz.ch>
In-Reply-To
<1231286163-9422-1-git-send-email-trast@student.ethz.ch>
Speaking of diff --no-index code, there's also this bit:
	/* diff-no-index.c:206 */
	for (i = 1; i < argc - 2; ) {
		int j;
		if (!strcmp(argv[i], "--no-index"))
			i++;
		else if (!strcmp(argv[1], "-q"))
			options |= DIFF_SILENT_ON_REMOVED;

Note the argv[i] vs. argv[1]. The entire block is from 0569e9b ("git diff": do not ignore index without --no-index, 2008-05-23).

While it seems obvious that this should be argv[i], I'm rather confused by the option itself. It is not documented in my version of git-diff(1). Furthermore, I can't see what being silent about removed paths (which relates to the index?) has to do with a diff --no-index (which takes two paths that must exist).

Or perhaps I should take the "no mails/patches after midnight" rule a tad bit more serious...

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Thomas RastNext: Junio C Hamano
Message 2 of 8 in “diff --no-index: test for pager after option parsing”
  1. diff --no-index: test for pager after option parsingThomas Rast, Jan 6, 2009
  2. Thomas RastJan 7, 2009
  3. Junio C HamanoJan 7, 2009
  4. Miklos VajnaJan 7, 2009
  5. Jeff KingJan 7, 2009
  6. Junio C HamanoJan 7, 2009
  7. diff --no-index -q: fix endless loopThomas Rast, Jan 7, 2009
  8. Junio C HamanoJan 7, 2009

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.