repos / git-pr

a self-hosted git collaboration server
git clone https://github.com/picosh/git-pr.git

commit
aa526fc
parent
2b4cefb
author
Eric Bower
date
2024-04-29 09:33:31 -0400 EDT
prototype
1 files changed,  +49, -0
A README.md
+49, -0
 1@@ -0,0 +1,49 @@
 2+# patch requests
 3+
 4+## format-patch
 5+
 6+```bash
 7+# Owner hosts repo `noice.git` on pico/git
 8+
 9+# User clones repo
10+git clone git.sh:/noice.git
11+
12+# User wants to make a change
13+# User makes changes via commits
14+git add -A && git commit -m "fix: some bugs"
15+
16+# User runs:
17+git format-patch --stdout | ssh git.sh pr noice
18+# (-or-) User runs 
19+git format-patch && rsync *.patch git.sh:/noice/
20+# > Patch Request has been created (ID: noice/1)
21+
22+# User can copy down patch request metadata:
23+rsync git.sh:/noice/pr_1.md .
24+# User edits patch request metadata, then runs:
25+rsync pr_1.md git.sh:/noice/
26+
27+# Owner can checkout patch:
28+ssh git.sh pr noice/1 | git am -3
29+# Owner can comment in code, then commit, then send another format-patch
30+# on top of it:
31+git format-patch --stdout | ssh git.sh pr noice/1
32+# We do some magic in the UI to make this look like comments or someway to
33+# clearly mark as a review
34+
35+# Owner can reject a pr:
36+ssh git.sh pr noice/1 --close
37+# (-maybe-) Owner can merge a pr:
38+ssh git.sh pr noice/1 --squash-n-merge
39+
40+# User can checkout reviews
41+ssh git.sh pr noice/1 | git am -3
42+
43+# rinse and repeat
44+```
45+
46+# research
47+
48+- https://git-scm.com/docs/git-format-patch
49+- https://stackoverflow.com/a/42634501
50+- https://lists.sr.ht/~sircmpwn/himitsu-devel/patches/47404