Re: [PATCH 2/3] stripspace: respect repository config
- From
Jeff King <peff@peff.net>
- Date
- Nov 22, 2016, 21:24 UTC
- Message-ID
- <20161122212416.kv5srurlnidqufqr@sigill.intra.peff.net>
- In-Reply-To
- <20161122211920.3qdohxdktykqhyga@sigill.intra.peff.net>
On Tue, Nov 22, 2016 at 04:19:20PM -0500, Jeff King wrote:
Show 7 quoted lines
> > > Do you want to do another round of -rc3? Ship with the > > > minor regressions and fix them up in v2.11.1? > > > > I am leaning towards the former (though we may also end up doing the > > latter). > > I think I'd lead towards -rc3, as well. Our schedule is somewhat
I meant s/lead/lean/, of course.
> Something like this, which does all but the last (and that should > probably happen separately post-release).
As usual, I'm utterly confused by the $(pwd) versus $PWD thing. So let me review what I did to see if it makes sense. :)
Show 13 quoted lines
> +# run "$@" inside a non-git directory
> +nongit () {
> + test -d non-repo ||
> + mkdir non-repo ||
> + return 1
> +
> + (
> + GIT_CEILING_DIRECTORIES=$(pwd) &&
> + export GIT_CEILING_DIRECTORIES &&
> + cd non-repo &&
> + "$@"
> + )
> +}I copied this bit from t1515, which sets up a similar scenario. I think it _probably_ works either way because of the environment-variable conversion magic that Windows bash does.
Show 5 quoted lines
> +test_expect_success 'git archive --remote outside of a git repo' ' > + git archive HEAD >expect.tar && > + nongit git archive --remote="$PWD" HEAD >actual.tar && > + test_cmp_bin expect.tar actual.tar > +'
I'm not sure if it matters here. I almost wrote $TRASH_DIRECTORY, but that I think is in the same form as $PWD. Either would be fine.
-Peff