]> git.wh0rd.org - home.git/commitdiff
repoconfig: split out from gitconfig
authorMike Frysinger <vapier@gentoo.org>
Wed, 19 Feb 2020 02:18:10 +0000 (21:18 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 20 Feb 2020 02:32:10 +0000 (21:32 -0500)
.bin/r
.gitconfig
.gitignore
.repoconfig/.gitignore [new file with mode: 0644]
.repoconfig/config [new file with mode: 0644]

diff --git a/.bin/r b/.bin/r
index 848378ea2eedcc6abeba8fed90c3f680ce8800d4..9aa76a868ec1a187e21584f0d1946a1140ea70d1 100755 (executable)
--- a/.bin/r
+++ b/.bin/r
@@ -8,25 +8,11 @@ case $1 in
 esac
 
 case $1 in
-""|-*) ;;
-l)
-       cmd=list
-       shift
-       ;;
-s)
-       cmd=sync
-       shift
-       ;;
 rb-all)
        cmd=rebase
        shift
        set -- all "$@"
        ;;
-*)
-       cmd=$1
-       shift
-       acmd=$(git config --get "alias.${cmd}" | sed 's: -.*::')
-       ;;
 esac
 
 mj_init() {
@@ -239,59 +225,6 @@ sb)
 
        exit 0
        ;;
-g-push)
-       # For the times when repo is being stupid, push directly to gerrit myself.
-       if ! branch=$(g symbolic-ref -q HEAD) ; then
-               err "could not figure out active branch"
-       fi
-       branch=${branch#refs/heads/}
-       if ! remote_branch=$(g cfg --get "branch.${branch}.merge") ; then
-               echo "could not figure out remote branch; using ${branch}"
-               remote_branch=${branch}
-       fi
-       if ! remote=$(g cfg --get "branch.${branch}.remote") ; then
-               for remote in cros-internal cros origin ; do
-                        g cfg --get "remote.${remote}.url" >/dev/null && break
-               done
-       fi
-       review=$(g cfg --get "remote.${remote}.review")
-       remote_branch=${remote_branch#refs/heads/}
-
-       git_args=()
-       reviewers=""
-       while [[ $# -gt 0 ]] ; do
-               case $1 in
-               --re)
-                       process_reviewers "$2"
-                       shift
-                       ;;
-               -n|--dry-run|--draft)
-                       git_args+=( $1 )
-                       ;;
-               *)
-                       err "unknown option: $1"
-                       ;;
-               esac
-               shift
-       done
-
-       ref_spec="${branch}:refs/for/${remote_branch}"
-       if [[ -n ${reviewers} ]] ; then
-               reviewers=( ${reviewers//,/ } )
-               if [[ ${review} != ssh://* ]] ; then
-                       gob_args=$(printf 'r=%s,' "${reviewers[@]}")
-                       ref_spec+="%${gob_args%,}"
-               else
-                       git_args+=( "--receive-pack=git receive-pack ${reviewers[*]/#/--reviewer=}" )
-               fi
-       fi
-
-       vr git push "${git_args[@]}" ${remote} ${ref_spec} && exit
-       err "could not figure out remote to push to"
-       ;;
-sync)
-       set -- -j16 -c "$@"
-       ;;
 upload)
        args=()
        while [[ $# -gt 0 ]] ; do
@@ -320,4 +253,4 @@ email)
        ;;
 esac
 
-exec python2 $(find_repo) ${acmd:-${cmd}} "$@"
+exec $(find_repo) ${acmd:-${cmd}} "$@"
index d29de085927a82f4972a2bd509aa4aa195893b77..f8bfd579b27466817e7af0277803f81cbd281cec 100644 (file)
@@ -42,7 +42,6 @@
 
 [alias]
        a    = add
-       ab   = abandon
        am-a = am --abort
        am-c = am --continue
        ar   = archive
@@ -57,7 +56,6 @@
        cp-x = cherry-pick -x
        d    = diff
        desc = describe
-       dl   = download
        f    = fetch
        fp   = format-patch -C -M
        g    = grep
@@ -76,7 +74,6 @@
        sm   = submodule
        st   = status
        t    = tag
-       up   = upload
 
 [tag]
        sort = version:refname
index 6c71f178772c912958829f2a51f1a6a702b02b3f..ad0d3c35549f229720172a238a916f4ff5ad1666 100644 (file)
@@ -62,7 +62,7 @@ lock
 /.oobe_completed
 /.pulse-cookie
 /.pulse/
-/.repo_.gitconfig.json
+/.repo_*.json
 /.rnd
 /.serverauth.*
 /.snapshot
@@ -257,7 +257,6 @@ lock
 /.qtnx/
 /.qemulator/icons/
 /.revenge_of_the_titans_*/
-/.repoconfig
 /.repopickle*
 /.scummvmrc
 /.secureConnect/
diff --git a/.repoconfig/.gitignore b/.repoconfig/.gitignore
new file mode 100644 (file)
index 0000000..8e1fbf0
--- /dev/null
@@ -0,0 +1,3 @@
+/.repo_*.json
+/gnupg/
+/keyring-version
diff --git a/.repoconfig/config b/.repoconfig/config
new file mode 100644 (file)
index 0000000..5cc27ad
--- /dev/null
@@ -0,0 +1,13 @@
+[alias]
+       ab   = abandon
+       b    = branch
+       co   = checkout
+       d    = diff
+       dl   = download
+       g    = grep
+       h    = help
+       l    = list
+       up   = upload
+       rb   = rebase
+       s    = sync -j16 -c
+       st   = status