diff options
author | Martin Thomson <martin.thomson@gmail.com> | 2018-08-29 14:43:31 +1000 |
---|---|---|
committer | Martin Thomson <martin.thomson@gmail.com> | 2018-08-29 14:43:31 +1000 |
commit | 2be1e78401d4db94723cfb20d814711adbede732 (patch) | |
tree | 5dfe6032a3c3c6b74072af8d8dd00c40885ee863 /fuzz | |
parent | a702957bd309237724d4d39d6c7e602e846c89da (diff) | |
download | nss-hg-2be1e78401d4db94723cfb20d814711adbede732.tar.gz |
Bug 1486987 - Update googletest, r?kaie
Diffstat (limited to 'fuzz')
-rwxr-xr-x | fuzz/config/git-copy.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fuzz/config/git-copy.sh b/fuzz/config/git-copy.sh index a9e817e2a..f21b2d232 100755 --- a/fuzz/config/git-copy.sh +++ b/fuzz/config/git-copy.sh @@ -12,14 +12,14 @@ COMMIT="$2" DIR="$3" echo "Copy '$COMMIT' from '$REPO' to '$DIR'" +if [ $(echo -n "$COMMIT" | wc -c) != "40" ]; then + # On the off chance that $COMMIT is a remote head. + ACTUAL=$(git ls-remote "$REPO" "$COMMIT" | cut -c 1-40 -) +else + ACTUAL="$COMMIT" +fi if [ -f "$DIR"/.git-copy ]; then CURRENT=$(cat "$DIR"/.git-copy) - if [ $(echo -n "$COMMIT" | wc -c) != "40" ]; then - # On the off chance that $COMMIT is a remote head. - ACTUAL=$(git ls-remote "$REPO" "$COMMIT" | cut -c 1-40 -) - else - ACTUAL="$COMMIT" - fi if [ "$CURRENT" = "$ACTUAL" ]; then echo "Up to date." exit @@ -28,7 +28,7 @@ fi rm -rf "$DIR" git init -q "$DIR" -git -C "$DIR" fetch -q --depth=1 "$REPO" "$COMMIT":git-copy-tmp +git -C "$DIR" fetch -q --depth=1 "$REPO" "$ACTUAL":git-copy-tmp git -C "$DIR" reset --hard git-copy-tmp git -C "$DIR" rev-parse --verify HEAD > "$DIR"/.git-copy rm -rf "$DIR"/.git |