Skip to content
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
8 changes: 4 additions & 4 deletions lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -1703,10 +1703,10 @@ get-command-info() {
command_commit=$(readlink "$lib/git-subrepo.d/commit")
elif [[ $lib =~ / ]]; then
lib=$(dirname "$lib")
if [[ -d $lib/.git ]]; then
if [[ -e $lib/.git ]]; then
local remote
remote=$(
GIT_DIR=$lib/.git git remote -v |
git -C $lib remote -v |
grep '^origin' |
head -n1 |
cut -f2 |
Expand All @@ -1717,7 +1717,7 @@ get-command-info() {
else
local remote
remote=$(
GIT_DIR=$lib/.git git remote -v |
git -C $lib remote -v |
head -n1 |
cut -f2 |
cut -d ' ' -f1
Expand All @@ -1727,7 +1727,7 @@ get-command-info() {
fi
fi
local commit
commit=$(GIT_DIR=$lib/.git git rev-parse --short HEAD)
commit=$(git -C $lib rev-parse --short HEAD)
if [[ $commit ]]; then
command_commit=$commit
fi
Expand Down