Skip to content

GIT_TERMINAL_PROMPT=0 git 2.3 feature #161

Closed
@bruno-

Description

@bruno-

Hi,
thank you for making and maintaining this great plugin.

A couple days ago new git version 2.3 was released. Among new features is also GIT_TERMINAL_PROMPT environment variable. When it is set to 0 git will never prompt for user credentials.
You can learn more about it in man git (after updating to git 2.3) or in this blog post on github.

Just as an example, here's how it works:

  • git clone https://github.com/some/non-existing-repo - will prompt for a username & password
  • GIT_TERMINAL_PROMPT=0 git clone https://github.com/some/non-existing-repo - will fail without prompting for username & password
  • GIT_TERMINAL_PROMPT=0 git submodule add https://github.com/chaconinc/DbConnector - also fails withot prompting for username & pass

I think this addition could potentially be valuable to vim-plug in the following places:

  • when doing git clone
  • when doing git submodule update
  • when doing git fetch (just in case a user manually changed git remote)

I was thinking of opening a pull request that prepends git commands with export GIT_TERMINAL_PROMPT=0. Example line 926:

(export GIT_TERMINAL_PROMPT=0; git fetch --progress 2>&1 && git checkout -q %s 2>&1 && git merge --ff-only origin/%s 2>&1 && git submodule update --init --recursive 2>&1)

I did something similar for tmux plugin manager.

Related issues are #109, #56.

What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions