all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: 13069@debbugs.gnu.org
Subject: bug#13069: 24.3.50; vc-dir: Unify git stashing and bzr shelving
Date: Thu, 20 Dec 2012 23:22:03 -0500	[thread overview]
Message-ID: <jwv38z0oxkp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8738zn2n8b.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 03 Dec 2012 20:31:56 +0530")

> (defun vc-stash (name)
>   "Stash current working tree."
>   (interactive "sName: ")
>   (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
> 	 (backend (car vc-fileset))
> 	 (files (cadr vc-fileset)))
>     (vc-call-backend backend 'stash name)))

I think we should pass `files' as well.

>   "Take a snapshot of working tree."

Not sure what this means, really.  Especially since the doc of "bzr
shelve --all" is not clear either about what it does (IOW in what way is
it different from "bzr shelve").

> (defun vc-stash-pop ()
>   "Pop newest stash."
>   (interactive)
>   (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
> 	 (backend (car vc-fileset))
> 	 (files (cadr vc-fileset))
> 	 (name (vc-stash-name)))
>     (when name
>       (vc-call-backend backend 'stash-pop name))))

I don't think we should impose a stack discipline.  I.e. vc-stash-name
should be replaced by vc-stash-list and then vc-stash-pop should ask the
user to choose among one of the stashes.

Also the stash-pop method should take an extra arg to control whether or
not the stash should be thrown away after application.  And maybe we
shouldn't have a stash-pop at all and instead of stash-apply and
stash-remove, since we'll need stash-remove anyway in order to allow
deleting a stash without applying it.


        Stefan





      parent reply	other threads:[~2012-12-21  4:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 15:01 bug#13069: 24.3.50; vc-dir: Unify git stashing and bzr shelving Jambunathan K
2002-01-01  0:37 ` Jambunathan K
2012-12-21  3:22 ` Chong Yidong
2012-12-21  4:22 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv38z0oxkp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13069@debbugs.gnu.org \
    --cc=kjambunathan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.