git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH jk/pathspec-literal] t6130-pathspec-noglob: Windows does not allow a file named "f*"
@ 2013-01-06 14:07 Johannes Sixt
  2013-01-06 14:33 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2013-01-06 14:07 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, Git Mailing List, msysGit

Windows disallows file names that contain a star. Arrange the test setup
to insert the file name "f*" in the repository without the corresponding
file in the worktree.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t6130-pathspec-noglob.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/t/t6130-pathspec-noglob.sh b/t/t6130-pathspec-noglob.sh
index bb5e710..39ef619 100755
--- a/t/t6130-pathspec-noglob.sh
+++ b/t/t6130-pathspec-noglob.sh
@@ -6,7 +6,13 @@ test_description='test globbing (and noglob) of pathspec limiting'
 test_expect_success 'create commits with glob characters' '
 	test_commit unrelated bar &&
 	test_commit vanilla foo &&
-	test_commit star "f*" &&
+	# insert file "f*" in the commit, but in a way that avoids
+	# the name "f*" in the worktree, because it is not allowed
+	# on Windows (the tests below do not depend on the presence
+	# of the file in the worktree)
+	git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
+	test_tick &&
+	git commit -m star &&
 	test_commit bracket "f[o][o]"
 '
 
-- 
1.8.1.1672.g5e2a3d4.dirty

-- 
*** 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH jk/pathspec-literal] t6130-pathspec-noglob: Windows does not allow a file named "f*"
  2013-01-06 14:07 [PATCH jk/pathspec-literal] t6130-pathspec-noglob: Windows does not allow a file named "f*" Johannes Sixt
@ 2013-01-06 14:33 ` Jeff King
  2013-01-06 20:00   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2013-01-06 14:33 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Junio C Hamano, Git Mailing List, msysGit

On Sun, Jan 06, 2013 at 03:07:43PM +0100, Johannes Sixt wrote:

> Windows disallows file names that contain a star. Arrange the test setup
> to insert the file name "f*" in the repository without the corresponding
> file in the worktree.
> [...]
> -	test_commit star "f*" &&
> +	# insert file "f*" in the commit, but in a way that avoids
> +	# the name "f*" in the worktree, because it is not allowed
> +	# on Windows (the tests below do not depend on the presence
> +	# of the file in the worktree)
> +	git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
> +	test_tick &&
> +	git commit -m star &&

Thanks, looks obviously correct to me.

Sorry to break Windows again. It seems I learn about a new gotcha with
every patch series. :)

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH jk/pathspec-literal] t6130-pathspec-noglob: Windows does not allow a file named "f*"
  2013-01-06 14:33 ` Jeff King
@ 2013-01-06 20:00   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2013-01-06 20:00 UTC (permalink / raw)
  To: Jeff King; +Cc: Johannes Sixt, Git Mailing List, msysGit

Jeff King <peff@peff.net> writes:

> On Sun, Jan 06, 2013 at 03:07:43PM +0100, Johannes Sixt wrote:
>
>> Windows disallows file names that contain a star. Arrange the test setup
>> to insert the file name "f*" in the repository without the corresponding
>> file in the worktree.
>> [...]
>> -	test_commit star "f*" &&
>> +	# insert file "f*" in the commit, but in a way that avoids
>> +	# the name "f*" in the worktree, because it is not allowed
>> +	# on Windows (the tests below do not depend on the presence
>> +	# of the file in the worktree)
>> +	git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
>> +	test_tick &&
>> +	git commit -m star &&
>
> Thanks, looks obviously correct to me.
>
> Sorry to break Windows again. It seems I learn about a new gotcha with
> every patch series. :)

Thanks, both.

It appears that pushing things earlier to 'next' (and unfortunately
even to 'master') rather than later seems to be the only way to help
catching little gotchas like this ;-).

-- 
*** 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-06 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-06 14:07 [PATCH jk/pathspec-literal] t6130-pathspec-noglob: Windows does not allow a file named "f*" Johannes Sixt
2013-01-06 14:33 ` Jeff King
2013-01-06 20:00   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).