diff options
author | 2013-08-01 15:15:49 -0400 | |
---|---|---|
committer | 2013-08-01 15:15:49 -0400 | |
commit | 873054e26ee1a3b64d6fc7132519a0f044fcb523 (patch) | |
tree | 5bf5cdfeeaa68ba721d7b18f01618ac588115807 /debian | |
parent | 17d01871b9be30abc69dc2e71891b61daaff4357 (diff) |
Escape ':' in file/directory names to avoid it being treated as a pathspec by some git commands
A git pathspec is a filename, except when it starts with ':', it's taken
to refer to a branch, etc. Rather than special case ':', any filename
starting with anything unusual is prefixed with "./"
This could have been a real mess to deal with, but luckily SafeCommand
is already extensively used and so we know at the type level the difference
between parameters that are files, and parameters that are command options.
Testing did show that Git.Queue was not using SafeCommand on
filenames fed to xargs. (Filenames starting with '-' worked before only
because -- was used to separate filenames from options when calling eg git
add.)
The test suite now passes with filenames starting with ':'. However, I did
not keep that change to it, because such filenames are probably not legal
on windows, and I have enough ugly windows ifdefs in there as it is.
This commit was sponsored by Otavio Salvador. Thanks!
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 479216165..b5d1211b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,8 @@ git-annex (4.20130724) UNRELEASED; urgency=low * Fix a few bugs involving filenames that are at or near the filesystem's maximum filename length limit. * find: Avoid polluting stdout with progress messages. Closes: #718186 + * Escape ':' in file/directory names to avoid it being treated + as a pathspec by some git commands. Closes: #718185 -- Joey Hess <joeyh@debian.org> Tue, 23 Jul 2013 12:39:48 -0400 |