git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Pierre Habouzit <madcoder@debian.org>
Cc: Jakub Narebski <jnareb@gmail.com>,
	Matthieu Moy <Matthieu.Moy@imag.fr>,
	git@vger.kernel.org, Jeff King <peff@peff.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options.
Date: Sun, 1 Aug 2010 00:24:37 -0500	[thread overview]
Message-ID: <20100801052437.GA10438@burratino> (raw)
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

      parent reply	other threads:[~2010-08-01  5:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 18:14 [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options Matthieu Moy
2010-07-26 18:14 ` [RFC PATCH 1/2] Allow "git log --grep foo" as synonym for "git log --grep=foo" Matthieu Moy
2010-07-27  6:43   ` Sverre Rabbelier
2010-07-27  8:40     ` Miles Bader
2010-07-27 10:24       ` Jakub Narebski
2010-07-27  8:45     ` Matthieu Moy
2010-07-27 10:18   ` Ævar Arnfjörð Bjarmason
2010-07-27 11:56     ` Matthieu Moy
2010-07-27 12:21       ` Ævar Arnfjörð Bjarmason
2010-07-27 13:26         ` Matthieu Moy
2010-07-27 13:46           ` Ævar Arnfjörð Bjarmason
2010-07-26 18:14 ` [RFC PATCH 2/2] Allow "git log -S string" as synonym for "git log -Sstring" Matthieu Moy
2010-07-27  6:42   ` Sverre Rabbelier
2010-07-26 19:31 ` [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options Jonathan Nieder
2010-07-27 14:46   ` Pierre Habouzit
2010-07-27 15:10     ` Jakub Narebski
2010-07-28 13:06       ` Pierre Habouzit
2010-07-29  9:16         ` Jakub Narebski
2010-07-29 18:33           ` Pierre Habouzit
2010-08-01  5:24         ` Jonathan Nieder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100801052437.GA10438@burratino \
    --to=jrnieder@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=madcoder@debian.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).