The sound distributed version control system

#477 [CREDIT, FEATURE REQUEST] add --latest option

Closed on December 7, 2021
tankf33der on July 10, 2021

Idea, give a user ability to find the latest hash described a file, possible pseudo workflow:

$ pijul credit --latest src/main.c
MCBOKRYKOTOUY6HJ5LWNS3MTHV7TZO3CBLG5KSQJE45ROXL5GAVQC
$ pijul credit --latest src/io.c
IZK5NND4RBKR6OFLXJYXSWO56PJIB7NJHCV6VWWP6SGLSBSBE2EQC
$ pijul channel new feature1
$ pijul apply MCBOKRYKOTOUY6HJ5LWNS3MTHV7TZO3CBLG5KSQJE45ROXL5GAVQC --channel feature1
$ pijul apply IZK5NND4RBKR6OFLXJYXSWO56PJIB7NJHCV6VWWP6SGLSBSBE2EQC --channel feature1
$ pijul channel switch feature1
$ vim src/*.c
$ pijul record -am"implementation of feature1"
Hash: QHJU6QWIDWVN6HU3OGKBHZGHXNQ6PSI3353SULKFIHH7R42VNDAAC
$ pijul apply QHJU6QWIDWVN6HU3OGKBHZGHXNQ6PSI3353SULKFIHH7R42VNDAAC --channel main
$ pijul channel switch main
$ pijul channel delete feature1
$
tankf33der on July 10, 2021

For those who are curious workflow above could be without --latest:

$ pijul fork feature1
$ pijul channel switch feature1
$ vim src/main src/io.c
$ pijul record -am"implementation of feature1"
Hash: QHJU6QWIDWVN6HU3OGKBHZGHXNQ6PSI3353SULKFIHH7R42VNDAAC
$ pijul apply QHJU6QWIDWVN6HU3OGKBHZGHXNQ6PSI3353SULKFIHH7R42VNDAAC --channel main
$ pijul channel switch main
$ pijul channel delete feature1
$
spacefrogg on July 12, 2021

Coming from git, I would expect this function in pijul log -- <paths> with the benefit of showing the last N patches and descriptive context.

pmeunier added a change on December 7, 2021
6U42MTEZTINWUU2KLJLQW33ZBZXKTHPTF6TMEG56TO642CQDZQMQC
main
pmeunier on December 7, 2021

Hi! Thanks for the suggestion, I just fixed pijul log -- <paths>, which was broken and slow (because it was building a “filter” datastructure instead of checking lazily).

pmeunier closed this discussion on December 7, 2021