]> git.wh0rd.org Git - home.git/commitdiff
r: add `email` helper. have `sync` only do active branch by default. handle new...
authorMike Frysinger <vapier@gentoo.org>
Mon, 10 Jun 2013 17:49:22 +0000 (13:49 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 10 Jun 2013 17:49:22 +0000 (13:49 -0400)
.bin/r

diff --git a/.bin/r b/.bin/r
index 71541f6d2a5ebbd4143e3a62df2a52c7d6e61aef..7d4fc61ba03743c8acadbbe31f183cb352d091a7 100755 (executable)
--- 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}} "$@"