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

Re: [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options.

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 1, 2010, 05:24 UTC
Message-ID
<20100801052437.GA10438@burratino>
In-Reply-To
<20100728130610.GG6895@madism.org>
Pierre Habouzit wrote:
> you cannot take the address of a bit portably in C, so you can't let
> parseopt set/clear bits through bitfields (as in unsigned field : 1 in a
> struct in C I mean).

For the curious: I think this means doing something like v1.5.4-rc0~186^2~1 (Make the diff_options bitfields be an unsigned with explicit masks, 2007-11-10), which means instead of writing

	revs->topo_order = 1;
one would write something like
	REV_TRAV_SET(revs, TOPO_ORDER);
See [1] and [2].  Looks simple and reasonable.
While we are exploring ancient history, I find[3]:
	  I came up with the relocation thing because I feared
	that the msys port (and maybe other ?) that are about to
	use (or already do) threads would step on each other toes
	while recursing into a sub-array of options.
	  Johannes thinks that this never happens in our
	codebase, hence that my patches are an overkill.
	  The likely users of this feature are currently diff
	options (diff.c diff_opt_parse) and revisions
	(builtin-log.c setup_revisions).
	  Using Johannes patch, we will have to export a global
	struct diff_option (resp. struct rev_info) from diff.c
	(resp. revisions.c) and no function (or almost) would
	take struct diff_option (resp struct rev_info) as an
	argument because everyone would work on the global
	variable[0].
	  With my patches, we can work like we do now, with a
	more functional approach.

Is the relocation thing worth thinking about? (Mind you, I was not there, so I do not know what it is nor whether it was a dead end.) If so, is it documented anywhere?

The table-inclusion method[4] still appeals to me very much. Well, whatever seems to work best.

[1] http://thread.gmane.org/gmane.comp.version-control.git/63797/focus=63937 [2] http://thread.gmane.org/gmane.comp.version-control.git/83083/focus=83114 [3] http://thread.gmane.org/gmane.comp.version-control.git/63502/focus=63506 [4] http://thread.gmane.org/gmane.comp.version-control.git/63505/focus=63517

Previous: Pierre Habouzit
Message 20 of 20 in “Allow detached forms (--option arg) for git log options.”
  1. 0/2 Allow detached forms (--option arg) for git log options.Matthieu Moy, Jul 26, 2010
  2. 1/2 Allow "git log --grep foo" as synonym for "git log --grep=foo".Matthieu Moy, Jul 26, 2010
  3. Sverre RabbelierJul 27, 2010
  4. Miles BaderJul 27, 2010
  5. Jakub NarebskiJul 27, 2010
  6. Matthieu MoyJul 27, 2010
  7. Ævar Arnfjörð BjarmasonJul 27, 2010
  8. Matthieu MoyJul 27, 2010
  9. Ævar Arnfjörð BjarmasonJul 27, 2010
  10. Matthieu MoyJul 27, 2010
  11. Ævar Arnfjörð BjarmasonJul 27, 2010
  12. 2/2 Allow "git log -S string" as synonym for "git log -Sstring".Matthieu Moy, Jul 26, 2010
  13. Sverre RabbelierJul 27, 2010
  14. Jonathan NiederJul 26, 2010
  15. Pierre HabouzitJul 27, 2010
  16. Jakub NarebskiJul 27, 2010
  17. Pierre HabouzitJul 28, 2010
  18. Jakub NarebskiJul 29, 2010
  19. Pierre HabouzitJul 29, 2010
  20. Jonathan NiederAug 1, 2010

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.