Closed dkogan closed 5 years ago
I was trying to reproduce this to see if diff-path
needed the same treatment (as per your discussion with Jim), but I can't figure out how to get into the situation you mention. What VCS were you using and was the symlink outside the repo pointing in, or inside the repo pointing outside?
This looks like an obvious fix, I just can't figure out how to get into the scenario.
David Caldwell notifications@github.com writes:
I was trying to reproduce this to see if
diff-path
needed the same treatment (as per your discussion with Jim), but I can't figure out how to get into the situation you mention. What VCS were you using and was the symlink outside the repo pointing in, or inside the repo pointing outside?
This was with SVN. The real file contained in the VCS was called Makefile.something. There was also a symlink
Makefile -> Makefile.something
Both live in the repo. Since there's very little reason for both of these to exist, I primarily only touch "Makefile", even though the actual file name is "Makefile.something"
Just hit this again. The patch buffer was referring to the actual file (Makefile.sometihng) and was correct, but commit-patch barfs. Any reason to not merge this?
barfs thusly:
/bin/sh: 8101: cd: can't cd to /home/dima/blah/blah/blah/Makefile/
It can't cd there because "Makefile" is a symlink as described above, not a directory.
This bug has another component apparently. The 'default-directory' of the commit buffer was wrong (it was from some previous commit). This always happens and generally doesn't cause a problem. Except here it did. M-x cd to the current project fixed it.
Just hit this again. Can we merge this? Please?
Prior to this patch you could have a scenario where
Since (autodetect-patch-directory-root) comparse paths, this would make the comparison fail in the wrong place, and (autodetect-patch-directory-root) would return a wrong result