From: Michele Locati Date: Thu, 22 Mar 2018 13:40:21 GMT Subject: Re: [PATCH v2] filter-branch: use printf instead of echo -e Message-ID: <081ccfce-7a89-503e-465e-3befe6f33f17@locati.it> In-Reply-To: Il 21/03/2018 22:50, Johannes Schindelin ha scritto: > Hi Michele, > > On Mon, 19 Mar 2018, Michele Locati wrote: > >> [...] >> -- >> 2.16.2.windows.1 > > Yaaaaay! > > Out of curiosity: did the CONTRIBUTING.md file help that was recently > turned into a guide how to contribute to Git (for Windows) by Derrick > Stolee? Well, no. Here's what led me here... The people behind the concrete5 CMS asked support for improving the following procedure: concrete5 is stored in https://github.com/concrete5/concrete5 In order to make it installable with Composer (a PHP package manager), we need to extract its "/concrete" directory, and push the results to https://github.com/concrete5/concrete5-core We previously used "git filter-branch --all" with this script: https://github.com/concrete5/core_splitter/blob/70879e676b95160f7fc5d0ffc22b8f7420b0580b/bin/splitcore That script is executed every time someone pushes concrete5/concrete5, and it took very long time (3~5 minutes). I noticed on the git-filter-branch manual page that there's a "--state-branch", and it seemed quite interesting. So, I asked in git@vger.kernel.org how to use it, and the author of that feature (Ian Campbell) told me to look at some code he wrote. So, I wrote https://github.com/concrete5/incremental-filter-branch which wraps "git filter-branch --filter-state", and it's used in https://github.com/concrete5/core_splitter/blob/99bbbcea1ab90572a04864ccb92327532ab6a42c/bin/splitcore (it not yet in production: Korvin wants to be sure everything works well before adopting it) The time required for the operation dropped from 3~5 minutes to ~10 seconds ;) While writing that script, I noticed a couple of things that could be improved in "git-filter-branch", so I submitted https://marc.info/?l=git&m=152111905428554&w=2 (so that the script could run without problems if there's nothing to do) and https://marc.info/?l=git&m=152147095416175&w=2 (so that --filter-state could be used on Mac and other non-Linux systems). How did I learn how to submit to git? I searched for "git src", landed on https://github.com/git/git, read Documentation/SubmittingPatches and used git send-email. And yes, all that on Windows (and WSL). > > Ciao, > Johannes Ciao! -- Michele