Re: [PATCH/RFC 2/2] Provide a build time default-editor setting

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

Re: [PATCH/RFC 2/2] Provide a build time default-editor setting

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:38

Johannes Sixt [off-list ref] writes:
Yeah, whatever, I didn't take the time to think it through. But this may be an 
opportunity to give some life back to the zombie that git-var currently is, 
that is, to make it the plumbing that does value discovery for variables like 
GIT_AUTHOR_INDENT, GIT_COMMITTER_IDENT, GIT_EDITOR, and perhaps also 
GIT_PAGER.
Hmm, wouldn't it make even more sense to "run" them for the calling
Porcelain script?

A shell script Porcelain can already ". git-sh-setup" and say

	git_editor this-file

when it needs to spawn the editor of choice.  Your new plumbing support
could make the definition of git_editor in git-sh-setup.sh into something
like:

    git_editor() {
    	git var --run GIT_EDITOR "$@"
    }
    git_pager() {
    	git var --run GIT_PAGER "$@"
    }

Re: [PATCH/RFC 2/2] Provide a build time default-editor setting

From: David Roundy <hidden>
Date: 2016-06-15 22:47:38

On Thu, Oct 29, 2009 at 6:12 PM, Junio C Hamano [off-list ref] wrote:
Johannes Sixt [off-list ref] writes:
quoted
Yeah, whatever, I didn't take the time to think it through. But this may be an
opportunity to give some life back to the zombie that git-var currently is,
that is, to make it the plumbing that does value discovery for variables like
GIT_AUTHOR_INDENT, GIT_COMMITTER_IDENT, GIT_EDITOR, and perhaps also
GIT_PAGER.
Hmm, wouldn't it make even more sense to "run" them for the calling
Porcelain script?
That was what I had been thinking.  That way the caller doesn't need
to know whether it may be a space-containing absolute path or an
executable with flags, as long as git knows what to do.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help