[PATCH] subtree: initialize prefix variable
On Mon, Mar 17, 2014 at 01:58:00PM +0100, Gilles Filippini wrote: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: I think it just needs the patch below. -- 8 -- We parse the --prefix command-line option into the $prefix shell variable. However, if we do not see such an option, the variable is left with whatever value it had in the environment. We should initialize it to a known value, like we do for other variables. Signed-off-by: Jeff King p...@peff.net --- I checked, and this looks like the only variable in this situation. contrib/subtree/git-subtree.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index dc59a91..db925ca 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -46,6 +46,7 @@ ignore_joins= annotate= squash= message= +prefix= debug() { -- 1.9.0.532.gc4c322d -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] subtree: initialize prefix variable
On Mon, Mar 17, 2014 at 3:59 PM, Jeff King p...@peff.net wrote: On Mon, Mar 17, 2014 at 01:58:00PM +0100, Gilles Filippini wrote: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: I think it just needs the patch below. Gilles submitted this same patch [1] a couple weeks ago but it appears to have been lost in the noise. Your commit message is a bit nicer. [1]: http://thread.gmane.org/gmane.comp.version-control.git/243103/ -- 8 -- We parse the --prefix command-line option into the $prefix shell variable. However, if we do not see such an option, the variable is left with whatever value it had in the environment. We should initialize it to a known value, like we do for other variables. Signed-off-by: Jeff King p...@peff.net --- I checked, and this looks like the only variable in this situation. contrib/subtree/git-subtree.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index dc59a91..db925ca 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -46,6 +46,7 @@ ignore_joins= annotate= squash= message= +prefix= debug() { -- 1.9.0.532.gc4c322d -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] subtree: initialize prefix variable
On Mon, Mar 17, 2014 at 04:08:50PM -0400, Eric Sunshine wrote: On Mon, Mar 17, 2014 at 3:59 PM, Jeff King p...@peff.net wrote: On Mon, Mar 17, 2014 at 01:58:00PM +0100, Gilles Filippini wrote: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: I think it just needs the patch below. Gilles submitted this same patch [1] a couple weeks ago but it appears to have been lost in the noise. Your commit message is a bit nicer. [1]: http://thread.gmane.org/gmane.comp.version-control.git/243103/ Ah, sorry Gilles, I completely missed that. Junio, if you pick this up, please feel free to use text from my commit message as you see fit, but mark Gilles as the author. Thanks, Eric, for pointing it out. -Peff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html