Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let amend mode load previous commit message even if the editor's working dir is outside the repo #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 29, 2024

  1. Amend loads prev. msg. even if CWD is outside repo

    The path to the ".git" directory returned by
    git rev-parse --git-dir
    and stored in "b:magit_git_dir", can be a relative one, which would not work for opening file
    "COMMIT_EDITMSG" when the currently edited file was opened from outside the
    repository, so we make "b:magit_git_dir" absolute via "git rev-parse --absolute-git-dir".
    
    Thanks to user v-slava for suggesting the use of --absolute-git-dir.
    Diego Caraffini authored and Diego Caraffini committed May 29, 2024
    Configuration menu
    Copy the full SHA
    eb7ad15 View commit details
    Browse the repository at this point in the history