threads / bug / 59414

Bug Report with Git Bash

Subject: Bug Report with Git Bash

## tl;dr

4 messages between Mar 19, 2023 and Mar 28, 2023.

replies: 3people: 2as markdown or json

sang.tts.designer@gmail.com· Mar 19, 2023, 11:35 UTC · lore

Dear Git community, I have observed a bug related to git bash at my end. Please the following description. Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
Please note that 'ls' command just an example, it's happening with any
command.
This is a relatively simple bug. when we double-type a command, like 'ls'.
However, in the Ubuntu environment, the command only occurs once when we
press the top arrow to use the prior command.
It is identical when using git bash.
Repeat these steps:
Type "ls: in git bash.
2. Type "ls" once more.
3. To return to the previous command, use the top arrow.
As you can see, the number of times we type the can command 'ls' does not
matter; it only needs to occur once.
Please be aware that the command "ls" is only an example; this can happen
with any command.

What did you expect to happen? (Expected behavior) It's only need to appear once time and remove duplicated for more convenience.

What happened instead? (Actual behavior) It's depending on how many times we type that command.

What's different between what you expected and what actually happened? As described above. Anything else you want to add:

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.33.0.windows.2 cpu: x86_64 built from commit: 8735530946cced809cc6cc4c2ca3b078cdb3dfc8 sizeof-long: 4 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Windows 10.0 22621 compiler info: gnuc: 10.3 libc info: no libc information available $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe

[Enabled Hooks]

-- Thanks and Best Regards! --------------------------------------------------- Sang Truong Tan 

Department of Electronics
HCMC University of Technology
Phone: (+84) 977 600 563 or (+84) 908 983 574
Email: sang.tts.designer@gmail.com
sang.tts.designer@gmail.com· Mar 19, 2023, 13:11 UTC · lore

RE: Bug Report with Git Bash

Dear Martin, What a very quick response! I just tried your recommendation, and it works. There is no word that can explain my appreciation, to be honest! Thanks a million.

-- Thanks and Best Regards! --------------------------------------------------- Sang Truong Tan

Department of Electronics
HCMC University of Technology
Phone: (+84) 977 600 563 or (+84) 908 983 574
Email: mailto:sang.tts.designer@gmail.com
From: Martin Ågren <mailto:martin.agren@gmail.com> 
Sent: Sunday, March 19, 2023 7:28 PM
To: mailto:sang.tts.designer@gmail.com
Cc: mailto:git@vger.kernel.org
Subject: Re: Bug Report with Git Bash
Hi,
On Sunday, 19 March 2023, <mailto:sang.tts.designer@gmail.com> wrote:
This is a relatively simple bug. when we double-type a command, like 'ls'.
However, in the Ubuntu environment, the command only occurs once when we
press the top arrow to use the prior command.
It is identical when using git bash.
Repeat these steps:
Type "ls: in git bash.
2. Type "ls" once more.
3. To return to the previous command, use the top arrow.
As you can see, the number of times we type the can command 'ls' does not
matter; it only needs to occur once.
This depends on how your shell is configured.
Look into HISTCONTROL and ignoredups.
You might want something like
  export HISTCONTROL=ignoredups
in ~/.bashrc.
Martin
Johannes Schindelin· Mar 27, 2023, 07:17 UTC · re: sang.tts.designer@gmail.com · lore

RE: Bug Report with Git Bash

Hi,

FWIW the reason why you see it in your Ubuntu setup is most likely rooted in the `/etc/skel/.bashrc` file that contains this:

	# don't put duplicate lines or lines starting with space in the history.
	# See bash(1) for more options
	HISTCONTROL=ignoreboth

Ciao, Johannes

On Sun, 19 Mar 2023, sang.tts.designer@gmail.com wrote:
Show 49 quoted lines
> Dear Martin,
> What a very quick response!
> I just tried your recommendation, and it works.
> There is no word that can explain my appreciation, to be honest!
> Thanks a million.
>
> --
> Thanks and Best Regards!
> ---------------------------------------------------
> Sang Truong Tan
>
> Department of Electronics
> HCMC University of Technology
> Phone: (+84) 977 600 563 or (+84) 908 983 574
> Email: mailto:sang.tts.designer@gmail.com
>
> From: Martin Ågren <mailto:martin.agren@gmail.com>
> Sent: Sunday, March 19, 2023 7:28 PM
> To: mailto:sang.tts.designer@gmail.com
> Cc: mailto:git@vger.kernel.org
> Subject: Re: Bug Report with Git Bash
>
> Hi,
>
> On Sunday, 19 March 2023, <mailto:sang.tts.designer@gmail.com> wrote:
> This is a relatively simple bug. when we double-type a command, like 'ls'.
> However, in the Ubuntu environment, the command only occurs once when we
> press the top arrow to use the prior command.
> It is identical when using git bash.
> Repeat these steps:
> Type "ls: in git bash.
> 2. Type "ls" once more.
> 3. To return to the previous command, use the top arrow.
> As you can see, the number of times we type the can command 'ls' does not
> matter; it only needs to occur once.
>
> This depends on how your shell is configured.
>
> Look into HISTCONTROL and ignoredups.
>
> You might want something like
>
>   export HISTCONTROL=ignoredups
>
> in ~/.bashrc.
>
> Martin
>
>
sang.tts.designer@gmail.com· Mar 28, 2023, 13:16 UTC · re: Johannes Schindelin · lore

RE: Bug Report with Git Bash

Dear Johannes, Thanks a lot for your information.

-- Thanks and Best Regards! --------------------------------------------------- Sang Truong Tan

Department of Electronics
HCMC University of Technology
Phone: (+84) 977 600 563 or (+84) 908 983 574
Email: sang.tts.designer@gmail.com
-----Original Message-----
From: Johannes Schindelin <Johannes.Schindelin@gmx.de> 
Sent: Monday, March 27, 2023 2:17 PM
To: sang.tts.designer@gmail.com
Cc: martin.agren@gmail.com; git@vger.kernel.org
Subject: RE: Bug Report with Git Bash
Hi,
FWIW the reason why you see it in your Ubuntu setup is most likely rooted in the `/etc/skel/.bashrc` file that contains this:
	# don't put duplicate lines or lines starting with space in the history.
	# See bash(1) for more options
	HISTCONTROL=ignoreboth

Ciao, Johannes

On Sun, 19 Mar 2023, sang.tts.designer@gmail.com wrote:
Show 49 quoted lines
> Dear Martin,
> What a very quick response!
> I just tried your recommendation, and it works.
> There is no word that can explain my appreciation, to be honest!
> Thanks a million.
>
> --
> Thanks and Best Regards!
> ---------------------------------------------------
> Sang Truong Tan
>
> Department of Electronics
> HCMC University of Technology
> Phone: (+84) 977 600 563 or (+84) 908 983 574
> Email: mailto:sang.tts.designer@gmail.com
>
> From: Martin Ågren <mailto:martin.agren@gmail.com>
> Sent: Sunday, March 19, 2023 7:28 PM
> To: mailto:sang.tts.designer@gmail.com
> Cc: mailto:git@vger.kernel.org
> Subject: Re: Bug Report with Git Bash
>
> Hi,
>
> On Sunday, 19 March 2023, <mailto:sang.tts.designer@gmail.com> wrote:
> This is a relatively simple bug. when we double-type a command, like 'ls'.
> However, in the Ubuntu environment, the command only occurs once when 
> we press the top arrow to use the prior command.
> It is identical when using git bash.
> Repeat these steps:
> Type "ls: in git bash.
> 2. Type "ls" once more.
> 3. To return to the previous command, use the top arrow.
> As you can see, the number of times we type the can command 'ls' does 
> not matter; it only needs to occur once.
>
> This depends on how your shell is configured.
>
> Look into HISTCONTROL and ignoredups.
>
> You might want something like
>
>   export HISTCONTROL=ignoredups
>
> in ~/.bashrc.
>
> Martin
>
>

← back to recent threads