-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to 2.3.0 #27
Update to 2.3.0 #27
Conversation
@sschuberth @t-b This is the big update that targets MSys2. However, I need your help: two tests fail, still. The first one, t0027, seems to be (at least partially) due to the warning being printed that LF will be replaced by CRLF. The fix might be simply to disable the test, but I would really like to understand first why the same four tests pass on Linux but not with Windows. The second one, t0204, is even more curious. Apparently the Icelandic messages are mangled into some ISO encoding even when I disabled t9020 wholesale because I think it is too much work to work around the path mangling issues. If you disagree, please feel very free to drop this commit and to work on making it pass. |
203fbed
to
6a8a24a
Compare
BTW I do not think that our merging rebase script would handle it well if we merged this PR; I think the reviewer should push directly to git-for-windows' |
I was able to pass some tests in t0204 by changing the gettext command from gettext to /bin/gettext eg. test_expect_success GETTEXT_LOCALE 'gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic' '
printf "TILRAUN: Halló Heimur!" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" /bin/gettext "TEST: Hello World!" >actual &&
test_cmp expect actual Maybe that'll help you identifying the problem. |
@nalla oh, but those tests pass for me (but then, I ran them in a slightly odd way...)! The test that does not pass is the But you're correct, if I run the tests again with an MSys2 32-bit shell, there are more failures in |
Ah, I now notice that I ran my tests with |
Ah, and now I see that there is no |
Maybe the missing I dont think its a terminal issue. Because if you use the msys2 git ( |
Yep, it appears you are correct. See the latest commit. BTW are you okay with the credit? Or do you prefer to go by "Manuel"? |
마누엘 is ok. Yeah i also found out that locale is msys2 only by running |
@dscho Jeep I'd also say that the failings in t0027 stem from the recent changes 0291973. I've just installed msys2 according to the docs and run the git tests on win7pro x64. Only t0027 fails. I ran the tests with |
So the test failure in t0027 is as follows:
when adding the file
a warning message like
is outputted whereas the test expects no warning message here. |
I looked in But I dug a little deeper. If you set |
@nalla Good call. On mingw we have crlf as native eol. See https://github.com/git-for-windows/git/blob/master/config.mak.uname#L515. |
So we have two possibilites now? Either adapt the test when MinGW is used or do not run it when using MinGW. |
Yep, in my brief debugging tests, I saw that the Therefore, I am really puzzled and I think we'll have to single-step the problem on MSys2 and Linux simultaneously to figure out what is going wrong. If nobody beats me to it, I will do that next week. |
Hope there will be a binary release of MSYS2 with git 2.3.0, really great work from @dscho |
BTW I just checked with msysGit, and it looks as if the same four test cases of |
Success! d4dbf57 addresses the test failures; They were indeed caused by flawed assumptions of the test script. Before merging, I would like to reorder the new commits into the appropriate branches of the thicket (e.g. the test fixes into the To make it easier to see what I did, I think it is better to write a little helper to compare thickets: list commits that were dropped, ones that were added, ones that were replaced/split/squashed and reordered, and ones whose diffs or commit message had to be adjusted. I hope that it will not take a long time to write that helper ;-) |
@dscho Cool! |
On msys64 Installed msys2-runtime: |
@nalla hmm. I put in a work-around (60048d2) and hoped that that would suffice. Maybe you can put in some debug statements to find out? I.e. something like: diff --git a/compat/mingw.c b/compat/mingw.c
index 3437810..ea9b8d0 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -2241,9 +2241,11 @@ void mingw_startup()
* for escape characters.
*/
char *p;
+error("TMP before: %s", environ[i]);
for (p = environ[i]; *p; p++)
if (*p == '\\')
*p = '/';
+error("TMP after: %s", environ[i]);
}
}
environ[i] = NULL; |
Mmh. I get a segmentation fault when compiling git with that patch... |
Strange indeed. You should be able to identify which |
I think i know what's the problem now. When I start up the
When I change @dscho I believe that is that case sensitive environment variable thing again. Maybe the replace function should check for both variables. upper and undercase? |
Right. On Windows, environment variable names are case-insensitive, just like file names. |
I believe https://github.com/dscho/git/blob/update-to-2.3.0/compat/mingw.c#L2258 then needs an update too then. |
I thought I saw that the environment variable keys are up-cased somewhere... but maybe that was in the |
For the record, I squashed these two commits in, too: dscho/git@11ef22a^^...11ef22a (this lets the test suite pass also on MacOSX). |
Doh, you're right, I was somehow looking at the wrong diffs. My patch is in upstream git-gui, but Junio did not pull that yet.
It's the other way around: In msysgit we have a Long story short, I we must keep the patch here as neither the MSYS1-based nor the MSYS2-based Git SDK now ship with a |
@dscho I created a patch for |
@nalla very nice! Let's include your work before merging. (No stress with |
@dscho wile trying to fix $ mkdir w g
$ cd w
$ /usr/src/git/git.exe init
$ /usr/src/git/git.exe init --separate-git-dir ../g
# fatal: unable to move C:/path/to/w/.git to C:/path/to/g: Is a directory
$ git init --separate-git-dir ../g
# Reinitialized existing Git repository in /path/to/g/ https://github.com/git/git/blob/18d0fec24027ac226dc2c4df2b955eef2a16462a/builtin/init-db.c#L366 is the line that throws the error. somehow |
@nalla indeed, it looks as if the
However, Git for Windows has to use the So indeed, you found a bug, and the proper solution is to try to delete the directory (which will fail if the directory is not empty) and repeat. Something like this (beware: completely untested): diff --git a/compat/mingw.c b/compat/mingw.c
index fac8a11..ee5947e 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1655,7 +1655,12 @@ repeat:
if (gle == ERROR_ACCESS_DENIED &&
(attrs = GetFileAttributesW(wpnew)) != INVALID_FILE_ATTRIBUTES) {
if (attrs & FILE_ATTRIBUTE_DIRECTORY) {
- errno = EISDIR;
+ DWORD attrsold = GetFileAttributes(wpold);
+ if (attrsold == INVALID_FILE_ATTRIBUTES ||
+ !(attrsold & FILE_ATTRIBUTE_DIRECTORY))
+ errno = EISDIR;
+ else if (!_wrmdir(wpnew))
+ goto repeat;
return -1;
}
if ((attrs & FILE_ATTRIBUTE_READONLY) && |
@nalla would you have time to mangle this diff into a proper commit, test, and possibly fix? (I am awfully short on time today.) |
I'll do that, is a |
@nalla for me, the easiest would be a Pull Request (like the ones you already opened). But I can also use a formatted patch if that is more convenient for you. |
I issued PR dscho#8. It includes the svn test fixups and the fix for the mingw rename. |
git-svn test fixes
@sschuberth @t-b I really would like to move forward with this, in particular because version 2.3.1 is already out and I should continue with a merging rebase to said version... Is it okay with you? As discussed earlier, I would then simply push to (rather than merge with) |
@dscho Yes, please go ahead. I think this is good enough already. |
Okay, I actually already finished the merging rebase to 2.3.1 (these rebases are really much easier if you do them regularly), and the test suite passes on Linux (in just under 7.5 minutes); the test suite still runs on the Windows VM (I run it with |
... and on the Windows VM, after almost 160 minutes real time (~30 minutes user, ~55 minutes sys), the test suite passed! So I pushed the |
For the record, the MSYS(1)-based CI only reports 3 failures for Git 2.3.1 compared to 8 before. In particular, |
Yep, the 2 if test_have_prereq MINGW
then
case "$(uname -r)" in 1.0*)
function tr () {
/bin/tr.exe "$@" | dos2unix --force
}
;
esac
fi But I am reluctant to work on letting the test suite pass with the obsolete msysGit-built Git now, in particular when the issues are known to be fixed with MSys2-built Git... |
Thanks for investigating! I had a brief look and had to give up for the moment... |
…links virtualfilesystem: fix bug with symlinks being ignored
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
Add virtual file system settings and hook proc. On index load, clear/set the skip worktree bits based on the virtual file system data. Use virtual file system data to update skip-worktree bit in unpack-trees. Use virtual file system data to exclude files and folders not explicitly requested. The hook was first contributed in private, but was extended via the following pull requests: git-for-windows#15 git-for-windows#27 git-for-windows#33 git-for-windows#70 Signed-off-by: Ben Peart <[email protected]> Signed-off-by: Derrick Stolee <[email protected]>
This updates our code base to Git 2.3.0.