Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After exiting commit editor whole console get cleared #5303

Open
Yankes opened this issue Dec 6, 2024 · 0 comments
Open

After exiting commit editor whole console get cleared #5303

Yankes opened this issue Dec 6, 2024 · 0 comments

Comments

@Yankes
Copy link

Yankes commented Dec 6, 2024

  • [ v] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.47.1.windows.1
cpu: x86_64
built from commit: 2cd22437f64229935dc564db969cbcbfed5e9045
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.11.0
OpenSSL: OpenSSL 3.2.3 3 Sep 2024
zlib: 1.3.1

Older version git version 2.24.1.windows.2 do not had this problems.

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19045.5131]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: BashOnly
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: FFOnly
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Added tmux with libs from libevent from msys2

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash with mintty

When using vim whole console get cleared, I boils down this problem to:

git config core.editor "f(){ echo $'\e[?1049h\e[22;0;0t'; echo \"Write to \$1\"; cat > \"\$1\"; echo $'\e[?1049l\e[23;0;0;t'; }; f"
git commit --amend
  • What did you expect to occur after running these commands?

I can see content in console like (all console history before commit):

[10:08][Yankes:~/prog/dummy] (master)
$ tmux

[11:08][Yankes:~/prog/dummy] (master)
$ vim

[12:08][Yankes:~/prog/dummy] (master)
$ git config core.editor "f(){ echo $'\e[?1049h\e[22;0;0t'; echo \"Write to \$1\"; cat > \"\$1\"; echo $'\e[?1049l\e[23;0;0;t'; }; f" && git commit --amend
hint: Waiting for your editor to close the file...
[master ea17ecf] eeee
 Date: Sat Dec 7 00:06:33 2024 +0100
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo
[12:13][Yankes:~/prog/dummy] (master)
$
  • What actually happened instead?

Lot of empty space and final commit result message:











hint: Waiting for your editor to close the file...
[t-feature/merge-appka c315b8b668] aaaa
 Date: Fri Dec 6 16:22:31 2024 +0100
 1 file changed, 1 insertion(+)
 create mode 100644 dummy
[12:13][Yankes:~/prog/dummy] (master)
$

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

No, clean repository is enough.

Overall vim have too some problems with gathering info about terminal and mess up my colors
when run through git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant