Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Win32: fix checkout problem with directories exceeding MAX_PATH #212

Merged
merged 6 commits into from
Jul 23, 2014

Conversation

kblees
Copy link

@kblees kblees commented Jul 2, 2014

This fixes issue msysgit/msysgit#227
TODO: change symlinks.c upstream to use strbuf instead of fixed length buffers.

@t-b
Copy link

t-b commented Jul 3, 2014

Is that bug also present in master?

@dscho
Copy link
Member

dscho commented Jul 3, 2014

TODO: change symlinks.c upstream to use strbuf instead of fixed length buffers.

@kblees do you want to address that before or after the merge?

@dscho
Copy link
Member

dscho commented Jul 3, 2014

Is that bug also present in master?

Yes. I cherry-picked it.

@dscho
Copy link
Member

dscho commented Jul 3, 2014

Is that bug also present in master?

Yes. I cherry-picked it.

Wooooow! I should not have done that. Not at all.

@kblees we cannot use MAX_LONG_PATH in symlinks.c, as you undoubtedly know, but I mistook your TODO for a "nice to have" rather than "this will break anywhere but Windows" ;-)

I am pretty confident that I unbroke it (BuildHive did not yet respond, but I am sure it will) with these three commits: d49a708...b31f626

@kblees could you have a look and adjust the PR accordingly? It really should apply very cleanly, and I'd suggest moving the strbuf patch to be the first of the two commits.

@kblees
Copy link
Author

kblees commented Jul 4, 2014

@dscho sorry for the mess, I probably should have marked this as preliminary more clearly.

This round compiles and passes the test suite on both Windows (on the maint-1.9 branch, master seems to be completely broken ATM) and Linux (Junio's master).

Also fixes a segfault in git-status with long paths.

@buildhive
Copy link

MSysGit - the development behind Git for Windows » git #240 SUCCESS
This pull request looks good
(what's this?)

@dscho
Copy link
Member

dscho commented Jul 5, 2014

master seems to be completely broken ATM

I only noticed when I started playing with my shiny new Windows VM (sponsored by Microsoft!) that there were test failures. However, last time I ran the test suite on master on my crappy old Windows VM (where it took all of 6 hours (!) to pass), there were no failures...

kblees and others added 6 commits July 14, 2014 14:34
'git checkout' fails if a directory is longer than PATH_MAX, because the
lstat_cache in symlinks.c checks if the leading directory exists using
PATH_MAX-bounded string operations.

Remove the limitation by using strbuf instead.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rename cache_def_free to cache_def_clear as it doesn't free the struct
cache_def, but just clears its content.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
There is no actual nested struct here. Move it out for clarity.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
This also fixes the problem of silently ignoring .gitignore if the
full path exceeds PATH_MAX. Now add_excludes_from_file() will report
if it gets ENAMETOOLONG.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
Use a suffciently large buffer to strip the trailing slash.

Signed-off-by: Karsten Blees <blees@dcon.de>
@kblees
Copy link
Author

kblees commented Jul 14, 2014

Updated the PR with the patches that are queued upstream.

@buildhive
Copy link

MSysGit - the development behind Git for Windows » git #242 SUCCESS
This pull request looks good
(what's this?)

@t-b
Copy link

t-b commented Jul 23, 2014

I've seen that nd/path-max-must-go was merged upstream. The others also?

@kblees
Copy link
Author

kblees commented Jul 23, 2014

@t-b everything is in upstream/master except for the last patch, which depends on long path support

@t-b
Copy link

t-b commented Jul 23, 2014

@kblees Thanks. So, just to be sure, we can merge the PR to maint-1.9?

@kblees
Copy link
Author

kblees commented Jul 23, 2014

@t-b Yes, ready to merge

@t-b
Copy link

t-b commented Jul 23, 2014

The test suite runs trough with this PR. Only some svn tests have the usual problems.

t-b added a commit that referenced this pull request Jul 23, 2014
…ries

Win32: fix checkout problem with directories exceeding MAX_PATH
@t-b t-b merged commit e7dee84 into msysgit:maint-1.9 Jul 23, 2014
@fetis
Copy link

fetis commented Aug 6, 2014

When this will be released? I need it sooooo much

@dscho
Copy link
Member

dscho commented Aug 6, 2014

@fetis we made it soooooo easy to make your own installer from the current master. ;-)

Why don't you give it a try?

@fetis
Copy link

fetis commented Aug 7, 2014

I did and it's unclear for me how can I build HEAD of maint-1.9 branch. It always reset to v1.9.4.msysgit.0 tag :((

@t-b
Copy link

t-b commented Aug 7, 2014

@fetis
Copy link

fetis commented Aug 7, 2014

I read it twice. My set of command is

cd git
git remote add junio https://github.com/git/git.git
git remote update junio origin
git fetch junio --tags
git checkout maint-1.9
git pull origin maint-1.9
git checkout -b tentative-maint-1.9
git branch -u origin/maint-1.9
/share/msysgit/merging-rebase.sh maint-1.9

cd /
version=1.9.5
git_tag=v$version.msysgit.0
msysgit_tag=$version-preview`date +"%Y%m%d"`
# Tag /git
git tag -a -m "Git $version" $git_tag
# Commit the submodules
git commit -m "Commit submodule in preparation of $version" git doc/git/html src/git-cheetah

/share/WinGit/release.sh $msysgit_tag

but it stull use 1.9.4

@fetis
Copy link

fetis commented Aug 11, 2014

any help on this?

dscho added a commit that referenced this pull request Dec 19, 2014
…ries

Win32: fix checkout problem with directories exceeding MAX_PATH
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants