git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Escape Git's exec path in contrib/rerere-train.sh script
@ 2015-11-08 11:27 Daniel Knittl-Frank
  2015-11-20 11:44 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Knittl-Frank @ 2015-11-08 11:27 UTC (permalink / raw)
  To: git; +Cc: Daniel Knittl-Frank

Whitespace can cause the source command to fail. This is usually not a
problem on Unix systems, but on Windows Git is likely to be installed
under "C:/Program Files/", thus rendering the script broken.

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
---
 contrib/rerere-train.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh
index 36b6fee..52ad9e4 100755
--- a/contrib/rerere-train.sh
+++ b/contrib/rerere-train.sh
@@ -7,7 +7,7 @@ USAGE="$me rev-list-args"
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
-. $(git --exec-path)/git-sh-setup
+. "$(git --exec-path)/git-sh-setup"
 require_work_tree
 cd_to_toplevel
 
-- 
2.6.0.rc0.134.g48a2a2a

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Escape Git's exec path in contrib/rerere-train.sh script
  2015-11-08 11:27 [PATCH] Escape Git's exec path in contrib/rerere-train.sh script Daniel Knittl-Frank
@ 2015-11-20 11:44 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2015-11-20 11:44 UTC (permalink / raw)
  To: Daniel Knittl-Frank; +Cc: git, Daniel Knittl-Frank

On Sun, Nov 08, 2015 at 12:27:55PM +0100, Daniel Knittl-Frank wrote:

> Whitespace can cause the source command to fail. This is usually not a
> problem on Unix systems, but on Windows Git is likely to be installed
> under "C:/Program Files/", thus rendering the script broken.
> 
> Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
> ---
>  contrib/rerere-train.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh
> index 36b6fee..52ad9e4 100755
> --- a/contrib/rerere-train.sh
> +++ b/contrib/rerere-train.sh
> @@ -7,7 +7,7 @@ USAGE="$me rev-list-args"
>  
>  SUBDIRECTORY_OK=Yes
>  OPTIONS_SPEC=
> -. $(git --exec-path)/git-sh-setup
> +. "$(git --exec-path)/git-sh-setup"

Thanks, this makes sense.

The "normal" scripts just use ". git-sh-setup", but they have the
benefit of being run under the "git" wrapper, so the exec-path is
already in their PATH. This one is meant to be used directly, so it
needs this.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-20 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-08 11:27 [PATCH] Escape Git's exec path in contrib/rerere-train.sh script Daniel Knittl-Frank
2015-11-20 11:44 ` Jeff King

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).