From: Junio C Hamano <hidden> Date: 2016-06-15 22:44:00
Benoit Sigoure [off-list ref] writes:
On Dec 18, 2007, at 12:00 AM, Junio C Hamano wrote:
quoted
Benoit Sigoure [off-list ref] writes:
quoted
... The current behavior of git stash is very
dangerous ...
...
quoted
This is a plain FUD, isn't it? The first Oops should not happen these
days.
*git pull in git*
*reads Documentation/RelNotes-1.5.4.txt*
Blah. I didn't know follow the development over the past 3 weeks well
enough, sorry for the noise. I'm glad that this was improved.
But the original point by Sebastian hasn't been answered. He wanted to
make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users did
not want it. IIRC, the argument went like: "when I say 'stash', that is
because I want a quick and immediate way to stash, and I do not want a
list. If I do not have to have a quick way, I would create a temporary
commit on the current branch, or switch to a temporary branch and commit
there."
From: Sebastian Harl <hidden> Date: 2016-06-15 22:44:00
Hi,
On Mon, Dec 17, 2007 at 04:31:12PM -0800, Junio C Hamano wrote:
But the original point by Sebastian hasn't been answered. He wanted to
make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users did
not want it. IIRC, the argument went like: "when I say 'stash', that is
because I want a quick and immediate way to stash, and I do not want a
list. If I do not have to have a quick way, I would create a temporary
commit on the current branch, or switch to a temporary branch and commit
there."
Well, "git stash save" is just five characters more - I really don't see why
this would be less comfortable (and for the really lazy people there are still
aliases...). On the other hand (if "list" is the default), we'd get a more
consistent interface which imho is imho more important than typing five
characters less.
Cheers,
Sebastian
--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:00
Hi,
On Tue, 18 Dec 2007, Sebastian Harl wrote:
On Mon, Dec 17, 2007 at 04:31:12PM -0800, Junio C Hamano wrote:
quoted
But the original point by Sebastian hasn't been answered. He wanted
to make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users
did not want it. IIRC, the argument went like: "when I say 'stash',
that is because I want a quick and immediate way to stash, and I do
not want a list. If I do not have to have a quick way, I would create
a temporary commit on the current branch, or switch to a temporary
branch and commit there."
Well, "git stash save" is just five characters more - I really don't see
why this would be less comfortable (and for the really lazy people there
are still aliases...). On the other hand (if "list" is the default),
we'd get a more consistent interface which imho is imho more important
than typing five characters less.
It's more about what you're used to. I had an alias named 'stash' long
before it became a git command. And now guess how _annoying_ it would be
to type "git stash<Return><Curse out loud at my mouse>git stash
save<Return>".
As you see, it is more than five characters more.
Ciao,
Dscho
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:44:00
Johannes Schindelin wrote:
Hi,
On Tue, 18 Dec 2007, Sebastian Harl wrote:
quoted
On Mon, Dec 17, 2007 at 04:31:12PM -0800, Junio C Hamano wrote:
quoted
But the original point by Sebastian hasn't been answered. He wanted
to make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users
did not want it. IIRC, the argument went like: "when I say 'stash',
that is because I want a quick and immediate way to stash, and I do
not want a list. If I do not have to have a quick way, I would create
a temporary commit on the current branch, or switch to a temporary
branch and commit there."
Well, "git stash save" is just five characters more - I really don't see
why this would be less comfortable (and for the really lazy people there
are still aliases...). On the other hand (if "list" is the default),
we'd get a more consistent interface which imho is imho more important
than typing five characters less.
It's more about what you're used to. I had an alias named 'stash' long
before it became a git command. And now guess how _annoying_ it would be
to type "git stash<Return><Curse out loud at my mouse>git stash
save<Return>".
Not nearly as annoying as losing work because of it, and you obviously
*know* what to do when you're done cursing, while clueless-newbie-X just
hops away and uses subversion.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:00
Hi,
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
Johannes Schindelin wrote:
quoted
On Tue, 18 Dec 2007, Sebastian Harl wrote:
quoted
On Mon, Dec 17, 2007 at 04:31:12PM -0800, Junio C Hamano wrote:
quoted
But the original point by Sebastian hasn't been answered. He
wanted to make the command list the stash without arguments.
This was discussed already in the early days of stash and there
indeed was a suggestion to do so (I think I sided with that), but
the users did not want it. IIRC, the argument went like: "when I
say 'stash', that is because I want a quick and immediate way to
stash, and I do not want a list. If I do not have to have a quick
way, I would create a temporary commit on the current branch, or
switch to a temporary branch and commit there."
Well, "git stash save" is just five characters more - I really don't
see why this would be less comfortable (and for the really lazy
people there are still aliases...). On the other hand (if "list" is
the default), we'd get a more consistent interface which imho is
imho more important than typing five characters less.
It's more about what you're used to. I had an alias named 'stash'
long before it became a git command. And now guess how _annoying_ it
would be to type "git stash<Return><Curse out loud at my mouse>git
stash save<Return>".
Not nearly as annoying as losing work because of it, and you obviously
*know* what to do when you're done cursing, while clueless-newbie-X just
hops away and uses subversion.
Really? Clueless-newbie-X certainly knows how to apply the stash,
otherwise she would not have used the command, right?
In the alternative, you could just scrap all those default actions,
showing synopses instead. For all commands, including "git commit", "git
log", "git fetch", etc.
See?
Ciao,
Dscho
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:44:00
Johannes Schindelin wrote:
Hi,
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
quoted
Johannes Schindelin wrote:
quoted
On Tue, 18 Dec 2007, Sebastian Harl wrote:
quoted
On Mon, Dec 17, 2007 at 04:31:12PM -0800, Junio C Hamano wrote:
quoted
But the original point by Sebastian hasn't been answered. He
wanted to make the command list the stash without arguments.
This was discussed already in the early days of stash and there
indeed was a suggestion to do so (I think I sided with that), but
the users did not want it. IIRC, the argument went like: "when I
say 'stash', that is because I want a quick and immediate way to
stash, and I do not want a list. If I do not have to have a quick
way, I would create a temporary commit on the current branch, or
switch to a temporary branch and commit there."
Well, "git stash save" is just five characters more - I really don't
see why this would be less comfortable (and for the really lazy
people there are still aliases...). On the other hand (if "list" is
the default), we'd get a more consistent interface which imho is
imho more important than typing five characters less.
It's more about what you're used to. I had an alias named 'stash'
long before it became a git command. And now guess how _annoying_ it
would be to type "git stash<Return><Curse out loud at my mouse>git
stash save<Return>".
Not nearly as annoying as losing work because of it, and you obviously
*know* what to do when you're done cursing, while clueless-newbie-X just
hops away and uses subversion.
Really? Clueless-newbie-X certainly knows how to apply the stash,
otherwise she would not have used the command, right?
Far too many times I've seen people expect help output if the command
they're running is even remotely dangerous, so they go ahead and run
it without arguments to see what it does.
In the alternative, you could just scrap all those default actions,
showing synopses instead. For all commands, including "git commit", "git
log", "git fetch", etc.
Like we do for the git wrapper, you mean? Yes, that would be one solution,
although not a very good one for all commands.
It's probably not a bad idea for commands where the primary use is
something else than producing visual output though, such as tag or branch,
but those handle creation/deletion of stuff, so the default action for them
is to list stuff of the kind they operate on. I fail to see why stash should
be any different.
See?
Not really, no. What was your point?
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:00
Hi,
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
Johannes Schindelin wrote:
quoted
In the alternative, you could just scrap all those default actions,
showing synopses instead. For all commands, including "git commit",
"git log", "git fetch", etc.
Like we do for the git wrapper, you mean? Yes, that would be one
solution, although not a very good one for all commands.
Exactly. Not a good one.
It's probably not a bad idea for commands where the primary use is
something else than producing visual output though, such as tag or
branch, but those handle creation/deletion of stuff, so the default
action for them is to list stuff of the kind they operate on. I fail to
see why stash should be any different.
I also fail to see why stash should be any different. And that's why I
expect it to have a default operation, which is -- you guessed it --
"stash the changes!"
If I am not sure what I am about to do, there is -- wonder of wonders --
the "-h" option! And indeed:
$ git stash -h
Usage: /home/gitte/bin/git-stash [ | save | list | show | apply |
clear | create ]
So what exactly was your point again?
Ciao,
Dscho
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:44:00
Johannes Schindelin wrote:
Hi,
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
quoted
Johannes Schindelin wrote:
quoted
In the alternative, you could just scrap all those default actions,
showing synopses instead. For all commands, including "git commit",
"git log", "git fetch", etc.
Like we do for the git wrapper, you mean? Yes, that would be one
solution, although not a very good one for all commands.
Exactly. Not a good one.
quoted
It's probably not a bad idea for commands where the primary use is
something else than producing visual output though, such as tag or
branch, but those handle creation/deletion of stuff, so the default
action for them is to list stuff of the kind they operate on. I fail to
see why stash should be any different.
I also fail to see why stash should be any different. And that's why I
expect it to have a default operation, which is -- you guessed it --
"stash the changes!"
Actually, I guessed "list the stashes".
If I am not sure what I am about to do, there is -- wonder of wonders --
the "-h" option! And indeed:
$ git stash -h
Usage: /home/gitte/bin/git-stash [ | save | list | show | apply |
clear | create ]
So what exactly was your point again?
My point is that it would be nice if all git commands that actually
manipulate objects (create/delete/modify) had a safe default, and
that experienced users such as yourself could endure the insufferable
agony of retraining your fingers to type five more chars so that
people won't have to get bitten by surprises.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
El 18/12/2007, a las 15:22, Andreas Ericsson escribió:
Johannes Schindelin wrote:
quoted
Hi,
On Tue, 18 Dec 2007, Sebastian Harl wrote:
quoted
On Mon, Dec 17, 2007 at 04:31:12PM -0800, Junio C Hamano wrote:
quoted
But the original point by Sebastian hasn't been answered. He
wanted to make the command list the stash without arguments.
This was discussed already in the early days of stash and there
indeed was a suggestion to do so (I think I sided with that), but
the users did not want it. IIRC, the argument went like: "when I
say 'stash', that is because I want a quick and immediate way to
stash, and I do not want a list. If I do not have to have a
quick way, I would create a temporary commit on the current
branch, or switch to a temporary branch and commit there."
Well, "git stash save" is just five characters more - I really
don't see why this would be less comfortable (and for the really
lazy people there are still aliases...). On the other hand (if
"list" is the default), we'd get a more consistent interface which
imho is imho more important than typing five characters less.
It's more about what you're used to. I had an alias named 'stash'
long before it became a git command. And now guess how _annoying_
it would be to type "git stash<Return><Curse out loud at my
mouse>git stash save<Return>".
Not nearly as annoying as losing work because of it, and you obviously
*know* what to do when you're done cursing, while clueless-newbie-X
just
hops away and uses subversion.
There's not really any peril of losing work here, seeing as this
should be a lossless round trip:
git stash
# oops! didn't mean to save
git stash apply
We could help clueless-newbie-X here by augmenting the save output:
Saved "WIP on master: 8ed8a26... s"
HEAD is now at 8ed8a26... s
As follows (or similar):
Saved working directory and index state "WIP on master: 8ed8a26... s"
(To restore them type "git stash apply")
HEAD is now at 8ed8a26... s
ie. we explicitly tell them what was saved (their working directory
and index state), and also how to get it back immediately if that's
not what they meant to do. Something like this (no doubt will be
whitespace-mangled because I'm pasting this into my email client, but
it's just to demo the idea):
@@ -99,7 +99,8 @@ save_stash () {gitupdate-ref-m"$stash_msg"$ref_stash$w_commit||die"Cannot save the current status"-printf>&2'Saved "%s"\n'"$stash_msg"+printf>&2'Saved working directory and index state "%s"\n'
"$stash_msg"
+ echo >&2 '(To restore them type "git stash apply")'
}
have_stash () {
Cheers,
Wincent
From: Jakub Narebski <hidden> Date: 2016-06-15 22:44:00
Andreas Ericsson [off-list ref] writes:
Johannes Schindelin wrote:
quoted
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
quoted
Johannes Schindelin wrote:
quoted
In the alternative, you could just scrap all those default
actions, showing synopses instead. For all commands, including
"git commit", "git log", "git fetch", etc.
Like we do for the git wrapper, you mean? Yes, that would be one
solution, although not a very good one for all commands.
Exactly. Not a good one.
quoted
It's probably not a bad idea for commands where the primary use is
something else than producing visual output though, such as tag or
branch, but those handle creation/deletion of stuff, so the default
action for them is to list stuff of the kind they operate on. I
fail to see why stash should be any different.
I also fail to see why stash should be any different. And that's why
I expect it to have a default operation, which is -- you guessed it --
"stash the changes!"
Actually, I guessed "list the stashes".
quoted
If I am not sure what I am about to do, there is -- wonder of wonders --
the "-h" option! And indeed:
$ git stash -h
Usage: /home/gitte/bin/git-stash [ | save | list | show |
apply | clear | create ]
So what exactly was your point again?
My point is that it would be nice if all git commands that actually
manipulate objects (create/delete/modify) had a safe default, and
that experienced users such as yourself could endure the insufferable
agony of retraining your fingers to type five more chars so that
people won't have to get bitten by surprises.
Also for "git commit"?
In my opinion _basic_ usage of git-stash is simply using it with
one stash only: "git stash" / "git unstash" (i.e. "git stash apply";
by the way this is one (beside "git view") use case for builtin
predefined aliases). Using it with multiple stashes (only then
"git stash list" is needed) is advanced usage; and for advanced
usage longer form is preferred, I think.
"git branch", "git log" and "git remote" are horse of differenc color
because the _cannot_ function without name of branch/tag/remote given,
so hey provide "list" when no name was given.
--
Jakub Narebski
Poland
ShadeHawk on #git
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:44:00
Jakub Narebski wrote:
Andreas Ericsson [off-list ref] writes:
quoted
Johannes Schindelin wrote:
quoted
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
quoted
Johannes Schindelin wrote:
quoted
In the alternative, you could just scrap all those default
actions, showing synopses instead. For all commands, including
"git commit", "git log", "git fetch", etc.
Like we do for the git wrapper, you mean? Yes, that would be one
solution, although not a very good one for all commands.
Exactly. Not a good one.
quoted
It's probably not a bad idea for commands where the primary use is
something else than producing visual output though, such as tag or
branch, but those handle creation/deletion of stuff, so the default
action for them is to list stuff of the kind they operate on. I
fail to see why stash should be any different.
I also fail to see why stash should be any different. And that's why
I expect it to have a default operation, which is -- you guessed it --
"stash the changes!"
Actually, I guessed "list the stashes".
quoted
If I am not sure what I am about to do, there is -- wonder of wonders --
the "-h" option! And indeed:
$ git stash -h
Usage: /home/gitte/bin/git-stash [ | save | list | show |
apply | clear | create ]
So what exactly was your point again?
My point is that it would be nice if all git commands that actually
manipulate objects (create/delete/modify) had a safe default, and
that experienced users such as yourself could endure the insufferable
agony of retraining your fingers to type five more chars so that
people won't have to get bitten by surprises.
Also for "git commit"?
git commit has a very safe default; It runs "git status" and exits.
In my opinion _basic_ usage of git-stash is simply using it with
one stash only: "git stash" / "git unstash" (i.e. "git stash apply";
by the way this is one (beside "git view") use case for builtin
predefined aliases). Using it with multiple stashes (only then
"git stash list" is needed) is advanced usage; and for advanced
usage longer form is preferred, I think.
Perhaps. I'll stop quibbling about it. I don't care very deeply
about it anyway.
"git branch", "git log" and "git remote" are horse of differenc color
because the _cannot_ function without name of branch/tag/remote given,
so hey provide "list" when no name was given.
git stash takes a name too. It's optional though, and has caused any
number of source lines to be rewritten by grumbling authors who just
started to like git a little less because of it (yes, I know that has
been fixed, but it makes me look twice when discussing defaults for
git stash).
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:00
Hi,
On Tue, 18 Dec 2007, Andreas Ericsson wrote:
Jakub Narebski wrote:
quoted
Andreas Ericsson [off-list ref] writes:
quoted
My point is that it would be nice if all git commands that actually
manipulate objects (create/delete/modify) had a safe default, and
that experienced users such as yourself could endure the
insufferable agony of retraining your fingers to type five more
chars so that people won't have to get bitten by surprises.
Also for "git commit"?
git commit has a very safe default; It runs "git status" and exits.
Not in my universe. It starts an editor, and then commits what I staged.
quoted
In my opinion _basic_ usage of git-stash is simply using it with one
stash only: "git stash" / "git unstash" (i.e. "git stash apply"; by
the way this is one (beside "git view") use case for builtin
predefined aliases). Using it with multiple stashes (only then "git
stash list" is needed) is advanced usage; and for advanced usage
longer form is preferred, I think.
Perhaps. I'll stop quibbling about it. I don't care very deeply about it
anyway.
Ah. That explains why you made a case against the default operation ;-)
Ciao,
Dscho
From: Jörg Sommer <hidden> Date: 2016-06-15 22:44:00
Hi,
Junio C Hamano schrieb am Mon 17. Dec, 16:31 (-0800):
Benoit Sigoure [off-list ref] writes:
quoted
quoted
Benoit Sigoure [off-list ref] writes:
quoted
... The current behavior of git stash is very
dangerous ...
...
quoted
This is a plain FUD, isn't it? The first Oops should not happen these
days.
But the original point by Sebastian hasn't been answered. He wanted to
make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users did
not want it. IIRC, the argument went like: "when I say 'stash', that is
because I want a quick and immediate way to stash, and I do not want a
list. If I do not have to have a quick way, I would create a temporary
commit on the current branch, or switch to a temporary branch and commit
there."
When it should go quick why don't use an alias. git stash can print the
list and everyone who wants a quick stash can create an alias for this.
I vote for stash print the list, because I dropped in the pitfall.
Bye, Jörg.
--
Die beste Tarnung ist die Wahrheit. Die glaubt einem keiner!
(Max Frisch: ‚Biedermann und die Brandstifter‘)
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:00
Hi,
[please do not cull me from the Cc list, should you reply to this]
On Tue, 18 Dec 2007, J?rg Sommer wrote:
Junio C Hamano schrieb am Mon 17. Dec, 16:31 (-0800):
quoted
Benoit Sigoure [off-list ref] writes:
quoted
quoted
Benoit Sigoure [off-list ref] writes:
quoted
... The current behavior of git stash is very
dangerous ...
...
quoted
This is a plain FUD, isn't it? The first Oops should not happen
these days.
But the original point by Sebastian hasn't been answered. He wanted
to make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users
did not want it. IIRC, the argument went like: "when I say 'stash',
that is because I want a quick and immediate way to stash, and I do
not want a list. If I do not have to have a quick way, I would create
a temporary commit on the current branch, or switch to a temporary
branch and commit there."
When it should go quick why don't use an alias. git stash can print the
list and everyone who wants a quick stash can create an alias for this.
I vote for stash print the list, because I dropped in the pitfall.
And in a fresh clone, this list is empty, showing nothing at all. Leading
the other half of the users to believe that the stash succeeded.
If stashing as the default operation of stash is ill-advised, showing the
list is even more so.
Ciao,
Dscho
From: André Goddard Rosa <hidden> Date: 2016-06-15 22:44:00
On Dec 18, 2007 1:42 PM, Jörg Sommer [off-list ref] wrote:
Hi,
Junio C Hamano schrieb am Mon 17. Dec, 16:31 (-0800):
quoted
Benoit Sigoure [off-list ref] writes:
quoted
quoted
Benoit Sigoure [off-list ref] writes:
quoted
... The current behavior of git stash is very
dangerous ...
...
quoted
This is a plain FUD, isn't it? The first Oops should not happen these
days.
But the original point by Sebastian hasn't been answered. He wanted to
make the command list the stash without arguments.
This was discussed already in the early days of stash and there indeed
was a suggestion to do so (I think I sided with that), but the users did
not want it. IIRC, the argument went like: "when I say 'stash', that is
because I want a quick and immediate way to stash, and I do not want a
list. If I do not have to have a quick way, I would create a temporary
commit on the current branch, or switch to a temporary branch and commit
there."
When it should go quick why don't use an alias. git stash can print the
list and everyone who wants a quick stash can create an alias for this.
I vote for stash print the list, because I dropped in the pitfall.
I got caught by this default too. One vote more!
Regards,
--
[]s,
André Goddard
From: Martin Langhoff <hidden> Date: 2016-06-15 22:44:00
On Dec 19, 2007 4:42 AM, Jörg Sommer [off-list ref] wrote:
I vote for stash print the list, because I dropped in the pitfall.
I've dropped there myself, and work with a large team where we are
both fans of stash, and scarred by it. Any newcomer to git that
"discovers" stash gets hit by it a dozen times, this is completely
unnecesary.
All state-changing commands need parameters or are interactive (as
it's the case with git-commit). That Johannes & early adopters,
including me, have gotten used to the unintuitive (and dangerously
surprising) behaviour of stash is no excuse to inflict it upon actual
end users. It's way too early for git and the stash command to stick
to a misfeature in the name of backwards compat. We'll adapt, as we
have in the past, to an evolving ui.
And if -- in a new repo -- the list is empty, we can just say so:
Nothing has been stashed yet. Which looks completely different from a
successful stash 'save' command.
cheers,
m
El 19/12/2007, a las 0:41, Martin Langhoff escribió:
On Dec 19, 2007 4:42 AM, Jörg Sommer [off-list ref] wrote:
quoted
I vote for stash print the list, because I dropped in the pitfall.
I've dropped there myself, and work with a large team where we are
both fans of stash, and scarred by it. Any newcomer to git that
"discovers" stash gets hit by it a dozen times, this is completely
unnecesary.
I may be missing something here, but what's the danger here? An
unexpected stash is incredibly easy to revert, unless I'm missing
something. And nobody commented on the idea I posted earlier which
seems to address the concerns about newbies not knowing what "git
stash" with no params does:
http://marc.info/?l=git&m=119799257404542&w=2
Cheers,
Wincent
From: Martin Langhoff <hidden> Date: 2016-06-15 22:44:00
On Dec 19, 2007 8:33 PM, Wincent Colaiuta [off-list ref] wrote:
El 19/12/2007, a las 0:41, Martin Langhoff escribió:
quoted
On Dec 19, 2007 4:42 AM, Jörg Sommer [off-list ref] wrote:
quoted
I vote for stash print the list, because I dropped in the pitfall.
I've dropped there myself, and work with a large team where we are
both fans of stash, and scarred by it. Any newcomer to git that
"discovers" stash gets hit by it a dozen times, this is completely
unnecesary.
I may be missing something here, but what's the danger here? An
Surprise. Your working directory has *just* changed under your feet.
Maybe you have an editor with further unsaved changes that is about to
act confused whether you undo the stash or not.
unexpected stash is incredibly easy to revert, unless I'm missing
Once you know about it, yes it is. Once you know about the reflog, you
can sing and dance and never be worried. But for starting users, it's
a dangerous command.
And nobody commented on the idea I posted earlier which
seems to address the concerns about newbies not knowing what "git
stash" with no params does:
I agree with making stash more verbose -- if the unlucky new user is
paying close attention, they'll have instructions on to how to get out
of trouble. But I agree more with making it "just verbose, no action"
by default. There are two strong hints:
- all other state-changing commands take parameters
- quite a few people in this list have gotten burned with it
Even after knowing pretty well how stash works, I still get mixed up
sometimes with the 'clear/clean/list' stuff. Or have a typo in the
command.
cheers,
martin
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:44:00
Martin Langhoff wrote:
On Dec 19, 2007 8:33 PM, Wincent Colaiuta [off-list ref] wrote:
quoted
El 19/12/2007, a las 0:41, Martin Langhoff escribió:
quoted
On Dec 19, 2007 4:42 AM, Jörg Sommer [off-list ref] wrote:
quoted
I vote for stash print the list, because I dropped in the pitfall.
I've dropped there myself, and work with a large team where we are
both fans of stash, and scarred by it. Any newcomer to git that
"discovers" stash gets hit by it a dozen times, this is completely
unnecesary.
I may be missing something here, but what's the danger here? An
Surprise. Your working directory has *just* changed under your feet.
Maybe you have an editor with further unsaved changes that is about to
act confused whether you undo the stash or not.
quoted
unexpected stash is incredibly easy to revert, unless I'm missing
Once you know about it, yes it is. Once you know about the reflog, you
can sing and dance and never be worried. But for starting users, it's
a dangerous command.
quoted
And nobody commented on the idea I posted earlier which
seems to address the concerns about newbies not knowing what "git
stash" with no params does:
I agree with making stash more verbose -- if the unlucky new user is
paying close attention, they'll have instructions on to how to get out
of trouble. But I agree more with making it "just verbose, no action"
by default. There are two strong hints:
- all other state-changing commands take parameters
- quite a few people in this list have gotten burned with it
Even after knowing pretty well how stash works, I still get mixed up
sometimes with the 'clear/clean/list' stuff. Or have a typo in the
command.
The clear vs clean confusion has been remedied though, and you can no
longer create a named stash without using "git stash save" with a
recent enough version of git.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:00
Hi,
On Wed, 19 Dec 2007, Martin Langhoff wrote:
On Dec 19, 2007 8:33 PM, Wincent Colaiuta [off-list ref] wrote:
quoted
El 19/12/2007, a las 0:41, Martin Langhoff escribi?:
quoted
On Dec 19, 2007 4:42 AM, J?rg Sommer [off-list ref] wrote:
quoted
I vote for stash print the list, because I dropped in the pitfall.
I've dropped there myself, and work with a large team where we are
both fans of stash, and scarred by it. Any newcomer to git that
"discovers" stash gets hit by it a dozen times, this is completely
unnecesary.
I may be missing something here, but what's the danger here? An
Surprise. Your working directory has *just* changed under your feet.
Maybe you have an editor with further unsaved changes that is about to
act confused whether you undo the stash or not.
The funny thing: why do you call stash with unsaved changes anyway? I
mean, come on, even if you were planning to see the usage of stash (which
you would get with -h), you undoubtedly wanted to either stash or unstash
some changes. Otherwise you would not _need_ to see the usage to begin
with.
quoted
unexpected stash is incredibly easy to revert, unless I'm missing
Once you know about it, yes it is. Once you know about the reflog, you
can sing and dance and never be worried. But for starting users, it's
a dangerous command.
No.
Reflogs have nothing to do with it.
If you want to stash changes, you _got_ to know how to unstash those
changes. Otherwise "git reset --hard" would have been your friend.
And so, I cannot help but believe that all users of stash -- even the new
ones -- know about the fundamental concept of stashing/unstashing, and
therefore it is more something like this:
$ git stash
[no usage? What the heck... Oh, it stashed the changes. I did
not want to stash them just yet. Okay:]
$ git unstash
No such command
[Oh, maybe I should have read the man page. Oh, well, the usage
should do...]
$ git stash -h
...
Yes, if you start "git stash" blindly, believing that it does what "git
stash -h" does, you will be bitten by it once.
But as I said, you will be bitten by a plenty commands if you are not
familiar with the concept that "-h" shows the synopsis, "--help" the man
page, and that there is a default action where possible.
But stash really is about things like
$ git stash
$ git pull
$ git stash apply
I do not _want_ to see the stash list in _most_ cases, because I do not
stash away million dirty changes.
And that workflow was what "git stash" was designed for.
quoted
And nobody commented on the idea I posted earlier which seems to
address the concerns about newbies not knowing what "git stash" with
no params does:
I agree with making stash more verbose -- if the unlucky new user is
paying close attention, they'll have instructions on to how to get out
of trouble. But I agree more with making it "just verbose, no action"
by default. There are two strong hints:
- all other state-changing commands take parameters
What about "git commit", "git reset", "git fetch"? These definitely
change state of the repository.
- quite a few people in this list have gotten burned with it
Okay, let's have a little calculation: IIRC 3 people (let's make it 10, to
be conservative) have said that they had this problem. I must assume that
all other people did not have the problem, or at least saw why the default
action of "git stash" is what it is.
That said, if you _have_ to have the default changed, then I'll probably
implement a "git push" and "git pop" alias here, so that I cannot get
annoyed by stash's "new and improved" behaviour.
Ciao,
Dscho
El 19/12/2007, a las 13:01, Johannes Schindelin escribió:
But stash really is about things like
$ git stash
$ git pull
$ git stash apply
I do not _want_ to see the stash list in _most_ cases, because I do
not
stash away million dirty changes.
And that workflow was what "git stash" was designed for.