{"thread":{"id":"43700","subject":"Would be nice to have a \"git-checkpoint\" command","startedAt":"2006-10-24T20:36:01Z","lastAt":"2006-10-24T20:36:01Z","messageCount":1,"participants":["Geert Bosch"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"296956","messageId":"8F8E6877-19F5-47F1-B7B6-E369BD39FC3E@adacore.com","threadId":"43700","inReplyTo":null,"subject":"Would be nice to have a \"git-checkpoint\" command","fromName":"Geert Bosch","fromEmail":"bosch@adacore.com","sentAt":"2006-10-24T20:36:01Z","receivedAt":"2006-10-24T20:36:01Z","isPatch":false,"sender":{"key":"bosch@adacore.com","avatar":null},"body":"(Just an idea, no code yet.)\n\nNAME\n----\ngit-checkpoint - Save current state of the repository\n\nSYNOPSIS\n--------\n'git-checkpoint' [--stdout] [-n]\n\nDESCRIPTION\n-----------\nThis command generates trees/blobs for all files\nin the current git repository, including untracked files\nand directories and the .git directory itself, only excluding\n.git/objects.\n\nWith no options given, tree id is saved in .git/UNDO\n\nOPTIONS\n-------\n--stdout::\n\tWrite tree id of repository state to standard output, and\n         do not write in .git/UNDO\n-n|--no-create::\n\tDon't actually create new objects. Implies --stdout\n\n\n(Discussion)\n\nThis could be used for implementing git-undo and git-redo commands.\nNote that an implicit chain of undo commands is kept, by restoring\nsuccessive .git/UNDO files. Of course git-undo should save a .git/REDO\nfile. Ideally both operations would keep a nice undo/redo stack.\n\nThe reason for not using commits is that this not meant for keeping\nhistory, just reverting mistakes. In particular, a prune will blow\naway all older UNDOs keeping just the last, which is fine. Doing a\ncheckpoint should always succeed and never require user interaction.\n\n"}]}