threads / bug / 45857

Bug report: Git Stash; spelling mistake of stash followed by a yes prints character 'y' infinite times.

Subject: Bug report: Git Stash; spelling mistake of stash followed by a yes prints character 'y' infinite times.

## tl;dr

3 messages between May 3, 2017 and May 4, 2017.

replies: 2people: 3as markdown or json

Rashmi Pai· May 3, 2017, 09:46 UTC · lore

Hi, I am a corporate user of git. I noticed that when you switch between the branches and do a git stash ( I miss spelled it as git stahs). Git asked if i meant git stash. and i entered yes. and git printed the character y infinite times.

Below are the steps to reproduce.
1. create a local branch and make some code changes in the same branch.
2. now checkout another branch. git says Your local changes to the
following files would be overwritten by checkout.
3. Now do git stahs ( spelling mistake )
4. Now git says git: 'stahs' is not a git command. See 'git --help'.
Did you mean this?
stash
5. Now types yes. and you will see character 'y' getting printed
infinite times!.

Though this is not a major bug, I thought notifying this would be a good idea. The above mentioned issue is reproducible in Mac Yosemite in git version 2.4.5

Thank you all for making our lives easier and better :)..
-- 
REGARDS
Rashmi Pai :)
Jeff King· May 3, 2017, 09:47 UTC · re: Rashmi Pai · lore

Re: Bug report: Git Stash; spelling mistake of stash followed by a yes prints character 'y' infinite times.

On Wed, May 03, 2017 at 03:16:06PM +0530, Rashmi Pai wrote:
Show 10 quoted lines
> Below are the steps to reproduce.
> 1. create a local branch and make some code changes in the same branch.
> 2. now checkout another branch. git says Your local changes to the
> following files would be overwritten by checkout.
> 3. Now do git stahs ( spelling mistake )
> 4. Now git says git: 'stahs' is not a git command. See 'git --help'.
> 
> Did you mean this?
> 
> stash
After this step git exits, and you're back at your shell prompt...
> 5. Now types yes. and you will see character 'y' getting printed
> infinite times!.

...so when you type "yes" here, it is running the "yes" program. Whose function is to print an infinite number of y's. See "man yes" for more details.

-Peff
Junio C Hamano· May 4, 2017, 05:23 UTC · re: Jeff King · lore

Re: Bug report: Git Stash; spelling mistake of stash followed by a yes prints character 'y' infinite times.

Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>> 4. Now git says git: 'stahs' is not a git command. See 'git --help'.
>> 
>> Did you mean this?
>> 
>> stash
>
> After this step git exits, and you're back at your shell prompt...

Perhaps the suggestion message should be rephrased not to sound like it is asking confirmation?

← back to recent threads