diff options
author | 2013-09-25 13:16:55 -0400 | |
---|---|---|
committer | 2013-09-25 13:16:55 -0400 | |
commit | d2b503f7edb486f31545633fc7c7b4a9999a271e (patch) | |
tree | 23b3358c665ce917e1f53858c5d6f844b4b09b5f | |
parent | 13cb0a0e733773e16dd2dd9f79d1bddc5440cd60 (diff) |
import: Preserve top-level directory structure.
-rw-r--r-- | Seek.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 5 |
3 files changed, 4 insertions, 4 deletions
@@ -60,7 +60,7 @@ withPathContents :: ((FilePath, FilePath) -> CommandStart) -> CommandSeek withPathContents a params = map a . concat <$> liftIO (mapM get params) where get p = ifM (isDirectory <$> getFileStatus p) - ( map (\f -> (f, makeRelative p f)) <$> dirContentsRecursive p + ( map (\f -> (f, makeRelative (parentDir p) f)) <$> dirContentsRecursive p , return [(p, takeFileName p)] ) diff --git a/debian/changelog b/debian/changelog index 4b51e2c88..09e395815 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ git-annex (4.20130921) UNRELEASED; urgency=low if you created one you must manually upgrade it. See http://git-annex.branchable.com/upgrades/gcrypt/ * git-annex-shell: Added support for operating inside gcrypt repositories. + * import: Preserve top-level directory structure. * Use cryptohash rather than SHA for hashing when no external hash program is available. This is a significant speedup for SHA256 on OSX, for example. diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index 25d9ecb46..f0c81f07f 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -206,10 +206,9 @@ subdirectories). Moves files from somewhere outside the git working copy, and adds them to the annex. Individual files to import can be specified. - If a directory is specified, all files in it are imported, and any - subdirectory structure inside it is preserved. + If a directory is specified, the entire directory is imported. - git annex import /media/camera/DCIM/ + git annex import /media/camera/DCIM/* By default, importing two files with the same contents from two different locations will result in both files being added to the repository. |