Skip to content

Commit 14c50b2

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
fixup??? path-walk API: avoid adding a root tree more than once
This is an incorrect left-over of a previous iteration. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 3833bcc commit 14c50b2

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

path-walk.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,9 @@ static int setup_pending_objects(struct path_walk_info *info,
344344
struct object *obj = pending->item;
345345

346346
/* Commits will be picked up by revision walk. */
347-
if (obj->type == OBJ_COMMIT || obj->flags & SEEN)
347+
if (obj->type == OBJ_COMMIT)
348348
continue;
349349

350-
obj->flags |= SEEN;
351-
352350
/* Navigate annotated tag object chains. */
353351
while (obj->type == OBJ_TAG) {
354352
struct tag *tag = lookup_tag(info->revs->repo, &obj->oid);

t/t6601-path-walk.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -397,26 +397,4 @@ test_expect_success 'trees are reported exactly once' '
397397
test_line_count = 1 out-filtered
398398
'
399399

400-
test_expect_success 'trees are reported exactly once' '
401-
test_when_finished "rm -rf unique-trees" &&
402-
test_create_repo unique-trees &&
403-
(
404-
cd unique-trees &&
405-
mkdir initial &&
406-
test_commit initial/file &&
407-
408-
git switch -c move-to-top &&
409-
git mv initial/file.t ./ &&
410-
test_tick &&
411-
git commit -m moved &&
412-
413-
git update-ref refs/heads/other HEAD
414-
) &&
415-
416-
test-tool -C unique-trees path-walk -- --all >out &&
417-
tree=$(git -C unique-trees rev-parse HEAD:) &&
418-
grep "$tree" out >out-filtered &&
419-
test_line_count = 1 out-filtered
420-
'
421-
422400
test_done

0 commit comments

Comments
 (0)