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
Avoid tracking PDF result files in the main github draft repository #3318
Comments
@nemequ said:
|
Editorial meeting: The purpose of the git repository is for the convenience of the editors. The suggestions do not provide additional convenience. For copies of the resulting PDF draft documents, see the public committee mailings. |
Editorial meeting on Friday: We should keep this open, and consider actually purging the PDFs from the repository. This might require something like |
Editorial meeting cnt'd: If if we do a filter-branch, i.e. we rewrite the entire history, we must (in the sense of "shall") keep a record of all the old commit hashes and their corresponding new hashes. This is because we make reference to commit hashes in various places, such as commit messages and github issues. (We should also incrementally update any affected commit messages as we go along.) |
A problem with rewriting history is that we have published commit hashes in N-numbered papers (as part of Edtior's Reports). |
Idea: clone the repository into a frozen, archival location, so that the commit hashes remain in some sense valid. |
Isn't a branch from current master enough to preserve the hashes? |
@jwakely: Yes, but then the total repo size won't shrink (because the PDFs are still present on that other branch).
|
I wonder if there's anything specific to github that we can do here to preserve the old hashes. Unlike with a stock |
Usual pull requests are branches on a different repo clone (e.g. mine), so they don't show up for a "git fetch" on the main repo. For motions branches (which are, by convention, pushed to the main repo), I do see them when I do a "git fetch". |
That's not the whole story. When you create a pull request, the commits of the pull request become visible in the destination repository too. For example, consider unmerged pull request #3496 (merging a commit from your clone); the head commit of that (0095e0b) is visible in the main repository too: 0095e0b You can also see this from the command line: So the idea here would be that we'd fork the repository as-is, then create a pull request to merge that as-is copy back in, and that would "pin" all the historical commits to this repository, despite them no longer being in the repository that you see if you use |
In fact, it looks like the github model is that internally there is only one repository for an original repository plus all of its forks, irrespective of pull requests, but If we can rely on that, then this becomes even easier: we just need to make sure that a fork of the old repository continues to exist somewhere on github. |
Looks like https://github.com/newren/git-filter-repo/ is the tool for the job, including keeping old hash references valid and transparently rewriting commit messages. |
This looks pretty close to what we want to achieve:
It prunes the repo from (currently) 432 MB to 48 MB, adds replace refs pointing from the old commit hashes to the new ones (so that references in editor's reports stay valid) and updates commit hashes in commit messages (e.g. "Revert abcdef"). |
Editorial meeting 2021-05-28: Create a clickable list with links to all working drafts we ever had. |
@Eelis We will probably have to force-push the main branch to do the above filtering, and we'll rename the default branch. Please do let us know if that poses any problems for you! |
No problems, do what needs to be done. |
And check in a Windows x64 build of `cppfront.exe`
From #3313 :
The text was updated successfully, but these errors were encountered: