git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Semantics of a workspace checkpoint
@ 2005-06-16  8:21 Jon Seymour
  2005-06-16  8:28 ` Petr Baudis
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Seymour @ 2005-06-16  8:21 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Linus Torvalds, Junio C Hamano, Petr Baudis

I'd like to propose these as the semantics for the checkpointing of a workspace

On checkpoint, create a file called:

.git/checkpoint/<treeid>

where the contents of the file are:
    exactly identical to the index file immediately prior to the
checkpoint being performed

and the treeid is the tree that results from:

    git-update-cache $(git-diff-files | cut -f2)
    git-write-tree

To restore from the checkpoint, one does:

    /* magic to remove files that are not in the resulting tree */
    git-read-tree -m <treeid>
    git-checkout-cache -u -f -a
    cp .git/checkpoints/<treeid> .git/index

Comments?
-- 
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-16  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-16  8:21 Semantics of a workspace checkpoint Jon Seymour
2005-06-16  8:28 ` Petr Baudis
2005-06-16  9:00   ` Jon Seymour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).