From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Marc Branchaud <marcnarc@xiplink.com>, git@vger.kernel.org
Subject: Re: [RFC/PATCH] rebase -i: add run command to launch a shell command
Date: Mon, 02 Aug 2010 12:02:10 +0200 [thread overview]
Message-ID: <vpqwrs9nxi5.fsf@bauges.imag.fr> (raw)
In-Reply-To: <AANLkTikMW=ueQXfjpXk8G2FLRN55j1aJsnNz2w19BmkH@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Sat\, 31 Jul 2010 13\:56\:09 +0000")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> On Fri, Jul 30, 2010 at 15:24, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> Marc Branchaud <marcnarc@xiplink.com> writes:
>>
>>>> The name of the command may be subject to discussions. I've chosen
>>>> "run", but maybe "shell" would be OK too. In both cases, it doesn't
>>>> allow the one-letter version since both "r" and "s" are already used.
>>>
>>> "exec" with one-letter "x"?
>>
>> Thanks, that sounds good, yes. Any other thought?
>
> I like "exec".
Yes, it's the best proposal IMHO. "x" is very often associated to
"execute", and I'd rather keep away from punctuation/shift combo.
There have been discussions in the past about giving "!" a semantics
(like "fixup!" for a variant of "fixup"). Let's keep this as an option
for the future by not using ! now.
> I think the docs need to elaborate on the environment the "exec"
> command gets executed in, what's its current working directory for
> instance? Wherever I happened to run git-rebase from? the project
> root?
That's a good question. My original patch was running the command from
the toplevel, which is the natural way to implement it. I've changed
my mind to execute the command from the place where "git rebase -i"
was started (which means this has to be memorized in a temporary file
to be persistant accross "git rebase --continue"). I think this makes
more sense for the user, and I've actually already been biten by the
old behavior, running "rebase -i" from a doc/ subdirectory, and
wondering why my "exec make" was rebuilding the code itself.
This comes with at least one drawback: if directory from which the
rebase was started didn't exist in the past, then we can't do a simple
"cd" to it. My implementation re-creates the directory temporarily, so
that the command can run, and cleans it up afterwards. The only really
problematic case is when the directory can not be created (like
directory/file conflict). It this case, the command is not ran, and
the script exits.
> your if ! eval .. error message also exits with 0, surely that should
> exit with 1?
I'm now exiting with the same status as the command itself in case of
failure.
New version follows. It should hopefully look more like a real patch
than an RFC now.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2010-08-02 10:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 13:29 [RFC/PATCH] rebase -i: add run command to launch a shell command Matthieu Moy
2010-07-28 14:12 ` Santi Béjar
2010-07-28 14:26 ` Matthieu Moy
2010-07-30 10:04 ` Matthieu Moy
2010-07-30 14:51 ` Marc Branchaud
2010-07-30 15:24 ` Matthieu Moy
2010-07-30 18:26 ` Neal Kreitzinger
2010-07-31 13:27 ` Matthieu Moy
2010-07-31 13:56 ` Ævar Arnfjörð Bjarmason
2010-07-31 14:25 ` Miles Bader
2010-08-02 10:02 ` Matthieu Moy [this message]
2010-08-02 10:03 ` [PATCH] rebase -i: add exec " Matthieu Moy
2010-08-02 12:30 ` Jared Hance
2010-08-02 15:51 ` Ævar Arnfjörð Bjarmason
2010-08-06 21:07 ` Johannes Sixt
2010-08-07 8:48 ` Matthieu Moy
2010-08-07 8:56 ` [PATCH 1/2 (new version)] " Matthieu Moy
2010-08-07 8:56 ` [PATCH 2/2] test-lib: user-friendly alternatives to test [!] [-d|-f] Matthieu Moy
2010-08-02 15:04 ` [RFC/PATCH] rebase -i: add run command to launch a shell command Paolo Bonzini
2010-08-02 21:15 ` Junio C Hamano
2010-08-03 6:37 ` Matthieu Moy
2010-08-03 8:47 ` Kris Shannon
2010-08-03 9:16 ` Matthieu Moy
2010-07-31 15:28 ` Paolo Bonzini
2010-07-31 15:52 ` Ævar Arnfjörð Bjarmason
2010-07-31 18:54 ` Jared Hance
2010-07-31 14:40 ` Jared Hance
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=vpqwrs9nxi5.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=marcnarc@xiplink.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.
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).