Commit 3ffacbe1f62d0c6495612d17e918e95e40dba981

Tracey Emery 2020-02-02T17:10:40

goto done and remove erroneous break

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/tog/tog.c b/tog/tog.c
index 6610856..c4ec3dd 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2988,7 +2988,7 @@ create_diff(struct tog_diff_view_state *s)
 
 		err = got_object_open_as_commit(&commit2, s->repo, s->id2);
 		if (err)
-			break;
+			goto done;
 		/* Show commit info if we're diffing to a parent/root commit. */
 		if (s->id1 == NULL) {
 			err =write_commit_info(s->id2, s->refs, s->repo, s->f);
@@ -3002,7 +3002,6 @@ create_diff(struct tog_diff_view_state *s)
 					    s->repo, s->f);
 					if (err)
 						goto done;
-					break;
 				}
 			}
 		}