Re: [PATCH v2 2/2] rebase -i: use config file format to save author information

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 2/2] rebase -i: use config file format to save author information

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:58

Daniel Barkalow [off-list ref] writes:
quoted
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-<.

Re: [PATCH v2 2/2] rebase -i: use config file format to save author information

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:46:58

On Sun, 21 June 2009, Junio C Hamano wrote:
Daniel Barkalow [off-list ref] writes:
quoted
quoted
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.

-- 
Jakub Narebski
Poland

Re: [PATCH v2 2/2] rebase -i: use config file format to save author information

From: Christian Couder <hidden>
Date: 2016-06-15 22:46:58

On Sunday 21 June 2009, Junio C Hamano wrote:
Daniel Barkalow [off-list ref] writes:
quoted
quoted
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-<.
It may be possible to write a ref to the commit we need information from. 
And then when "git rebase --continue" is called, we would read this ref and 
then get information from the referenced commit?

Best regards,
Christian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help