git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jeff KingNext: Johannes Schindelin
Message 14 of 40 in “Fix problems with rebase -i when core.commentchar is defined”
  1. 0/3 Fix problems with rebase -i when core.commentchar is definedJohannes Schindelin, Nov 21, 2016
  2. 2/3 stripspace: respect repository configJohannes Schindelin, Nov 21, 2016
  3. Duy NguyenNov 22, 2016
  4. Johannes SchindelinNov 22, 2016
  5. Junio C HamanoNov 22, 2016
  6. Junio C HamanoNov 22, 2016
  7. Jeff KingNov 22, 2016
  8. Junio C HamanoNov 22, 2016
  9. Jeff KingNov 22, 2016
  10. Junio C HamanoNov 22, 2016
  11. Jeff KingNov 22, 2016
  12. Junio C HamanoNov 22, 2016
  13. Jeff KingNov 23, 2016
  14. Jeff KingNov 22, 2016
  15. 1/3 rebase -i: identify problems with core.commentcharJohannes Schindelin, Nov 21, 2016
  16. Junio C HamanoNov 21, 2016
  17. Junio C HamanoNov 21, 2016
  18. 1/3 rebase -i: highlight problems with core.commentcharJunio C Hamano, Nov 21, 2016
  19. 2/3 stripspace: respect repository configJunio C Hamano, Nov 21, 2016
  20. Junio C HamanoNov 21, 2016
  21. Johannes SchindelinNov 22, 2016
  22. 3/3 rebase -i: handle core.commentChar=autoJunio C Hamano, Nov 21, 2016
  23. Junio C HamanoNov 21, 2016
  24. Junio C HamanoNov 21, 2016
  25. Johannes SchindelinNov 22, 2016
  26. Junio C HamanoNov 22, 2016
  27. Johannes SchindelinNov 23, 2016
  28. Jeff KingNov 21, 2016
  29. Junio C HamanoNov 21, 2016
  30. Jeff KingNov 21, 2016
  31. Johannes SchindelinNov 22, 2016
  32. 3/3 rebase -i: handle core.commentChar=autoJohannes Schindelin, Nov 21, 2016
  33. Johannes SixtNov 21, 2016
  34. Junio C HamanoNov 21, 2016
  35. Johannes SixtNov 21, 2016
  36. Junio C HamanoNov 21, 2016
  37. Johannes SixtNov 21, 2016
  38. Johannes SchindelinNov 22, 2016
  39. Duy NguyenNov 22, 2016
  40. Jacob KellerNov 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.