Re: filter-branch performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10 December 2014 at 14:37, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Dec 10, 2014 at 02:18:24PM +0000, Roberto Tyley wrote:
>> object SetCommitterToAuthor extends CommitNodeCleaner {
>>   override def fixer(kit: CommitNodeCleaner.Kit) = c =>
>> c.copy(committer = c.author) // PersonIdent class holds name, email &
>> time
>> }
>
> Thanks. I _almost_ mentioned BFG in the original email, but I didn't
> think it could do arbitrary fixes like this. Can you monkey-patch in
> arbitrary code, or do you have to rebuild all of BFG to include the
> snippet above?

Well, I publish a bfg-library jar to Maven Central, so you don't need
to rebuild that:

http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22bfg-library_2.11%22

...in principle you can write a Java/Groovy/whatever project that
calls that jar (your entry point would be
com.madgag.git.bfg.cleaner.RepoRewriter) - tho' to be honest, I can't
swear to how /friendly/ the API would be to call from non-Scala-land
though, as I haven't tried it.

Incidentally, if people want to try compiling this monkey-patched BFG
at home, this is how you'd do it:

* Install SBT - http://www.scala-sbt.org/download.html (or 'brew
install sbt' for Mac OS X)
* git clone https://github.com/rtyley/bfg-repo-cleaner.git --branch
set-committer-to-author
* cd bfg-repo-cleaner
* sbt "bfg/run --no-blob-protection"

There will be a lot of automated downloading of dependencies, and
compilation will be slow the first time around, but at least there
aren't that many steps. I do realise that being Scala/JVM based makes
working on the BFG a bit of a specialist activity at the moment!

>> A DSL for non-Scala people to define their own
>> BFG scripts would be good, I must get on that some day.
>
> That would be cool.  Even if the DSL was just Java, if you could do
> something like:
>
>   vi fix.java
>   javac fix.java
>   bfg --filter=fix.class
>
> that would be very useful (and I am probably showing my lack of Java chops
> by getting the compilation command or filenames wrong :) ).

Your syntax is right :) I'll give it some thought.


>> I started running the same test some time ago using filter-branch,
>> unfortunately that test has not completed yet - the BFG appears to be
>> substantially faster.
>
> No fair if you didn't run filter-branch on a PC and BFG on a Raspberry
> Pi. You have to give us a fighting chance. :)

I guess I made that rod for my own back :) http://youtu.be/Ir4IHzPhJuI
for those who haven't seen it.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]