- commit
- 9dd158e
- parent
- d6f7f7e
- author
- jolheiser
- date
- 2025-08-21 08:02:49 -0400 EDT
Add range-diff to contrib Helpful to be able to see a valid range-diff when doing some dev testing. As an example, this PR was originally intended for something else that turned out to be me testing range-diffs incorrectly. 😅 Signed-off-by: jolheiser <git@jolheiser.com>
1 files changed,
+13,
-0
+13,
-0
1@@ -56,6 +56,14 @@ func main() {
2 if err != nil {
3 panic(err)
4 }
5+ rd1, err := fixtures.Fixtures.ReadFile("a_b_reorder.patch")
6+ if err != nil {
7+ panic(err)
8+ }
9+ rd2, err := fixtures.Fixtures.ReadFile("a_c_changed_commit.patch")
10+ if err != nil {
11+ panic(err)
12+ }
13
14 // Accepted patch
15 userKey.MustCmd(patch, "pr create test")
16@@ -87,6 +95,11 @@ func main() {
17 userKey.MustCmd(nil, "pr edit 6 Closed patch with review")
18 adminKey.MustCmd(otherPatch, "pr add --close 6")
19
20+ // Range Diff
21+ userKey.MustCmd(rd1, "pr create test")
22+ userKey.MustCmd(nil, "pr edit 7 Range Diff")
23+ userKey.MustCmd(rd2, "pr add 7")
24+
25 fmt.Println("time to do some testing...")
26 ch := make(chan os.Signal, 1)
27 signal.Notify(ch, os.Interrupt, syscall.SIGTERM)