Skip to content

Commit

Permalink
Merge pull request #12 from shawnjk/bug/fetch.before.update
Browse files Browse the repository at this point in the history
Fetch the last rev before pulling
  • Loading branch information
brettlangdon authored Jul 12, 2021
2 parents c58c212 + f605276 commit 18da26d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/git-vendor
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ cmd_update()
START) ;;
git-vendor-dir:) dir="$b" ;;
git-vendor-repository:) repository="$b" ;;
git-vendor-ref:) curr_ref="$b" ;;
END)
# Make sure the dependency exists on disk
if [ ! -d "$dir" ]; then
Expand All @@ -197,6 +198,7 @@ git-vendor-dir: $dir
git-vendor-repository: $repository
git-vendor-ref: $ref
"
git fetch "$repository" "$curr_ref"
git subtree pull --prefix "$dir" --message "$message" "$repository" "$ref" --squash
break
fi
Expand Down

0 comments on commit 18da26d

Please sign in to comment.