git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: "Giuseppe Crinò" <giuscri@gmail.com>
Cc: johannes.schindelin@gmx.de, angelomelonas@gmail.com, git@vger.kernel.org
Subject: Re: Possible minor bug in Git
Date: Fri, 8 Feb 2019 17:43:16 +0000	[thread overview]
Message-ID: <20190208174315.nnljdpbh4nyoxgd7@tb-raspi4> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1902072040360.41@tvgsbejvaqbjf.bet>

On Fri, Feb 08, 2019 at 04:18:23PM +0100, Giuseppe Crinò wrote:
> OK, I successfully built git on Windows (thanks Johannes!) and I'm now able to run it.
>
> As of 9f16cdd I can successfully reproduce the bug.
>
> Interestingly enough, I can reproduce the bug even for /usr/bin/git running inside Windows Subsystem for Linux. Part of the reason might be that both relies on the same lstat() call... (Note: `stat` inside the WSL is case _insensitive_).
>
> Now: what is the expected result for git running inside Windows? Should it die saying "fatal: pathspec ... did not match any files"?
>
> If that's the case, is the following a valid test case?
>
> 	diff --git a/t/t3700-add.sh b/t/t3700-add.sh
> 	index 8ee4fc70ad..fadd7c74f6 100755
> 	--- a/t/t3700-add.sh
> 	+++ b/t/t3700-add.sh
> 	@@ -61,6 +61,11 @@ test_expect_success 'git add: filemode=0 should not get confused by symlink' '
> 		test_mode_in_index 120000 xfoo2
> 	 '
>
> 	+test_expect_success 'git add: pathspec is case-sensitive' '
> 	+       echo new > file &&
> 	+       test_must_fail git add File
> 	+'
> 	+

In general, yes.
There are 2 comments:
This the "echo" line should have no ' ' after the '>':

	echo new >file &&

The other question is,
if we should move that test case into t0050-filesystem.sh,
but that is a matter of taste.

diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 192c94eccd..b8d6bad97a 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -106,6 +106,11 @@ test_expect_failure CASE_INSENSITIVE_FS 'add (with different case)' '
        test "z$(git cat-file blob :$camel)" = z1
	 '

+test_expect_success CASE_INSENSITIVE_FS 'add (with wrong case)' '
+       git reset --hard initial &&
+       test_must_fail git add CAMELCASE
+'
+


  reply	other threads:[~2019-02-08 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  7:01 Possible minor bug in Git Angelo Melonas
2019-01-31  7:29 ` Angelo Melonas
2019-01-31 20:34   ` Torsten Bögershausen
2019-02-01  8:02     ` Angelo Melonas
2019-02-02  6:38       ` Torsten Bögershausen
2019-02-06 22:17         ` Giuseppe Crinò
2019-02-07 19:41           ` Johannes Schindelin
2019-02-08 17:43             ` Torsten Bögershausen [this message]
2019-02-09 18:19             ` Philip Oakley
2019-02-10 22:46               ` Giuseppe Crino'

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190208174315.nnljdpbh4nyoxgd7@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=angelomelonas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=giuscri@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).