-
Notifications
You must be signed in to change notification settings - Fork 36.7k
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
doc: note the costs of fetching all pull requests #18382
Conversation
I tend to fetch only a single pull by just copying the URL in blue on the top right (e.g. for this pull https://github.com/vasild/bitcoin/tree/note_fetch_all_cost) Then, paste it into a terminal and replace the
|
Actually, isn't it an overkill to download all pull requests - opened, closed and merged (~1 GB)? Usually one wants to review or test one PR. @sipa you added this in 31444491f2#diff-e4de6d71249c78e229a61d6a03ac255aR422 almost 4 years ago when the volume of this was smaller. What about dropping this advice from the doc and replace it with instructions on fetching a single PR, as per the comment above and/or github help? |
Some people might have a really large disk and review a lot of pull requests or want to archive everything that happens for other reasons, so it might be good to mention both: the "archival solution" and the quick fetch solution. |
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.
Concept ACK
I think this is good so people don't get surprised by the large amount of data. Agree with @kristapsk that there should not be any specific numbers though.
5d7a817
to
5ebd8f6
Compare
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.
ACK 5ebd8f6
Thanks for adding those valuable informations/instructions 👍
FWIW I also tend to add a remote for each recurring contributor fork which also allows me to sneak peek what they are doing. |
5ebd8f6
to
abf7ff1
Compare
Right, updated. It looks better now. |
Doing some numbers myself: Cloning bitcoin/bitcoin downloads 138.8 MiB, resulting in a size on disk of .git of 146.8 MB.
I've generally never had a use for the refs/pull/*/merge branches (I prefer doing a merge with master myself if needed anyway, and that's rare), maybe it's reasonable to only suggest fetching the heads? |
abf7ff1
to
61dd7e2
Compare
Those numbers more or less coincide with my observations. |
Thanks, yes, looks much better now. ACK 61dd7e2 |
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.
As there are many ways to do this, and a wide range of user computing configurations and needs, it never really made sense to me why these precise instructions (and now examples) would be provided. (I use a somewhat different gitconfig for this and know other contributors who do as well). Just a counterpoint.
doc/productivity.md
Outdated
for example: | ||
|
||
``` | ||
git fetch https://github.com/glowang/bitcoin/ update_blocksonly_docs:docs_pr |
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.
Have you checked with this person about using their identity here?
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.
Ping @glowang.
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.
thank you for asking - this is fine with me!
It may be useful to add a note about pulling from the most recent passing commit hash on Travis-ci. |
I don't think github allows fetching by commit hash. You can only fetch labels or branches. It would be awesomely convenient sometimes to retrieve an old version of a PR that has been force-pushed over, to compare, but I've never managed to do this. |
@laanwj I do |
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.
re-ACK 61dd7e2
Just checked that since my last ACK:
- formatting has improved (the
for example:
string is now outside of the monospaced code block) - example
.gitconfig
section has been changed to only retreiving thehead
s
Personally speaking, the instructions on how to fetch all pull requests were very helpful when I started contributing/reviewing. It would be highly absurd to encourage new contributors to review and test code but then not including any instructions how to do so in terms of git(hub) workflow IMHO. I cannot follow the argumentation "there are many ways to do it, so better not even describe a single one of them". |
You don't need the
Personally I think it's useful to have some tips for things people frequently want to do, but otherwise refer to existing documentation. I also understand @jonatack's point that we don't want to end up maintaining an alternative git documentation here. |
I and others do describe these things more or less in detail in various articles to help onboard new people, a process I've been going through as well. Also, there are resources like https://bitcoincore.reviews to help onboard contributors -- and which I continue to learn from -- which everyone can contribute to and participate in. |
Fair enough, there is indeed very good and deep introductory material out there (for me it was this article by Jimmy Song that got me started) and the PR Review Club is an absolutely awesome idea. I'd still without hesitation recommend to every newcomer to carefully read the included |
Also, update the example to skip downloading the merge commits when downloading all PRs.
61dd7e2
to
d695eb4
Compare
This PR caused more discussions than I anticipated plus some controversy. The initial reason I opened it is that I expected the Updated the PR with just this basic info in one sentence (plus download only heads). |
ACK d695eb4 |
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.
ACK d695eb4
d695eb4 doc: note the costs of fetching all pull requests (Vasil Dimov) Pull request description: Also mention that it is possible to fetch just one pull request. ACKs for top commit: MarcoFalke: ACK d695eb4 fanquake: ACK d695eb4 Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
d695eb4 doc: note the costs of fetching all pull requests (Vasil Dimov) Pull request description: Also mention that it is possible to fetch just one pull request. ACKs for top commit: MarcoFalke: ACK d695eb4 fanquake: ACK d695eb4 Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
d695eb4 doc: note the costs of fetching all pull requests (Vasil Dimov) Pull request description: Also mention that it is possible to fetch just one pull request. ACKs for top commit: MarcoFalke: ACK d695eb4 fanquake: ACK d695eb4 Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
d695eb4 doc: note the costs of fetching all pull requests (Vasil Dimov) Pull request description: Also mention that it is possible to fetch just one pull request. ACKs for top commit: MarcoFalke: ACK d695eb4 fanquake: ACK d695eb4 Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
d695eb4 doc: note the costs of fetching all pull requests (Vasil Dimov) Pull request description: Also mention that it is possible to fetch just one pull request. ACKs for top commit: MarcoFalke: ACK d695eb4 fanquake: ACK d695eb4 Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
d695eb4 doc: note the costs of fetching all pull requests (Vasil Dimov) Pull request description: Also mention that it is possible to fetch just one pull request. ACKs for top commit: MarcoFalke: ACK d695eb4 fanquake: ACK d695eb4 Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
Also mention that it is possible to fetch just one pull request.