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

Autofetch should be disable by default #8469

Closed
101100 opened this issue Jun 29, 2016 · 5 comments
Closed

Autofetch should be disable by default #8469

101100 opened this issue Jun 29, 2016 · 5 comments
Assignees
Labels
git GIT issues

Comments

@101100
Copy link

101100 commented Jun 29, 2016

  • VSCode Version: 1.2.0
  • OS Version: any

Steps to Reproduce:

  1. Open a folder in VSCode that is a git repository.
  2. The git repository is modified without prompting the user (a fetch is performed).

I propose that VSCode should have the git.autofetch configuration flag set to false by default. It seems quite unusual that an editor would immediately start modifying a folder simply because it has been opened. This seems like incorrect default behaviour. This default behaviour does not exist in any git client that I am aware of. Fetching is an operation that needs to be done and occasionally may be problematic.

This appears to have led to a few issues (with a quick search):

@bpasero bpasero added the git GIT issues label Jun 29, 2016
@LithMage
Copy link

Not sure if this is connected but i also get random files in my project marked as modified even if nothing really changed, but if i save the nonexistant modification it also appears on git as changed file.

@joaomoreno
Copy link
Member

Fetch should rarely be problematic. Only in scenarios that some other application other than git itself accesses the .git folder, like Dropbox.

It can definitely prompt the user for input, in case of authentication. That can, and is most of the time, fixed by some external tool.

Locking happens due to git status, which accesses the index and is also called by Code. Not git fetch.

We like to keep the default values set to what most users would like it to be set. It's true, most other editors don't do it by default. We decided to do it and as a result we get a lot of people positively surprised by the incoming commits count in the status bar.

@LithMage This is not related. You probably have line ending changes. Check it by running git status from the command line.

@spinningarrow
Copy link

Can we reopen this? This is very surprising and rather non-standard and hard to debug - I recently noticed my repository seemed to be fetching in the background and I couldn't for the life of me figure out why.

I agree that on the whole the behaviour is not destructive - but it's definitely very surprising.

@d3x0r
Copy link

d3x0r commented Oct 5, 2017

+1 for reopening this. It is destructive when the git repo is an ssh link, and vscode doens't prompt for credentials, so it just caueses blacklisting from too many invalid ssh logins.
I was working remotely on a system, and suddently in the middle of editing things the connection dies. (it is a remote asking for a fetch from my server, which blacklisted the remote I was working on).

It(vscode) should at least check to see the repository origin url is ssh or not.
Yes, setting this now stops the issue which happened 3 times, fortunately 2 of the times I wasn't in the middle of typing.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 6, 2017

Guys, I've changed my mind. Please follow: #34684

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

No branches or pull requests

6 participants