Subject: Re: Command-line interface thoughts

From: Paul Ebermann <[email-masked]>
Date: Sun, 05 Jun 2011 23:34:46 +0200

Michael Nahas skribis:

> "commit"
>    HEAD = new(HEAD + (NEXT-HEAD))
>    NEXT = HEAD
> "commit --amend"
>    HEAD = new(HEAD^ + (NEXT-HEAD^))
>    NEXT = HEAD

A better notation for creating a new commit would be something that
takes both the contents and the parents as arguments.

"commit:"
  HEAD = new(NEXT, HEAD)
  NEXT = HEAD
"commit --amend"
  HEAD = new(NEXT, all-parents-of(HEAD))
  NEXT = HEAD

> "stash save"
>    STASH = new(new(HEAD+(NEXT-HEAD))+WTREE-NEXT)
>    NEXT = HEAD
>    WTREE = HEAD
>    push(STASH)

"stash save"
  STASH = new(WTREE, HEAD, new(NEXT, HEAD))
  NEXT = HEAD
  WTREE = HEAD
  push(STASH)

And similar.

Paul