HackerTrans
TopNewTrendsCommentsPastAskShowJobs

swisspol

no profile record

Submissions

[untitled]

1 points·by swisspol·9 bulan yang lalu·0 comments

comments

swisspol
·5 tahun yang lalu·discuss
Hey I didn't gave up on it at 80% functionality ;) It had 100% for my needs and it's been rock stable since then - I still use it daily!

But yes, I wasn't really worth actively maintaining it as it was feature complete and I didn't intend to build a business out of it.
swisspol
·5 tahun yang lalu·discuss
GitUp uses libgit2 under the hood. GitUpKit is an Obj-C wrapper I wrote at the time to make it much easier to use.

Unlimited undo / redo is achieved by taking a snapshot of the entire repo before and after any operation (e.g. checking out the repo or creating a branch etc...). The inspiration I had at the time was that is it is trivially cheap to take such snapshots: essentially all you need is a list of all the refs.

Then when you need to undo, you have 3 things: 1 - current state of all the refs in the repo 2 - state of all the refs from the before snapshot 3 - state of all the refs from the after snapshot Compute the delta between 3 -> 2 and apply on top of 1.

The same technique allows to do the Time Machine feature.