about summary refs log tree commit diff
path: root/overlays/base/patches/git-crypt-worktrees.patch
blob: 908dad87dd8bb9e0b0c008838529c3d7b23b42ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/commands.cpp b/commands.cpp
index 81c401d..f825d7b 100644
--- a/commands.cpp
+++ b/commands.cpp
@@ -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;
 }