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

malformed content in /usr/share/vim/vim80/defaults.vim #1382

Closed
1 task done
ostueker opened this issue Nov 29, 2017 · 9 comments
Closed
1 task done

malformed content in /usr/share/vim/vim80/defaults.vim #1382

ostueker opened this issue Nov 29, 2017 · 9 comments
Assignees
Milestone

Comments

@ostueker
Copy link

  • 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?

Installer Git-2.15.1-64-bit.exe

$ git --version --build-options
git version 2.15.1.windows.1
built from commit: 81ab034ac9b601ef5a4f4ab53e910d9fe8047cb0
sizeof-long: 4
machine: x86_64
  • 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.16299.64]
(c) 2017 Microsoft Corporation. All rights reserved.
  • 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"
$ cat /etc/install-options.txt
Editor Option: Nano
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No.

Details

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

Git Bash

$ vim
  • What did you expect to occur after running these commands?

vim opens without error

  • What actually happened instead?
$ vim
Error detected while processing /usr/share/vim/vim80/defaults.vim:
line  136:
E171: Missing :endif
Press ENTER or type command to continue

Looking at the file and the lines 112-135 it seems that each line is prefixed with a " which was probably inserted accidentally. I'm not sure if this comes from the upstream msys2 vim package or is introduced by git4win.

Could you please make a quick release, e.g. with an older vim package or a fixed default.vim?
Thank you!

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

No.

@dscho
Copy link
Member

dscho commented Nov 29, 2017

Looking at the file and the lines 112-135 it seems that each line is prefixed with a " which was probably inserted accidentally.

I think you're correct.

I'm not sure if this comes from the upstream msys2 vim package or is introduced by git4win.

I am pretty sure that this was caused by an unfortunate side effect of an upgrade of MSYS2' vim updating the defaults.vim file in a way that our git-extra's post-install script does not handle correctly:

https://github.com/git-for-windows/build-extra/blob/dc78180fc204e53367e7981a912c0b33b9bb7dbc/git-extra/git-extra.install#L169-L173

The idea is to disable the global default of remembering the current line when closing and reopening files (which Git for Windows wants to override so that commit messages do not receive that handling).

Sadly, the sed expression is not specific enough, it seems.

@dscho dscho self-assigned this Nov 29, 2017
dscho added a commit to git-for-windows/build-extra that referenced this issue Nov 30, 2017
The bug introduced into Git for Windows v2.15.1 where
`vim` would show an ugly warning upon startup [was
fixed](git-for-windows/git#1382).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@ostueker
Copy link
Author

ostueker commented Nov 30, 2017

I can confirm that it works now with a custom built installer (after pulling the git and build-extra repos and pacman -Syu).

Thanks!

@dscho, are you planning to release a new build today/tomorrow?
I'm holding a Software Carpentry workshop this weekend and would prefer to have the participants use an installer "von der Stange" ;-) instead of one that's custom built.

@dscho dscho added this to the v2.15.1(2) milestone Nov 30, 2017
@dscho
Copy link
Member

dscho commented Nov 30, 2017

I can confirm that it works now with a custom built installer (after pulling the git and build-extra repos and pacman -Syu).

Great!

are you planning to release a new build today/tomorrow?

The artifacts are built as we speak; I will test them manually (in particular that vim works!!!) and then upload. It should not take more than 1h.

@ostueker
Copy link
Author

Vielen Dank und Schöne Grüsse!

@dscho
Copy link
Member

dscho commented Nov 30, 2017

Uploading now... it'll take about 20 minutes in total.

@dscho
Copy link
Member

dscho commented Nov 30, 2017

Uploaded.

@ostueker
Copy link
Author

ostueker commented Nov 30, 2017

  • Git-2.15.1.2-32-bit.exe: check
  • PortableGit-2.15.1.2-32-bit.7z.exe: check
  • Git-2.15.1.2-64-bit.exe: check
  • PortableGit-2.15.1.2-64-bit.7z.exe: check

Looks all good!

@chrisbra
Copy link

chrisbra commented Dec 1, 2017

sorry for chiming in, but with which Vim version did this happen? I am asking, because I thought I fixed this bug in Vim some time ago:
vim/vim@9a48961d8bd7ffea14330b9b0181a
included as Vim patch 8.0.639

@dscho
Copy link
Member

dscho commented Dec 1, 2017

@chrisbra the problem was an unfortunate interaction between vim's defaults.vim and Git for Windows' attempts to avoid unfortunate defaults where vim tried to jump back to the last line when opened e.g. the commit message (which does not make sense because every commit message is separate from the previous ones).

So: @chrisbra no worries, Vim itself was not the culprit, at least not alone.

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

No branches or pull requests

3 participants