From 906189aba2550c08e1961709a290b7fe9a10ce50 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 4 Feb 2020 13:07:24 -0700 Subject: push to salsa if additional salsa remote --- .bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.bashrc') 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 ) } -- cgit v1.2.3