summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-04 13:07:24 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-04 13:07:24 -0700
commit906189aba2550c08e1961709a290b7fe9a10ce50 (patch)
tree8ae71511496be2a6d7d019d86d0dec538ec64f49 /.bashrc
parent6a2a6ae2b7a2b763930ba21a15f28ebf82334289 (diff)
downloaddotfiles-906189aba2550c08e1961709a290b7fe9a10ce50.tar.gz
push to salsa if additional salsa remote
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc9
1 files changed, 9 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 7f52fe38..57c817da 100644
--- a/.bashrc
+++ b/.bashrc
@@ -151,6 +151,15 @@ debrel () {
fi
dgit push-source "$@"
git push --follow-tags
+
+ # if origin is not salsa, we might also want to push to salsa
+ # (.mrconfig.in should contain `git remote add -f salsa
+ # salsa:foo/bar` for this repo)
+ if git remote | grep -q salsa \
+ && git branch --contains salsa/$branch \
+ | grep -qE " $branch$"; then
+ git push --follow-tags salsa $branch:$branch
+ fi
)
}