Bug fix: Fix tilde expansion in ssh urls when the tilde is the last character in...
authorJoey Hess <joeyh@joeyh.name>
Mon, 18 Jan 2021 16:22:48 +0000 (12:22 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 18 Jan 2021 16:22:48 +0000 (12:22 -0400)
CHANGELOG
Git/Construct.hs
doc/bugs/__91__PATCH__93___incorrect_behaviour_in_expandTilde.mdwn

index bf34053c93d8c3693f962683d96e178e23cbc584..6fa41b9f72b7380c8e2e5e40052a53c296ccfac3 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -25,6 +25,9 @@ git-annex (8.20201130) UNRELEASED; urgency=medium
     Thanks, Kyle Meyer for the patch.
   * Windows: Work around win32 length limits when dealing with lock files.
   * Bug fix: export with -J could fail when two files had the same content.
+  * Bug fix: Fix tilde expansion in ssh urls when the tilde is the last
+    character in the url.
+    Thanks, Grond for the patch.
 
  -- Joey Hess <id@joeyh.name>  Mon, 04 Jan 2021 12:52:41 -0400
 
index 8b63ac48029ee93f166f29f402cbda89cc3787ed..a369bc4a66dc63614eef3f3a5dfdf50b69b1be42 100644 (file)
@@ -187,6 +187,7 @@ expandTilde = expandt True
        expandt True ('~':'/':cs) = do
                h <- myHomeDir
                return $ h </> cs
+       expandt True "~" = myHomeDir
        expandt True ('~':cs) = do
                let (name, rest) = findname "" cs
                u <- getUserEntryForName name
index 9e965967c88d231773a22abb29c578185c5f6425..c3211cd7a43e897b4b2c5938e5e77e15207362c4 100644 (file)
@@ -140,3 +140,5 @@ local repository version: 5
 ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
 
 Definitely! I'm currently writing some personal file synchronization software that uses git-annex for myself, which is how I noticed this bug.
+
+> Thanks for a perfect bug report and patch. [[done]] --[[Joey]]