Skip to content

Commit da8ba5e

Browse files
committed
diff-lib.c: fix misleading comments on oneway_diff()
20a16eb (unpack_trees(): fix diff-index regression., 2008-03-10) adjusted diff-index to the new world order since 34110cd (Make 'unpack_trees()' have a separate source and destination index, 2008-03-06). Callbacks are expected to return anything non-negative as "success", and instead of reporting how many index entries they have processed, they are expected to advance o->pos themselves. The code did so, but a stale comment was left behind. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 79b4fde commit da8ba5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff-lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static inline void skip_same_name(struct cache_entry *ce, struct unpack_trees_op
383383
* For diffing, the index is more important, and we only have a
384384
* single tree.
385385
*
386-
* We're supposed to return how many index entries we want to skip.
386+
* We're supposed to advance o->pos to skip what we have already processed.
387387
*
388388
* This wrapper makes it all more readable, and takes care of all
389389
* the fairly complex unpack_trees() semantic requirements, including

0 commit comments

Comments
 (0)