git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: [RFC PATCH] An option parser for the sequencer
Date: Sun, 10 Jul 2011 10:15:29 +0200	[thread overview]
Message-ID: <201107101015.29762.chriscool@tuxfamily.org> (raw)
In-Reply-To: <1310226118-10201-1-git-send-email-artagnon@gmail.com>

Hi Ram,

On Saturday 09 July 2011 17:41:57 Ramkumar Ramachandra wrote:
> Hi,
> 
> I've decided not to support arbitrary command-line options in the
> instruction sheet.

It may be a good decision, but could you explain why? You could say for 
example that the series would be already an improvement over what we have if 
we don't parse arbitrary command line options.

> A typical instruction sheet will looks like this
> (inspired heavily by the rebase -i instruction sheet format):

> pick 3b36854 t: add tests for cloning remotes with detached HEAD
> pick 61adfd3 consider only branches in guess_remote_head
> pick 8537f0e submodule add: test failure when url is not configured in
> superproject pick 4d68932 submodule add: allow relative repository path
> even when no url is set pick f22a17e submodule add: clean up duplicated
> code
> pick 59a5775 make copy_ref globally available
> pick c1921c1 clone: always fetch remote HEAD

Would it be easy to change the format to support arbitrary command line 
options if we want to do it afterwards, especially after the end of the GSoC?

> For persisting one set of options for every "git cherry-pick"/ "git
> revert" invocation, I've decided to use a simple "key = value" format
> and put it in .git/sequencer/opts (to sit beside .git/sequencer/head
> and .git/sequencer/todo).  For strategy-option, I thought it would be
> cute to separate the various options using ' | '.  So, it'll look
> something like this in the end:
> 
> signoff = true
> mainline = 1
> strategy-option = recursive | ours

Is it the same format as the .git/config file format? Would it be possible to 
reuse some config parsing/writing code?

> The implementation is a little rough around the edges, but I'm pretty
> happy with the overall design: it looks like a scaled-down version of
> parse-options.  Quite a lot of context is missing (where did
> sequencer.h come from?!), but I hope it's clear enough to convey the
> idea.
> 
> Thanks for reading.
> 
> Ramkumar Ramachandra (1):
>   revert: Persist per-session opts
> 
>  builtin/revert.c |  143
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++ sequencer.h      | 
>   8 +++
>  2 files changed, 151 insertions(+), 0 deletions(-)

The subject should have been "[RFC PATCH 0/1] ..." instead of "[RFC PATCH] 
..." because this is just a patch series header.

Thanks,
Christian.

  parent reply	other threads:[~2011-07-10  8:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-09 15:41 [RFC PATCH] An option parser for the sequencer Ramkumar Ramachandra
2011-07-09 15:41 ` [RFC PATCH] revert: Persist per-session opts Ramkumar Ramachandra
2011-07-10  8:02   ` Christian Couder
2011-07-11  6:12     ` Ramkumar Ramachandra
2011-07-10  8:15 ` Christian Couder [this message]
2011-07-11  6:11   ` [RFC PATCH] An option parser for the sequencer Ramkumar Ramachandra

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=201107101015.29762.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=artagnon@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).