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

Move internal state dir to 'common' subdir in git path. (Fixes bug with multiple worktrees) #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,17 @@ static std::string get_internal_state_path ()
std::vector<std::string> command;
command.push_back("git");
command.push_back("rev-parse");
command.push_back("--git-dir");
command.push_back("--git-path");
command.push_back("common/git-crypt");

std::stringstream output;

if (!successful_exit(exec_command(command, output))) {
throw Error("'git rev-parse --git-dir' failed - is this a Git repository?");
throw Error("'git rev-parse --git-path common/git-crypt' failed - is this a Git repository?");
}

std::string path;
std::getline(output, path);
path += "/git-crypt";

return path;
}
Expand Down