Commit 3bf198ba335fa30c8d16efb5c8e496200ac99c05

Stefan Sperling 2018-07-10T15:02:13

always pass commit ID to incremental blame callback

diff --git a/include/got_blame.h b/include/got_blame.h
index 5255d07..39623c4 100644
--- a/include/got_blame.h
+++ b/include/got_blame.h
@@ -30,8 +30,8 @@ const struct got_error *got_blame(const char *, struct got_object_id *,
  * which last changed this line.
  *
  * The callback is invoked for each commit as history is traversed.
- * If no changes to the file were made in a commit, line number -1 and
- * commit ID NULL will be reported.
+ * If no changes to the file were made in a commit, line number -1 will
+ * be reported.
  *
  * If the callback returns GOT_ERR_ITER_COMPLETED, the blame operation
  * will be aborted and this function returns NULL.
diff --git a/lib/blame.c b/lib/blame.c
index a6ac4fe..898bae8 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -133,7 +133,7 @@ blame_commit(struct got_blame *blame, struct got_object_id *id,
 			}
 		}
 	} else if (cb)
-		err = cb(arg, blame->nlines, -1, NULL);
+		err = cb(arg, blame->nlines, -1, id);
 done:
 	if (obj)
 		got_object_close(obj);