gitgerritorder: use git config to add fetch line
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 15 Jul 2022 13:14:20 +0000 (09:14 -0400)
committerMichael Meffie <mmeffie@sinenomine.net>
Fri, 15 Jul 2022 13:14:20 +0000 (09:14 -0400)
devel/GitGerritOrder.mdwn

index 8c8dd81..81e52a5 100644 (file)
@@ -19,21 +19,19 @@ working repo, since we will be fetching a large number of branches.
     $ cd openafs-gerrits
 
 Add an additional 'fetch' line to your `.git/config` to fetch the
-gerrit 'refs/changes' branches.
+gerrit 'refs/changes' branches:
 
-before:
+    $ git config --add remote.origin.fetch "+refs/changes/*:refs/remotes/origin/changes/*"
 
-    [remote "origin"]
-        url = https://gerrit.openafs.org/openafs.git
-        fetch = +refs/heads/*:refs/remotes/origin/*
-
-
-after:
+Your .git/config should like like this now:
 
+    $ cat .git/config
+    ...
     [remote "origin"]
         url = https://gerrit.openafs.org/openafs.git
         fetch = +refs/heads/*:refs/remotes/origin/*
         fetch = +refs/changes/*:refs/remotes/origin/changes/*
+    ...
 
 Run `git fetch` to fetch all of the gerrit changes.