Skip to content
Snippets Groups Projects
Commit d00519ce authored by Felix Gruber's avatar Felix Gruber Committed by Christoph Grüninger
Browse files

make dunecontrol compatible with git worktrees

In linked worktrees generated with `git worktree`, .git is a file
instead of a directory.

Since dunecontrol was only checking whether .git exists as a directory,
it didn't recognize linked worktrees as git repositories. This problem
can simply be fixed by additionally checking if .git exists as a regular
file.
parent b2d54827
No related branches found
No related tags found
No related merge requests found
......@@ -583,8 +583,8 @@ run_default_update () {
svn update
elif test -d CVS; then
cvs update -dP
elif test -d .git; then
if test -d ".git/svn" && test -n "`git svn find-rev HEAD`"; then
elif test -d .git || test -f .git; then
if test -d .git && test -d ".git/svn" && test -n "`git svn find-rev HEAD`"; then
# If the current HEAD points to a SVN commit, update via git-svn
git svn rebase
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment