-
Notifications
You must be signed in to change notification settings - Fork 2.7k
pack-refs --all
fails when temporary .lock
file is longer than MAX_PATH
but ref name is shorter than MAX_PATH
(core.longPaths
enabled)
#1218
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
Comments
pack-refs --all
fails with core.longPaths
enabled when temporary .lock
file is longer than MAX_PATH
but ref name is shorter than MAX_PATH
pack-refs --all
fails when temporary .lock
file is longer than MAX_PATH
but ref name is shorter than MAX_PATH
pack-refs --all
fails when temporary .lock
file is longer than MAX_PATH
but ref name is shorter than MAX_PATH
pack-refs --all
fails when temporary .lock
file is longer than MAX_PATH
but ref name is shorter than MAX_PATH
(core.longPaths
enabled)
I took a good look at this, and it would appear that A quick workaround would be to call However, I find that too fragile, as it only affects the |
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing git-for-windows#1218 Signed-off-by: Johannes Schindelin <[email protected]>
Phew. This took much longer than I expected. The real problem with my original idea "to fix this for good" was that there is a Catch-22: the first time the config is read, That is not the only problem, though: the first time we read a file is typically done before any Therefore, I decided in the end that the best course of action is the pragmatic (if slightly unsatisfying) one to run the entire test suite after instrumenting the code to detect when It is slightly unsatisfying because it leaves the door wide open for future breakages, as the instrumentation is expensive and cannot be used in production, and is too ugly to even merge into This took a while longer than I intended, as I mentioned above, and I pushed the current version (including the instrumentation patch that will be removed before merging). I will try to run a couple more tests on this branch, just to make sure that there is nothing obvious wrong with it, maybe after the weekend, though. |
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
The `core.longPaths` setting [is now heeded when packing refs](git-for-windows/git#1218), and other previously forgotten Git commands. Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows supports the core.longPaths config setting to allow writing/reading long paths via the \\?\ trick for a long time now. However, for that support to work, it is absolutely necessary that git_default_config() is given a chance to parse the config. Otherwise Git will be non the wiser. So let's make sure that as many commands that previously failed to parse the core.* settings now do that, implicitly enabling long path support in a lot more places. Note: this is not a perfect solution, and it cannot be, as there is a chicken-and-egg problem in reading the config itself... This fixes #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing git-for-windows#1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
A ton of Git commands simply do not read (or at least parse) the core.* settings. This is not good, as Git for Windows relies on the core.longPaths setting to be read quite early on. So let's just make sure that all commands read the config and give platform_core_config() a chance. This patch teaches tons of Git commands to respect the config setting `core.longPaths = true`, including `pack-refs`, thereby fixing #1218 Signed-off-by: Johannes Schindelin <[email protected]>
Setup
defaults? Defaults, I think:
to the issue you're seeing?
If the full ref path is longer than 260 characters, everything works as intended. This only seems to repro when the full ref path is under 260 without
.lock
but over 260 with.lock
Details
From a git bash prompt, assuming you can use
/d/
as a temporary drive path for testing...pack-refs --all
succeedsThe text was updated successfully, but these errors were encountered: