Skip to content

Commit d4a04f1

Browse files
Fixed: subrepo push fails in submodule
The creation of the temporary worktree failed because the temporary path was hard coded to be under the folder .git, which does not exist for submodules (or worktrees, in fact). Replaced it with a call to git rev-parse --git-dir, which supports all scenarios.
1 parent 5d6aba9 commit d4a04f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git-subrepo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bash+:import :std can
2828

2929
VERSION=0.4.0
3030
REQUIRED_GIT_VERSION=2.7.0
31-
GIT_TMP=.git/tmp
31+
GIT_TMP="$(git rev-parse --git-dir)/tmp"
3232

3333
# `git rev-parse` turns this into a getopt parser and a command usage message:
3434
GETOPT_SPEC="\

0 commit comments

Comments
 (0)