* Resurrecting an old git-stash discussion
@ 2009-05-04 1:35 David Aguilar
0 siblings, 0 replies; only message in thread
From: David Aguilar @ 2009-05-04 1:35 UTC (permalink / raw)
To: git; +Cc: gitster, nanako3, kevinlsk
A long time ago there was a patch that made git-stash
configurable:
http://lists.zerezo.com/git/msg641406.html
Junio's conclusion at the time was:
"The decision here is that I am open to a change that
implements the one-time safety instruction."
http://lists.zerezo.com/git/msg641442.html
Would this be something worth implementing after this
release cycle?
If so, would this be the basic logic?:
If stash.quick is undefined:
- Alert the user to what's going on
- Ask them whether they'd like to enable the quick behavior,
or exit (thus leaving stash.quick undefined).
Valid values for stash.quick are then either undefined
or 'save'.
Is it still a good idea to implement the one-time
safety instruction?
I just thought I'd ask. Why?
A co-worker ran into this funny situation last week:
git branch
git stash # oops, didn't mean that
git stash help # prints usage, though only by luck
git branch help # oops, didn't mean that
There's a limit to guarding against the uneducated and by no
means do I think the 2nd "oops"'s behavior should be changed.
With the proposed change we would've warned him at the first
"oops", and that's better than nothing.
The above is a silly example despite the fact that it
actually happened. 'rm help' happily removes your 'help'
file. I just figured I'd mention it since maybe instead of
printing usage stash should also warn:
Error: unknown command 'help'.
Run 'git help stash' for more information.
Regarding the 'first time warning' thing:
97bc00a: Emit helpful status for accidental "git stash" save
..seems like it already addressed the issue by telling
users how to apply the stash. That makes the case for
the first-time-warning much less compelling.
Hmm.. maybe I just answered my own question ;)
The "unknown command 'help'" thing might be good nonetheless,
though.
--
David
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-04 1:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 1:35 Resurrecting an old git-stash discussion David Aguilar
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.