Skip to content
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

Show an error if too-long paths are seen by git clean -dfx #219

Closed
wants to merge 1 commit into from

Conversation

dscho
Copy link
Member

@dscho dscho commented May 21, 2019

This is particularly important on Windows, where PATH_MAX is very small compared to Unix/Linux.

Changes since v1:

  • Matched the warning message style to existing ones,
  • Fixed test in multiple ways:
  • Avoiding touch in favor of : >.
  • Using test_config.
  • Using test_i18ngrep instead of grep to avoid localization problems.
  • Add helpful comments.
  • The commit message now talks about lstat() instead of stat().
  • The commit message also explains where that core.longpaths comes from.

Cc: René Scharfe l.s.r@web.de, SZEDER Gábor szeder.dev@gmail.com

@dscho dscho added the ready to submit Has commits that have not been submitted yet label May 21, 2019
@dscho dscho removed the ready to submit Has commits that have not been submitted yet label Jul 4, 2019
@dscho
Copy link
Member Author

dscho commented Jul 16, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Jul 16, 2019

Submitted as pull.219.git.gitgitgadget@gmail.com

Without an error message when `lstat()` failed, `git clean` would
abort without an error message, leaving the user quite puzzled.

In particular on Windows, where the default maximum path length is quite
small (yet there are ways to circumvent that limit in many cases), it is
very important that users be given an indication why their command
failed because of too long paths when it did.

This test case makes sure that a warning is issued that would have
helped the user who reported this issue:

	git-for-windows#521

Note that we temporarily set `core.longpaths = false` in the regression
test; This ensures forward-compatibility with the `core.longpaths`
feature that has not yet been upstreamed from Git for Windows.

Helped-by: René Scharfe <l.s.r@web.de>
Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Jul 18, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Jul 18, 2019

Submitted as pull.219.v2.git.gitgitgadget@gmail.com

@gitgitgadget
Copy link

gitgitgadget bot commented Jul 18, 2019

This branch is now known as js/clean-report-too-long-a-path.

@gitgitgadget
Copy link

gitgitgadget bot commented Jul 18, 2019

This patch series was integrated into pu via git@6951336.

@gitgitgadget gitgitgadget bot added the pu label Jul 18, 2019
@gitgitgadget
Copy link

gitgitgadget bot commented Jul 18, 2019

This patch series was integrated into pu via git@8fc59a0.

@dscho
Copy link
Member Author

dscho commented Oct 27, 2019

This made it into master already, as gitster@b09364c.

@dscho dscho closed this Oct 27, 2019
@dscho dscho deleted the clean-long-paths branch October 27, 2019 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant