JP Vossen on 16 Nov 2017 11:23:05 -0800


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

Re: [PLUG] Revision Control for the Rest of Us


On 11/16/2017 10:08 AM, Rich Freeman wrote:
On Wed, Nov 15, 2017 at 9:16 PM, JP Vossen <jp@jpsdomain.org> wrote:
And damn it, mutable
history is a BUG not a feature (unless your project is at the scope and
scale of the Linux kernel)!


While accidentally mutable history is a bug, I'm not sure that it is
wise to leave the option closed.  I'll give some use cases:

<snip>

You forgot one: "oops, I just committed the super-secret password/private key!" But that's really just a special case of your 50G example.

And...yup. In those very special and hopefully very rare cases, mutable history makes sense. I *still* think it's a bug, 99.999% of the time.

The solution in all of those cases is:
	1. Dump the repo
	2. Edit the dump to remove the Bad Thing
	3. Import the dump

Does that really, REALLY suck for all kinds of reasons? Yup. So...don't commit Bad Things.

Someone (prolly ESR but I don't feel like finding the citation) made some points that Git's "fast import" feature basically forced the creation of a VCS independent repo format/language that all the current tools must support, one way or another. That simplifies the dump/restore problem, and worst case editing can be done by http://www.catb.org/esr/reposurgeon/reposurgeon.html.

Also, some tools allow you to uncommit the very last commit, so if you catch the problem right away (before a second commit or a push) you can fix it. E.g.:
* bzr uncommit			# Simple!
* git reset --soft HEAD^	# LOTS of variations
* hg rollback			# or maybe hg strip ...

Later,
JP
--  -------------------------------------------------------------------
JP Vossen, CISSP | http://www.jpsdomain.org/ | http://bashcookbook.com/
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug