From 4131e31f5c5ff540c6a22c60496e199a4d5ff634 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 22 May 2024 04:26:36 -0400 Subject: [PATCH] PATH_MAX --- ...deal_with_git_fsck_symlinkPointsToGitDir.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/todo/deal_with_git_fsck_symlinkPointsToGitDir.mdwn b/doc/todo/deal_with_git_fsck_symlinkPointsToGitDir.mdwn index 7f9bc2fd03..9c2f2e0a06 100644 --- a/doc/todo/deal_with_git_fsck_symlinkPointsToGitDir.mdwn +++ b/doc/todo/deal_with_git_fsck_symlinkPointsToGitDir.mdwn @@ -24,3 +24,19 @@ configs. Is it at all common to set `git config fetch.fsckObjects true` or `git config receive.fsckObjects` true? + +---- + +There is also potential breakage from git fsck now warning about symlink +targets that exceed `PATH_MAX`. On Windows, that is 260. A SHA512 key has a +symlink target of at least length 306. And even shorter keys, when located +in deep subdirectories, can have longer symlink targets than that. So +pushing to a bare repo on Windows could fail, for example. It even seems +likely this could affect pushing to Freebsd in some cases, since its +`PATH_MAX` is 1024 to Linux's 4096. + +If git-annex wanted to also avoid this breakage, it could set: + + git config fsck.symlinkTargetLength ignore + git config receive.fsck.symlinkTargetLength ignore + git config fetch.fsck.symlinkTargetLength ignore