]> git.ipfire.org Git - thirdparty/git.git/commitdiff
diff-lib: drop stale comment about advancing o->pos
authorJeff King <peff@peff.net>
Sun, 26 Jul 2026 08:46:22 +0000 (04:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jul 2026 16:17:27 +0000 (09:17 -0700)
The comment above oneway_diff() claims that the callback must advance
o->pos to skip index entries it has already processed. That stopped
being true in da165f470e (unpack-trees.c: prepare for looking ahead in
the index, 2010-01-07), which moved that bookkeeping into
unpack_trees().

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c

index 0e868b28b6b0042c0d2f04150426beefeb574414..bcab7c8500ae033c9f81632bc7950b99690b5f44 100644 (file)
@@ -508,11 +508,9 @@ static void do_oneway_diff(struct unpack_trees_options *o,
  * For diffing, the index is more important, and we only have a
  * single tree.
  *
- * We're supposed to advance o->pos to skip what we have already processed.
- *
  * This wrapper makes it all more readable, and takes care of all
  * the fairly complex unpack_trees() semantic requirements, including
- * the skipping, the path matching, the type conflict cases etc.
+ * the path matching, the type conflict cases etc.
  */
 static int oneway_diff(const struct cache_entry * const *src,
                       struct unpack_trees_options *o)