Re: git filter-branch --directory-filter oddity
On Tue, Dec 3, 2013 at 5:44 PM, Martin Langhoff wrote: > Am I doing it wrong? Looks like I was doing something wrong. Apologies about the noise. cheers, m -- martin.langh...@gmail.com - ask interesting questions - don't get distracted with shiny stuff - working code first ~ http://docs.moodle.org/en/User:Martin_Langhoff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git filter-branch --directory-filter oddity
On Tue, Dec 3, 2013 at 5:44 PM, Martin Langhoff wrote: > As they have not been skipped, they are fully fleshed out. By this, I > mean that we have the whole tree in place. So these 22 commits appear > with foo/bar pulled out to the root of the project, in the midst of > 1500 commits with a full tree. IOWs, I am experimenting with something like: git filter-branch -f -d /tmp/moodle-$RANDOM --prune-empty --index-filter "git ls-files -z | grep -zZ -v '${dirpath}' | xargs -0 --no-run-if-empty -n100 git rm --quiet --cached --ignore-unmatch " ^v2.1.0 $branches git filter-branch -f --prune-empty --subdirectory-filter ${dirpath} ^v2.1.0 $branches git filter-branch -f --commit-filter "~/src/git-filter-branch-tools/remove-pointless-commit.rb \"\$@\"" ^v2.1.0 $branches perhaps the docs for filter-branch imply, to me at least, that it's a DWIM tool. I am surprised at having to roll my own on something that is fairly popular. cheers, m -- martin.langh...@gmail.com - ask interesting questions - don't get distracted with shiny stuff - working code first ~ http://docs.moodle.org/en/User:Martin_Langhoff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git filter-branch --directory-filter oddity
When using git filter-branch --prune-empty --directory-filter foo/bar to extract the history of the foo/bar directory, I am getting a very strange result. Directory foo/bar is "slow moving". Say, 22 commits out of several thousand. I would like to extract just those 22 commits. Instead, I get ~1500 commits, which seem to have not been skipped because they are merge commits. Merges completely immaterial to this directory. As they have not been skipped, they are fully fleshed out. By this, I mean that we have the whole tree in place. So these 22 commits appear with foo/bar pulled out to the root of the project, in the midst of 1500 commits with a full tree. The commit diffs make no sense what-so-ever. Am I doing it wrong? m -- martin.langh...@gmail.com - ask interesting questions - don't get distracted with shiny stuff - working code first ~ http://docs.moodle.org/en/User:Martin_Langhoff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html