All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Daniel Barkalow <barkalow@iabervon.org>,
	Christian Couder <chriscool@tuxfamily.org>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Stephan Beyer <s-beyer@gmx.net>
Subject: Re: [PATCH v2 2/2] rebase -i: use config file format to save author information
Date: Sun, 21 Jun 2009 01:10:41 -0700	[thread overview]
Message-ID: <7vbpoit3b2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <200906211001.42254.jnareb@gmail.com> (Jakub Narebski's message of "Sun\, 21 Jun 2009 10\:01\:41 +0200")

Jakub Narebski <jnareb@gmail.com> writes:

> On Sun, 21 June 2009, Junio C Hamano wrote:
>> Daniel Barkalow <barkalow@iabervon.org> writes:
>> 
>>>> Why is this a good change?
>>>
>>> It was always using a temporary file; it just used to use a temporary file 
>>> that was a shell script fragment and needed to be read with "eval". It 
>>> can't be done entirely in core because it may be determined before a 
>>> conflict and only used when run with --continue after the user resolves 
>>> the conflict.
>> 
>> Ahh, Ok.
>> 
>> Using a _known_ and defined format, instead of ad-hoc scriptlet, is an
>> improvement.
>> 
>> I still wonder if we can avoid using three separate "git show" and "git
>> config" invocations, though.  But a half of that inefficiency will go away
>> when this is migrated to C, as a single git_config() will grab all three, 
>> although the writing side is still very inefficient X-<.
>
> I think we can on the reading side: just use "git config --list", or
> perhaps "git config --get-regexp <sth>" (where <sth> can be ".*") which
> conveniently has SPC as separator, and feed it to appropriate 3 x 'read'.
>
> On the writing side we can simply write in the config file format, we
> don't need to use git-config for that.  Although I wonder if there won't
> be trouble with shell escaping and quoting rules (eval / sed, which
> I guess does shell quoting / shell unquoting).
>
> On getting the information side we can use git-show with custom format
> or git-cat-file fed to while-read-case construct.
>
> This way from 3 x 3 = 9 git commands git-rebase--interactive.sh would
> use only 2.

That's not what I meant.

  reply	other threads:[~2009-06-21  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21  5:08 [PATCH v2 2/2] rebase -i: use config file format to save author information Christian Couder
2009-06-21  6:41 ` Junio C Hamano
2009-06-21  6:51   ` Daniel Barkalow
2009-06-21  6:56     ` Junio C Hamano
2009-06-21  8:01       ` Jakub Narebski
2009-06-21  8:10         ` Junio C Hamano [this message]
2009-06-21  9:53       ` Christian Couder
2009-06-21 10:19         ` Junio C Hamano

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=7vbpoit3b2.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=s-beyer@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.