Hi Christian! > Stefan Reichör, 2007-07-09: > >> xhg-dvc-edit-ignore-files expected dvc-tree-root to return a >> directory path ending in '/' The new dvc-tree-root function returns >> the directory name without the trailing '/'. >> >> The mentioned patch fixes the path issue. > > Thanks for the explanation. I investigated this in some more detail. > It turns out that `dvc-tree-root' is not involved here; the real > problem is that `dvc-find-tree-root-file-first' returns a directory > name with no terminating slash. > > The function `dvc-uniquify-file-name' is a really big hammer that is > almost never needed. It would be preferable to remove it entirely > since its existence seems to seduce people into using it even when > it's overkill. The function seems convenient at first but is usually > not what you want because it has the undesirable side-effect of > expanding symlinks in the file name. Also, in situations like this, > it is just a way to cover up a problem in a different part of the > code. > > In this case, a simple call to `file-name-as-directory' in the right > place (in `dvc-find-tree-root-file-first') did the trick and prevents > other related problems as well. I replaced your fix with this one in > my branch.
Thanks for the detailed analysis. I agree that your solution works well. Stefan. _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
