Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path-walk API: avoid adding a root tree more than once #5195

Conversation

dscho
Copy link
Member

@dscho dscho commented Oct 7, 2024

When adding tree objects, we are very careful to avoid adding the same tree object more than once. There was one small gap in that logic, though: when adding a root tree object. Two refs can easily share the same root tree object, and we should still not add it more than once.

When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Oct 7, 2024
@dscho dscho mentioned this pull request Oct 7, 2024
Copy link

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! What a find. Good test.

@dscho dscho added this to the v2.47.0 milestone Oct 8, 2024
@dscho dscho merged commit d48cc90 into git-for-windows:main Oct 8, 2024
45 checks passed
@dscho dscho deleted the avoid-reporting-root-trees-twice-in-path-walk-API branch October 8, 2024 06:15
dscho added a commit to dscho/git that referenced this pull request Oct 8, 2024
…ws#5195)

When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
@dscho
Copy link
Member Author

dscho commented Oct 8, 2024

@derrickstolee please note that I had to add an emergency fixup: d53e464; You may want to incorporate that into gitgitgadget#1813 before submitting, too.

git-for-windows-ci pushed a commit that referenced this pull request Oct 8, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 8, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 8, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 8, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 9, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 9, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 9, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 9, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 9, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 10, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 11, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 11, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 11, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 20, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
dscho added a commit that referenced this pull request Oct 21, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 21, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 21, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 25, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 25, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 25, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Oct 30, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
git-for-windows-ci pushed a commit that referenced this pull request Nov 1, 2024
When adding tree objects, we are very careful to avoid adding the same
tree object more than once. There was one small gap in that logic,
though: when adding a root tree object. Two refs can easily share the
same root tree object, and we should still not add it more than once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants