Re: [PATCH] rebase: Fix documentation about used shell in -x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Kristoffer Haugsbakk" <code@xxxxxxxxxxxxxxx> writes:

> Hi
>
> Some nitpicks since it seems like there will be another round (v2):
>
>> rebase: Fix documentation about used shell in -x
>
> Lower-case “fix” is more conventional.[1]
>
>> SHELL_PATH constant at build time. This erroneous statement in the
>> documentation sent me on a 10 minute wild goose chase wondering why my
>> $SHELL was pointing to /bin/bash and my /bin/sh to dash and git was
>> using dash and not bash.
>
> I think anecdotes are not kept in the commit message, usually? Often they
> are put after the three-hyphen/three-dash line.
> ...
>     The shell used when using the -x option is the one pointed to by the
>     SHELL_PATH constant at build time.
>
>     Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
>     ---
>       This erroneous statement in the documentation sent me on a 10 minute
>       wild goose chase wondering why my $SHELL was pointing to /bin/bash and
>       my /bin/sh to dash and git was using dash and not bash.
>
>      Documentation/git-rebase.txt | 2 +-
>      1 file changed, 1 insertion(+), 1 deletion(-)

Yup, that looks better.  Here is what I will queue tentatively, with
the improvement suggested by Peff.

----- >8 -----
Subject: [PATCH] rebase: fix documentation about used shell in -x

The shell used when using the -x option is the one pointed to by the
SHELL_PATH constant at build time, not $SHELL environment variable.

We could leave the parenthetical explanation about what shell is
used, but it depends on the build and platform (Windows do not even
use SHELL_PATH build-time knob).  Because Git executes lots of
things using a shell, and it always uses the default shell, it
probably is better to just stop at saying "launches the command in a
shell" without going into more details.

Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
Helped-by: Jeff King <peff@xxxxxxxx>
Helped-by: Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx>
Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---

 * We could say things like

    - it is a possibility for the future to add how the default
      shell is decided (including the use of SHELL_PATH) in a more
      central part of the doucmentation like git(1)

    - at least not giving a wrong information would prevent the
      future developers wasting time on experimenting various
      settings of the $SHELL variable

   in the log message, if we want.

 Documentation/git-rebase.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index b4526ca246..51489ea686 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -957,8 +957,7 @@ The interactive rebase will stop when a command fails (i.e. exits with
 non-0 status) to give you an opportunity to fix the problem. You can
 continue with `git rebase --continue`.
 
-The "exec" command launches the command in a shell (the one specified
-in `$SHELL`, or the default shell if `$SHELL` is not set), so you can
+The "exec" command launches the command in a shell, so you can
 use shell features (like "cd", ">", ";" ...). The command is run from
 the root of the working tree.
 





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux