* admin/gitmerge.el (gitmerge-maybe-resume): Use 'git rev-parse
--git-dir' to find the git directory rather than assuming it is
.git/ (that assumption fails for separated worktrees).
(defun gitmerge-maybe-resume ()
"Check if we have to resume a merge.
If so, add no longer conflicted files and commit."
- (let ((mergehead (file-exists-p
- (expand-file-name ".git/MERGE_HEAD" default-directory)))
+ (let ((mergehead
+ (file-exists-p
+ (expand-file-name
+ "MERGE_HEAD"
+ (car (process-lines
+ "git" "rev-parse" "--no-flags" "--git-dir")))))
(statusexist (file-exists-p gitmerge-status-file)))
(when (and mergehead (not statusexist))
(user-error "Unfinished merge, but no record of a previous gitmerge run"))