unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
@ 2011-09-14 10:20 Jambunathan K
  2011-09-14 11:09 ` Juanma Barranquero
  2013-11-15  5:08 ` Jambunathan K
  0 siblings, 2 replies; 10+ messages in thread
From: Jambunathan K @ 2011-09-14 10:20 UTC (permalink / raw)
  To: 9503


(vc-git): After applying a stash, refresh of *vc-dir* is a must.

Currently I do this manually.







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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 10:20 bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must Jambunathan K
@ 2011-09-14 11:09 ` Juanma Barranquero
  2011-09-14 18:18   ` Jambunathan K
  2011-09-15  4:35   ` Jambunathan K
  2013-11-15  5:08 ` Jambunathan K
  1 sibling, 2 replies; 10+ messages in thread
From: Juanma Barranquero @ 2011-09-14 11:09 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 9503

> (vc-git): After applying a stash, refresh of *vc-dir* is a must.
>
> Currently I do this manually.

Refreshing *vc-dir* can be slow. What if you apply several stashes
consecutively?

    Juanma





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 11:09 ` Juanma Barranquero
@ 2011-09-14 18:18   ` Jambunathan K
  2011-09-14 18:45     ` Stefan Monnier
  2011-09-14 18:49     ` Juanma Barranquero
  2011-09-15  4:35   ` Jambunathan K
  1 sibling, 2 replies; 10+ messages in thread
From: Jambunathan K @ 2011-09-14 18:18 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 9503

Juanma Barranquero <lekktu@gmail.com> writes:

>> (vc-git): After applying a stash, refresh of *vc-dir* is a must.
>>
>> Currently I do this manually.
>
> Refreshing *vc-dir* can be slow. What if you apply several stashes
> consecutively?

I would prefer to have some sort of visual feedback that confirms that
the application of stash has succeeded. Otherwise I just keep staring at
the screen hoping something would happen.

I do have `vc-command-messages' set to t. I see OK in the echo area. If
I turn that setting off the only visible feedback is the
hour-glass->normal cursor.

Under the absence of any visual cue in the echo area, I just keep
staring at the screen. This has happened even after I filed this report.

Do you think a prefix arg or a customization variable is in order?

Couple of tangential remarks:

1. Any reason why `vc-git-stash-delete-at-point' runs
   `vc-dir-refresh'. (I believe this is an unwanted side-effect of stash
   menu sharing the same space as the modified file list)

2. I have been using vc-git for quite sometime (> 10 months) now. It's
   only a few days back that I realized that the stash lines have
   keymaps associated with them (I always thought that they were zombie
   informational lines). Anyway the stash lines could be highlighted if
   the point moves to that line or permanently use a different (keymap?)
   face. (I don't use mouse that often and I noticed the highlight
   behaviour only after doing a C-u C-x =)

3. Apropos applying several stashes, it seems that at some point in
   distant future someone would cookup a way to mark and re-order
   stashes (much like interactive rebase menu in the git command line).

   I think the most `intuitive' interface for re-ordering stashes would
   be killing and yanking (Think of C-k and C-y in gnus-topic mode).

   IMHO, In that case the current binding of using C-k to delete the
   stash would come in the way.

You can close this bug if you think it is too frivolous.

>     Juanma





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 18:18   ` Jambunathan K
@ 2011-09-14 18:45     ` Stefan Monnier
  2011-09-14 18:49     ` Juanma Barranquero
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2011-09-14 18:45 UTC (permalink / raw)
  To: Jambunathan K; +Cc: Juanma Barranquero, 9503

> I would prefer to have some sort of visual feedback that confirms that
> the application of stash has succeeded. Otherwise I just keep staring at
> the screen hoping something would happen.

Agreed.  We should do our best to keep the *vc-dir* display up-to-date,
and in the case in point we know the display to be out of date, so
we're not doing our best.


        Stefan





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 18:18   ` Jambunathan K
  2011-09-14 18:45     ` Stefan Monnier
@ 2011-09-14 18:49     ` Juanma Barranquero
  2011-09-15  4:51       ` Jambunathan K
  1 sibling, 1 reply; 10+ messages in thread
From: Juanma Barranquero @ 2011-09-14 18:49 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 9503

On Wed, Sep 14, 2011 at 20:18, Jambunathan K <kjambunathan@gmail.com> wrote:

> I would prefer to have some sort of visual feedback that confirms that
> the application of stash has succeeded. Otherwise I just keep staring at
> the screen hoping something would happen.

Agreed.

> Do you think a prefix arg or a customization variable is in order?

A prefix arg, for the case that you *don't* want the autoupdate,
perhaps. Your case is surely more common that the one where the user
wants to apply several stashes at once. As for the variable, it
wouldn't be useful if you usually apply one stash, and in a few cases
you want to apply several.

> You can close this bug if you think it is too frivolous.

No, not at all. I just wondered about the other use case, because it
isn't uncommon for me.

    Juanma





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 11:09 ` Juanma Barranquero
  2011-09-14 18:18   ` Jambunathan K
@ 2011-09-15  4:35   ` Jambunathan K
  2011-09-15  7:34     ` Andreas Schwab
  1 sibling, 1 reply; 10+ messages in thread
From: Jambunathan K @ 2011-09-15  4:35 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 9503

Juanma Barranquero <lekktu@gmail.com> writes:

>> (vc-git): After applying a stash, refresh of *vc-dir* is a must.
>>
>> Currently I do this manually.
>
> Refreshing *vc-dir* can be slow. What if you apply several stashes
> consecutively?

Applying stash on a dirty tree produces the following error message from
git:

--8<---------------cut here---------------start------------->8---
"Cannot apply to a dirty working tree, please stage your changes"
--8<---------------cut here---------------end--------------->8---

Even if one is applyin stashes serially, one HAS to always commit the
stash before applying the next one. 


>
>     Juanma





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 18:49     ` Juanma Barranquero
@ 2011-09-15  4:51       ` Jambunathan K
  0 siblings, 0 replies; 10+ messages in thread
From: Jambunathan K @ 2011-09-15  4:51 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 9503

Juanma Barranquero <lekktu@gmail.com> writes:

> On Wed, Sep 14, 2011 at 20:18, Jambunathan K <kjambunathan@gmail.com> wrote:
>
>> I would prefer to have some sort of visual feedback that confirms that
>> the application of stash has succeeded. Otherwise I just keep staring at
>> the screen hoping something would happen.
>
> Agreed.
>
>> Do you think a prefix arg or a customization variable is in order?
>
> A prefix arg, for the case that you *don't* want the autoupdate,
> perhaps. Your case is surely more common that the one where the user
> wants to apply several stashes at once. As for the variable, it
> wouldn't be useful if you usually apply one stash, and in a few cases
> you want to apply several.

Considering that stashes cannot be applied on a dirty tree, refreshing
the *vc-dir* would invariably follow (if one is committing from within
Emacs)

There seem to be only two options after a clean application of stash
1. Continue modify the working tree.
2. Commit the stash.

May be the prefix arg could be used to mean (2) above? I am more likely
to do (1) than (2).

Now I believe there is a strong case for refreshing *vc-dir*.

>> You can close this bug if you think it is too frivolous.
>
> No, not at all. I just wondered about the other use case, because it
> isn't uncommon for me.


>     Juanma





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-15  4:35   ` Jambunathan K
@ 2011-09-15  7:34     ` Andreas Schwab
  2011-09-15  8:07       ` Jambunathan K
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2011-09-15  7:34 UTC (permalink / raw)
  To: Jambunathan K; +Cc: Juanma Barranquero, 9503

Jambunathan K <kjambunathan@gmail.com> writes:

> Applying stash on a dirty tree produces the following error message from
> git:
>
> "Cannot apply to a dirty working tree, please stage your changes"
>
> Even if one is applyin stashes serially, one HAS to always commit the
> stash before applying the next one. 

Only if the stashes overlap.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-15  7:34     ` Andreas Schwab
@ 2011-09-15  8:07       ` Jambunathan K
  0 siblings, 0 replies; 10+ messages in thread
From: Jambunathan K @ 2011-09-15  8:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Juanma Barranquero, 9503

Andreas Schwab <schwab@linux-m68k.org> writes:

> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Applying stash on a dirty tree produces the following error message from
>> git:
>>
>> "Cannot apply to a dirty working tree, please stage your changes"
>>
>> Even if one is applyin stashes serially, one HAS to always commit the
>> stash before applying the next one. 
>
> Only if the stashes overlap.

That is what I would have expected but that is not what I observed with
a little test that stashed *two different* files on the same HEAD.

My git version is 1.7.2.3. The release notes for git 1.7.5.1 has the
following entry

,----
|  * "git stash apply" used to refuse to work if there was any change in
|  the working tree, even when the change did not overlap with the
|  change the stash recorded.
`----

So I would (favorably) assume that the above bug is also present in
1.7.2.3 version of git. I agree that I shouldn't have based my opinions
on a buggy behaviour and trusted my instincts.

Anyways, the maintainers have agreed to the change I requested. So the
above note is only to clarify my eariler comments.






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

* bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must
  2011-09-14 10:20 bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must Jambunathan K
  2011-09-14 11:09 ` Juanma Barranquero
@ 2013-11-15  5:08 ` Jambunathan K
  1 sibling, 0 replies; 10+ messages in thread
From: Jambunathan K @ 2013-11-15  5:08 UTC (permalink / raw)
  To: 9503-done


OP here. Closed.





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

end of thread, other threads:[~2013-11-15  5:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-14 10:20 bug#9503: 24.0.50; (vc-git): After applying a stash, refresh of *vc-dir* is a must Jambunathan K
2011-09-14 11:09 ` Juanma Barranquero
2011-09-14 18:18   ` Jambunathan K
2011-09-14 18:45     ` Stefan Monnier
2011-09-14 18:49     ` Juanma Barranquero
2011-09-15  4:51       ` Jambunathan K
2011-09-15  4:35   ` Jambunathan K
2011-09-15  7:34     ` Andreas Schwab
2011-09-15  8:07       ` Jambunathan K
2013-11-15  5:08 ` Jambunathan K

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).