|
|
Subscribe / Log in / New account

Debian discusses Discourse

Debian discusses Discourse

Posted May 21, 2020 13:33 UTC (Thu) by mathstuf (subscriber, #69389)
In reply to: Debian discusses Discourse by nix
Parent article: Debian discusses Discourse

Using such functionality locally for backup purposes is fine, but I will judge if that branch goes for review :) .

Does it save commit history or is it a series of snapshots all sharing the same parent? Even better would be to reconstruct the history like Vim's (and probably Emacs') history tree too. If it's just a temporal snapshot history, a history viewer where you could collapse the nodes down by a time span would be nice.


to post comments

Debian discusses Discourse

Posted May 21, 2020 13:45 UTC (Thu) by farnz (subscriber, #17727) [Link]

This is one of the things I like about Mercurial's Changeset Evolution feature - I can have a messy pile of commits while I'm working, and then have a clean pile for review that I've fixed up, but that maintains the links to my messy pile so that I can see how I got there.

Debian discusses Discourse

Posted Jun 2, 2020 13:10 UTC (Tue) by nix (subscriber, #2304) [Link]

It uses branches named after the complete ref of the branch being saved under, e.g. for the branch I'm working on now (named 'oracle/ctf-next'), the working tree's state is saved in a branch named 'refs/wip/wtree/refs/heads/oracle/ctf-next', and the index's state is saved as 'refs/wip/index/refs/heads/oracle/ctf-next'. The names are a bit long, but customizable, and unambiguous. The commit log comments have got more useful since I looked at them last and now say why the wip is happening and what file is being newly preserved.

Every time you commit, the corresponding wip branches are restarted: the old ones are still accessible until the reflog expires (this is clunky, but I can't really see a way around it). You end up with wip branch history like this:

193b21c09b (refs/wip/index/refs/heads/oracle/ctf-next) autosave ld/lexsup.c after stage
9848c17b26 autosave ld/lexsup.c after stage
23ccc37ffb autosave ld/ldlex.h after stage
9ece7ac0f3 autosave ld/ldlang.c after stage
4652ac99a8 autosave ld/ldlang.c after stage
c9a78b787f autosave ld/ld.texi after stage
2e0966c4e8 autosave ld/ld.h after stage
bfd20b8df2 start autosaving index
bfeee83394 fixup! libctf, ld: add --ctf-variables and omit variables from CTF by default
fbcdd02300 libctf: add ctf_link_set_variable_filter
...

(where bfeee83394 is the last commit on the real branch.)

or this, for a working tree:

436a729994 (refs/wip/wtree/refs/heads/oracle/ctf-next) autosave ld/ldlex.h before stage
662a4b4ee5 autosave ld/ldlang.c before stage
1c3b615c7d autosave ld/ld.texi before stage
1dccab233e autosave ld/ld.h before stage
5958b6cd68 autosave ld/lexsup.c after save
22bfa4bcfb autosave ld/lexsup.c after save
c744e6c41f autosave ld/lexsup.c after save
76c6a6e074 autosave ld/lexsup.c after save
caf21622cb autosave ld/lexsup.c after save
f7d813e9f5 autosave ld/lexsup.c after save
a486e6417e start autosaving worktree
bfeee83394 fixup! libctf, ld: add --ctf-variables and omit variables from CTF by default

Manual: https://magit.vc/manual/magit/Wip-Modes.html


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds