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

Re: [PATCH] add core.pathspecGlob config option

From
Jeff King <peff@peff.net>
Date
Dec 20, 2012, 04:11 UTC
Message-ID
<20121220041141.GA23798@sigill.intra.peff.net>
In-Reply-To
<20121220040602.GA15172@sigill.intra.peff.net>
On Wed, Dec 19, 2012 at 11:06:02PM -0500, Jeff King wrote:
Show 15 quoted lines
> > I don't think we can make a change in simple_length. It gets used not
> > only for pathspecs, but also for parsing exclude patterns, which I do
> > not think should be affected by this option.
> 
> Our test suite wouldn't catch such a misfeature, of course, because the
> feature is not turned on by default. But I found it instructive to run
> all of the tests with GIT_LITERAL_PATHSPECS on. There are failures, of
> course, but by inspecting each failure you can see that it is an
> intended effect of the patch (i.e., each tries to use a wildcard
> pathspec, which no longer works).
> 
> When you suggested changing common_prefix, I ran such a test both with
> and without the change[1] and confirmed that it did not change the set
> of failure sites. I did not try it, but I suspect running such a test
> with the tip of pu would reveal new failures in the .gitignore tests.
I just tried it, and indeed, running the test suite with this patch:
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 256f1c6..1c43593 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -102,6 +102,9 @@ export EDITOR
 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
 export EDITOR
 
+GIT_LITERAL_PATHSPECS=1
+export GIT_LITERAL_PATHSPECS
+
 # Add libc MALLOC and MALLOC_PERTURB test
 # only if we are not executing the test with valgrind
 if expr " $GIT_TEST_OPTS " : ".* --valgrind " >/dev/null ||


produces many more failures on "pu" than it does on jk/pathspec-literal.

-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 17 of 18 in “add core.pathspecGlob config option”
  1. add core.pathspecGlob config optionJeff King, Dec 19, 2012
  2. Junio C HamanoDec 19, 2012
  3. Jeff KingDec 19, 2012
  4. add GIT_PATHSPEC_GLOB environment variableJeff King, Dec 19, 2012
  5. Junio C HamanoDec 19, 2012
  6. Jeff KingDec 19, 2012
  7. Junio C HamanoDec 19, 2012
  8. Jeff KingDec 19, 2012
  9. Jeff KingDec 19, 2012
  10. Junio C HamanoDec 19, 2012
  11. Jeff KingDec 19, 2012
  12. Nguyen Thai Ngoc DuyDec 20, 2012
  13. Jeff KingDec 20, 2012
  14. Junio C HamanoDec 20, 2012
  15. Jeff KingDec 20, 2012
  16. Jeff KingDec 20, 2012
  17. Jeff KingDec 20, 2012
  18. Junio C HamanoDec 20, 2012

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.