Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> nothing is really reversible

Will Pijul ever support something like git's interactive rebase? I find myself using that constantly. One common flow for me: make some commits, make a final commit bumping my package version, realize I forgot something, make another commit, git rebase -i to move it before the version bump, git push.



As I understand it this isn't really a meaningful operation to Pijul (or Darcs, or patch-theory-based version control in general). The version bump commit and the final commit don't depend on each other so they're not inherently ordered.


What if they do depend on each other though? E.g. you added a changelog but spelt its filename wrong or something.


The backing algorithms figure that out and include all the necessary patches, applying them in an order that works.

Without understanding the theory behind it, it sounds a lot like magic, but apparently it works.


That does sound like magic. If I made the following three commits in order, how would it figure out that the last commit depends on the first commit but not on the second one?

+ import foo

+ import bar

+ foo.hello()


That's not the sense of "depends on" that applies here. It's a textual relationship- in this case, I believe the last commit would depend on the second, which would depend on the first.

If you're familiar with CRDTs, they're closely related. Patches store enough information to commute, so a given state (e.g. a branch) can be described purely by a set of patches.


I also use got commit -i semi-regularly, but for this specific case, git commit--amend --no-edit (or possibly without no-edit, if you want) suffices.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: