Get the proper branch name from the remote instead of the local branch

name.

This allows you to clone a commit directly by its hash, and not be
required to set up a tracking branch (with a matching name) to its
upstream.
This commit is contained in:
Brian Stinson 2019-04-16 09:59:13 -05:00
parent e575c2e598
commit 3382beadcc

View file

@ -181,7 +181,7 @@ else
else
branches=("${branches[@]}" "$branch")
fi
done <<< "$(git branch --contains HEAD)"
done <<< "$(git branch -r --contains HEAD | sed 's#origin/##g')"
fi
while read -r fsha fname ; do
if [ ".${fsha}" = ".da39a3ee5e6b4b0d3255bfef95601890afd80709" ]; then