-
Notifications
You must be signed in to change notification settings - Fork 289
don't fail when computing diff on partial clones #1093
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't reproduce the bug with this script. It seems like the blobs are still fetched for previous commits even with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was an issue with the configuration that is fixed - by trying the lines by hand in the respective |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -eu -o pipefail | ||
|
||
mkdir base | ||
(cd base | ||
git init -q | ||
git checkout -b main | ||
touch code.rs | ||
git add code.rs | ||
git commit -q -m c1 | ||
echo hello >> code.rs | ||
git add code.rs | ||
git commit -q -m c2 | ||
echo world >> code.rs | ||
git add code.rs | ||
git commit -q -m c3 | ||
echo something >> code.rs | ||
git add code.rs | ||
git commit -q -m c4 | ||
echo more >> code.rs | ||
git mv code.rs renamed.rs | ||
echo change >> renamed.rs | ||
git commit -q -am c5 | ||
|
||
git config uploadpack.allowfilter true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes |
||
) | ||
|
||
git clone --filter=blob:none file://$PWD/base partial | ||
(cd partial | ||
git config diff.renames true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just to be explicit about this option as it is the one that matters. If unset, it would still default to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great idea! Yeah, I think it's a good philosophy that tests' setup code describes what's being tested, even if it's unnecessarily explicit. |
||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this line is removed, the exact error is reproduced that this PR is fixing.