On Sat, Jul 27, 2013 at 11:05 PM, Ramkumar Ramachandra <artag...@gmail.com> wrote: > Here's your reduced testcase. Just point mygit to a HEAD build. > > #!/bin/sh > > mygit=~/src/git/git > cd /tmp > $mygit clone https://github.com/artagnon/clayoven > cd clayoven > $mygit submodule add https://github.com/lewang/flx .elisp/flx > $mygit commit -a -m "Added submodule" > cd /tmp > ln -s clayoven/.elisp > cd .elisp/flx > EDITOR="emacs -Q" git commit --amend > # buffer-file-name = "/tmp/.git/modules/.elisp/flx/COMMIT_EDITMSG"
Here cwd is /tmp/.elisp/flx but "setup: cwd: " returns /tmp/clayoven/.elisp/flx. The COMMIT_EDITMSG path is ../../.git/modules/.elisp/flx/COMMIT_EDITMSG. If you follow the former cwd (without symlink resolution), you end up at /tmp/.git/modules. If you follow the latter cwd, you end up at /tmp/clayoven/.git/modules... I think instead of letting the kernel walk the path, emacs does it by itself. Still looking for documents about this behavior.. > Note that this is emacs 24.3. I used -Q to make sure that none of my > init magic (magit etc.) was responsible for changing directories or > doing something equally stupid. However, considering that it's > impossible to reproduce the problem with either cat or vim as the > EDITOR, you might be inclined to classify this as an Emacs bug. In > that case, why can't I reproduce it without submodules? > > I'm going off to eat cake before I tear my hair out in frustration. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html