From 35da3f7e4fb9309684ecde88f25d27f032c5cfcf Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 10 Jun 2013 13:49:22 -0400 Subject: [PATCH] r: add `email` helper. have `sync` only do active branch by default. handle new git about when using `rb`. --- .bin/r | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.bin/r b/.bin/r index 71541f6..7d4fc61 100755 --- a/.bin/r +++ b/.bin/r @@ -94,6 +94,8 @@ rebase) { if ($0 ~ "^[*] *[(]no branch[)]") { next + } else if ($0 ~ "^[*] *[(]detached from ") { + next } else if ($1 == "*") { b = $2 } else { @@ -220,7 +222,7 @@ g-push) err "could not figure out remote to push to" ;; sync) - set -- -j16 "$@" + set -- -j16 -c "$@" ;; upload) args=() @@ -245,6 +247,11 @@ upload) done set -- "${args[@]}" ;; +email) + email=${1:-${USER}@chromium.org} + cmd='forall' + set -- -c "git cfg user.email ${email}" + ;; esac exec repo ${acmd:-${cmd}} "$@" -- 2.39.5