After about a month and a few attempts it's clear that my rr-cache gc logic is busted. When copying stuff back&forth between the git branch and git's rr-cache dir, something somewhere (or maybe it's git rerere itself) touches all files and wreaks the timestamps. End result is that over this month, every time when someone gc'ed a few files, they've been resurrected a few days later by someone else. I think the only way to fix this is by dropping the copying and replacing git's rr-cache with a symbolic link. That way, when we delete an rr-cache entry in the git branch, it won't be able to resurrect. I hope at least ... This also makes dim revert-rerere no longer needed, delete it. v2: Unfunny the ln option placement (Jani). Acked-by: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> --- dim | 22 +++++++--------------- dim.rst | 9 --------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/dim b/dim index d52510529fa2..f8be76df4952 100755 --- a/dim +++ b/dim @@ -504,8 +504,13 @@ function update_rerere_cache cd $DIM_PREFIX/drm-rerere/ git pull &> /dev/null - mkdir $(rr_cache_dir) &> /dev/null || true - cp rr-cache/* $(rr_cache_dir) -r --preserve=timestamps + if [ -d $(rr_cache_dir) ] ; then + rm -Rf $(rr_cache_dir) + fi + if [ ! -L $(rr_cache_dir) ] ; then + ln -s "$DIM_PREFIX/drm-rerere/rr-cache" $(dirname $(rr_cache_dir)) + fi + cd - > /dev/null echo "Done." @@ -519,8 +524,6 @@ function commit_rerere_cache if git_is_current_branch rerere-cache ; then remote=$(branch_to_remote rerere-cache) - rm $(rr_cache_dir)/rr-cache -Rf &> /dev/null || true - cp $(rr_cache_dir)/* rr-cache -r --preserve=timestamps git pull >& /dev/null git add ./*.patch >& /dev/null || true for file in $(git ls-files); do @@ -543,17 +546,6 @@ function commit_rerere_cache fi } -function dim_revert_rerere -{ - local commit - - commit=${1:?$usage} - - cd $DIM_PREFIX/drm-rerere/ - git revert $commit - rm $(rr_cache_dir)/* -Rf -} - dim_alias_rebuild_nightly=rebuild-tip function dim_rebuild_tip { diff --git a/dim.rst b/dim.rst index f012a831da74..a2c110a054ee 100644 --- a/dim.rst +++ b/dim.rst @@ -247,15 +247,6 @@ Rebuild and push the integration tree. ADVANCED COMMANDS FOR COMMITTERS AND MAINTAINERS ================================================ -revert-rerere *rerere-cache-commit-ish* ---------------------------------------- -When a stored conflict resolution in the integration tree is wrong, this command -can be used to fix up the mess. First figure out which commit in the -*rerere-cache* branch contains the bogus conflict resolution, then revert it -using this command. This ensures the resolution is also purged from any local -caches, to make sure it doesn't get resurrected. Then run *rebuild-tip* to redo -the merges, correctly. - cat-to-fixup ------------ Pipes stdin into the fixup patch file for the current drm-tip merge. -- 2.13.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx