Community
Participate
Working Groups
The commit activity timeline for the Mylyn Docs project looks a bit funny due to a (meaningless) back dated commit that was necessary for the initial import from CVS: http://eclipse.org/projects/project_summary.php?projectid=mylyn.docs . What is the cleanest way to remove the commit?
I deleted the offending row from the database and have updated the Git log parser to ignore any records with a year earlier than 2000. Is this the right solution? Or can we rewrite the commit's date somehow?
(In reply to comment #1) > Or can we rewrite the commit's date somehow? http://stackoverflow.com/questions/454734/how-can-one-change-the-timestamp-of-an-old-commit-in-git
Steffen, did you ever get this to work?
I have to admit I didn't try. I'll take a look after EclipseCon.
I believe this command would remove the bogus initial commit: git filter-branch --commit-filter ' if [ "$GIT_COMMIT" = "33e5e678f27f4593b6b55764dff29daeaa9df640" ]; then skip_commit "$@"; else git commit-tree "$@"; fi' HEAD --all Since commit hashes are based on parent commits changing the initial commit necessarily means to rewrite the entire history of the org.eclipse.mylyn.docs repository. I don't think it's worth doing that just to get rid of the commit which mostly a cosmetic problem. If we have another reason to change the history of the repository in the future (e.g. to split the repository) we should consider removing the commit as part of that. I'll move this bug to Mylyn and to track this on our end. Thanks for the input.
+1 I'd really hate to have the whole commit history rewritten
git clone --mirror /gitroot/mylyn/org.eclipse.mylyn.docs.git cd org.eclipse.mylyn.docs.git git filter-branch --commit-filter 'test "$GIT_COMMIT" = "33e5e678f27f4593b6b55764dff29daeaa9df640" && skip_commit "$@" || git commit-tree "$@"' -- --all rm -rf refs/original/ git reflog expire --expire=now --all git gc --aggressive --prune=now
This is actually causing more confusion and harm than I had previously thought, e.g. https://www.ohloh.net/p/mylyn. Considering that it's low risk I think we should do it now. While rewriting the history will cause some disruption the earlier we do it the better. I'll raise this on the mailing list.
I am proposing that we go ahead with the rewrite end of next week (March 1, 2012) as per this mail to mylyn-docs-dev: http://dev.eclipse.org/mhonarc/lists/mylyn-dev/msg01553.html
+1
I have executed the steps in comment 7 on build.eclipse.org and pushed the repository to https://github.com/spingel/org.eclipse.mylyn.docs for testing.
This is now complete. Please reclone the repository (or pull with --force and reset with --hard to origin).