mirror of
https://git.centos.org/centos-git-common.git
synced 2025-02-23 08:12:56 +00:00
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:
parent
e575c2e598
commit
3382beadcc
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue