git-annex/Git
Joey Hess 4611813ef1
Fix bug importing from a special remote into a subdirectory more than one level deep
Which generated unusual git trees that could confuse git merge,
since they incorrectly had 2 subtrees with the same name.

Root of the bug was a) not testing that at all! but also
b) confusing graftdirs, which contains eg "foo/bar" with
non-recursively read trees, which would contain eg "bar"
when reading a subtree of "foo".

It's worth noting that Annex.Import uses graftTree, but it really
shouldn't have needed to. Eg, when importing into foo/bar from a remote,
it's enough to generate a tree of foo/bar/x, foo/bar/y, and does not
include other files that are at the top of the master branch. It uses
graftTree, so it does include the other files, as well as the foo/bar
tree. git merge will do the same thing for both trees. With that said,
switching it away from graftTree would result in another import
generating a new commit that seems to delete files that were there in a
previous commit, so it probably has to keep using graftTree since it
used it before.

This commit was sponsored by Kevin Mueller on Patreon.
2021-03-26 16:04:36 -04:00
..
Command
Remote
AutoCorrect.hs
Branch.hs
BuildVersion.hs
CatFile.hs
CheckAttr.hs mincopies 2021-01-06 14:15:19 -04:00
CheckIgnore.hs more RawFilePath conversion 2020-11-03 10:11:04 -04:00
Command.hs remove zombie process in file seeking 2020-09-25 11:38:42 -04:00
Config.hs convert git config reading to use hGetLineUntilExitOrEOF 2020-11-19 15:38:43 -04:00
ConfigTypes.hs
Construct.hs avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
Credential.hs
CurrentRepo.hs avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
DiffTree.hs more RawFilePath conversion 2020-10-28 15:55:30 -04:00
DiffTreeItem.hs
Env.hs
FileMode.hs
Filename.hs add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
FilePath.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
Fsck.hs converted reads from stderr to use hGetLineUntilExitOrEOF 2020-11-19 16:21:17 -04:00
GCrypt.hs Fix support for local gcrypt repositories with a space in their URI 2021-03-09 12:49:51 -04:00
HashObject.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
History.hs
Hook.hs fix build on windows 2020-11-20 12:53:25 -04:00
Index.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
LockFile.hs
LsFiles.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
LsTree.hs add git ls-tree --long parser 2021-03-23 12:47:00 -04:00
Merge.hs update comments 2020-09-07 13:03:51 -04:00
Objects.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
Queue.hs Git.Queue: allow providing git common options like -c 2021-01-04 12:51:55 -04:00
Ref.hs Sped up git-annex init in a clone of an existing repository 2021-03-23 15:23:13 -04:00
RefLog.hs
Remote.hs Fix support for local gcrypt repositories with a space in their URI 2021-03-09 12:49:51 -04:00
Repair.hs add git ls-tree --long parser 2021-03-23 12:47:00 -04:00
Sha.hs
Ssh.hs
Status.hs
Tree.hs Fix bug importing from a special remote into a subdirectory more than one level deep 2021-03-26 16:04:36 -04:00
Types.hs avoid crashing when there are remotes using unparseable urls 2021-01-18 14:59:08 -04:00
UnionMerge.hs
UpdateIndex.hs more RawFilePath conversion 2020-10-30 15:55:59 -04:00
Url.hs avoid partial functions in Git.Url 2021-01-18 15:07:23 -04:00
Version.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00