Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Gerrit offline for JGit rewrite

Denis Roy <denis.roy@xxxxxxxxxxx> wrote:
> So with Gerrit, each time you want to re-write history, you have to take  
> the entire system offline?

Not really.  You can keep it online and just grant yourself Push
Branch +3, Forge Identity +3, and then push the rewritten history
into all of the branches.

The problem is, what if you wanted to also keep all of the old code
review metadata?  Currently the database contains pointers based on
commit SHA-1s.  You would also have to update those database fields
to use the newly rewritten commit SHA-1s.  Which is relatively major
database surgery.  You could try to do it live, but given that I've
never attempted this before, I thought it prudent to shutdown the
server, backup the database, and then do the update.

History rewriting in Git isn't like rm -f foo,v in CVS.  Its a
major effort for everyone involved.  Open source projects aren't
supposed to go around destroying their archives...

-- 
Shawn.


Back to the top