Re: t0008-ignores failure

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: t0008-ignores failure

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:30

Karsten Blees [off-list ref] writes:
I realize colon was chosen to mimic git-check-attr, however,
check-attr prints relative paths only (I think?).

How about using TAB or '|' instead? AFAICT, these are typically
not used in paths or glob patterns.
The primary reason to use ':' in "check-ignore -v" is to mimic the
output format of "grep -n".

Emacs users can then run the commands like check-attr/check-ignore
with "M-x find-grep" (or "M-x compile"), the output format is
recognized by the editor, and the user can jump around with \C-x` to
view hits.

I do not use vim myself, but I would be mildly surprised if there
isn't a similar feature there.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: t0008-ignores failure

From: Jeff King <hidden>
Date: 2016-06-15 22:57:30

On Wed, May 29, 2013 at 07:21:51PM -0700, Junio C Hamano wrote:
Karsten Blees [off-list ref] writes:
quoted
I realize colon was chosen to mimic git-check-attr, however,
check-attr prints relative paths only (I think?).

How about using TAB or '|' instead? AFAICT, these are typically
not used in paths or glob patterns.
The primary reason to use ':' in "check-ignore -v" is to mimic the
output format of "grep -n".

Emacs users can then run the commands like check-attr/check-ignore
with "M-x find-grep" (or "M-x compile"), the output format is
recognized by the editor, and the user can jump around with \C-x` to
view hits.

I do not use vim myself, but I would be mildly surprised if there
isn't a similar feature there.
It does (it is how my "git jump" command feeds marks to vim). Usually we
would quote ambiguous pathnames, but I think we do not here to retain
compatibility with that microformat. Readers that care about quoting
should use "-z" to get unambiguous output. And indeed, it seems that
check-ignore behaves reasonably in this case. The tests fail because the
test script itself is lazy. It does:

  sed -e 's/      "/      /' -e 's/\\//' -e 's/"$//' expected-verbose | \
        tr ":\t\n" "\0" >expected-verbose0

which generates a bogus expectation; both the delimiter colons and any
in the fields are converted, whereas only the former should be.
Karsten's fix should work, or we could generate our expected output more
carefully.

Long ago we switched to putting a space into our trash directory name to
catch problems with such pathnames when we run the test suite. I wonder
if we should do the same with ":". Doing this:
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ca6bdef..5d84705 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -600,7 +600,7 @@ fi
 fi
 
 # Test repository
-TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)"
+TRASH_DIRECTORY="trash directory:$(basename "$0" .sh)"
 test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY"
 case "$TRASH_DIRECTORY" in
 /*) ;; # absolute path is good
reveals the breakage on Linux. And it seems that a lot of other tests
break, too. I haven't looked into them yet, though.

-Peff

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: t0008-ignores failure

From: Jeff King <hidden>
Date: 2016-06-15 22:57:30

On Wed, May 29, 2013 at 10:52:58PM -0400, Jeff King wrote:
quoted hunk
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ca6bdef..5d84705 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -600,7 +600,7 @@ fi
 fi
 
 # Test repository
-TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)"
+TRASH_DIRECTORY="trash directory:$(basename "$0" .sh)"
 test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY"
 case "$TRASH_DIRECTORY" in
 /*) ;; # absolute path is good
reveals the breakage on Linux. And it seems that a lot of other tests
break, too. I haven't looked into them yet, though.
Hrm. Just picking an example at random, t7006 fails because it uses
--exec-path="`pwd`". And of course colons are meaningful in any
PATH-like context. It would be nice to be able to handle that case
cleanly, but I think we would be breaking compatibility.

So while it would be nice to work on paths with colons everywhere, I
doubt it is worth the effort to start checking it through the whole test
suite.

-Peff

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Re: t0008-ignores failure

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:57:30

Am 30.05.2013 04:55, schrieb Jeff King:
So while it would be nice to work on paths with colons everywhere, I
doubt it is worth the effort to start checking it through the whole test
suite.
And on top of it, on Windows, you can't have a path component or file
name that contains a colon...

-- Hannes

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help