summaryrefslogtreecommitdiff
path: root/bin/git-pull-safe
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-03-23 16:14:27 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-03-23 16:32:54 -0700
commitce2e10580d3282d47670d52a924ccb6cd1e9ba9e (patch)
tree5b0f3fbcb9d599f89c7475abf54a3cc03bba5903 /bin/git-pull-safe
parent5a33bc49c9770be7246fc170ce5691d93353724b (diff)
downloaddotfiles-ce2e10580d3282d47670d52a924ccb6cd1e9ba9e.tar.gz
pass -p to dgit fetch
Ensures it will work if currently checked out branch does not control d/control.
Diffstat (limited to 'bin/git-pull-safe')
-rwxr-xr-xbin/git-pull-safe5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/git-pull-safe b/bin/git-pull-safe
index 9ae75906..32a61b56 100755
--- a/bin/git-pull-safe
+++ b/bin/git-pull-safe
@@ -48,6 +48,9 @@ for suite in $(git show-ref | grep refs/remotes/dgit/dgit | cut -d/ -f5 ); do
# skip if we just called `dgit pull` on this suite
if ! [ "$current_branch" = "dgit/$suite" ]; then
# echo "I: fetching dgit suite $suite"
- dgit fetch $suite
+ [ -z "$source" ] \
+ && source=$(git cat-file blob dgit/dgit/$suite:debian/control \
+ | awk -F': ' '$1 ~ /Source/ { print $2 }')
+ dgit -p$source fetch $suite
fi
done