On Sat, Dec 25, 2010 at 9:29 PM, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote: > 2010/12/25 Andreas Schwab <schwab@xxxxxxxxxxxxxx>: >> Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx> writes: >> >>> @@ -322,7 +322,10 @@ test_expect_success 'git grep' ' >>> Âtest_expect_success 'git commit' ' >>> Â Â Â ( >>> Â Â Â Â Â Â Â cd repo.git && >>> - Â Â Â Â Â Â GIT_DIR=. GIT_WORK_TREE=work git commit -a -m done >> >> In which way is that not portable? > > I admit that I rarely leave bash, so I'll quote Johannes answer [1] > > -- 8< -- > Sure, it is (bashisms). This: > > Â GIT_DIR="$TRASH_DIRECTORY/2/.git" test_repo 2/sub > > does not work the same way in all shells when test_repo is a shell > function. You have to export GIT_DIR explicitly before the function call. Hmm.. I misread it. That's only for shell _functions_. [1] says variable assignments for simple commands are actually exported. Junio, please don't pick up this patch. [1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html