GitGutter icon indicating copy to clipboard operation
GitGutter copied to clipboard

GitGutter "fails to update" after first file load / restart

Open stdedos opened this issue 5 years ago • 7 comments

Description

Replication (for me) is quite simple:

  • Open a file (Gutter may or may not load)
  • "play around" with a file

Results:

  • Gutter output "does not match" git diff

Adding / removing it from Disabled Packages works, but I restart in-between. I don't think the "acceptable" solution to be to restart every time I edit one file.

Support Info

- Sublime Text 3176
- Platform: linux
- Arch: x64
- GitGutter 1.9.5
- Install via PC: True
- git version 2.20.1
- mdpopups 3.4.0
- markdown 2.6.11
- pygments 2.1a0
- jinja2 2.8

stdedos avatar Feb 08 '19 09:02 stdedos

Can't reproduce. Works well on my Ubuntu 18.04 VM.

deathaxe avatar Feb 08 '19 16:02 deathaxe

I don't doubt that @deathaxe. I would appreciate some more debuging instructions though, since I have already read Troubleshooting, and nothing came up.

stdedos avatar Feb 08 '19 18:02 stdedos

Did you try to set "debug: true" in GitGutter.sublime-settings?

With some luck it may provide some more infos about the reason.

Is the string from the "Results:" part (Gutter output "does not match" git diff) from console?

What distro are u using?

deathaxe avatar Feb 08 '19 19:02 deathaxe

Did you try to set "debug: true" in GitGutter.sublime-settings? With some luck it may provide some more infos about the reason.

I did:

{
  // Add a special marker on untracked files
  "show_markers_on_untracked_file": true,

  // Determines whether GitGutter will show informations in the status bar
  // Set "none" to hide these informations
  // Set "default" to show in the status bar what you are comparing
  // against, how many lines have been inserted or modified and how many regions
  // have been deleted.
  // Set "all" to also show on what branch you are
  "show_status": "all",
  "debug": true
}

Unfortunately, it only gives

reloading plugin GitGutter.plugin
GitGutter: disabled for "untitled" because file not in a working tree
GitGutter: disabled for "test.log" because file not in a working tree
// here I closed and reopened a file under a repo
GitGutter: disabled for "untitled" because file not in a working tree

Is the string from the "Results:" part (Gutter output "does not match" git diff) from console?

No. it's just me saying that: git diff != GitGutter "gutter" marks

What distro are u using?

Ooops! :smile: Ubuntu 16.04.5

stdedos avatar Feb 12 '19 12:02 stdedos

The repository is a big one, if that helps ... but I cannot thing of something else causing this :confused:

stdedos avatar Feb 18 '19 14:02 stdedos

The only thing I can see from your logs is an unsaved view and a "test.log" to be open, which is not within the repository. GitGutter itself does not create a message which matches the git diff != GitGutter "gutter" marks style.

I absolutely can't find any entry point to start debugging. Whatever I try it works fine here on both, Windows and Linux.

deathaxe avatar Feb 18 '19 17:02 deathaxe

The only thing I can see from your logs is an unsaved view and a "test.log" to be open, which is not within the repository.

I know! In GitGutter's debug, there is ABSOLUTELY no mentioning of me opening a git-tracked file:

reloading plugin GitGutter.plugin
GitGutter: disabled for "untitled" because file not in a working tree
GitGutter: disabled for "test.log" because file not in a working tree
GitGutter: disabled for "untitled" because file not in a working tree

In the mockup I created with the debug messages, I would expect, instead of this:

// here I closed and reopened a file under a repo

It would have much more entries, like:

GitGutter: opened "x": file is tracked in git, processing ...
GitGutter: [...]
GitGutter: [...]
GitGutter: [...]
GitGutter: [...]
GitGutter: processing done for "x"

or something! However, greping the console output (with grep -i gitgutter), gives a very small amount of lines == the aforementioned ones


GitGutter itself does not create a message which matches the git diff != GitGutter "gutter" marks style.

I know! I am trying to explain what the issue is, in some way! GitGutter gives no messages, about "nothing" related on processing git-tracked files, so, I am trying to describe it to the best of my English and understanding, what is happening: The file state that GitGutter is advertising the file to be, is not consistent with whatever git diff would say.

I absolutely can't find any entry point to start debugging. Whatever I try it works fine here on both, Windows and Linux.

I know! I would search the source code myself for the error messages (or even try to debug / put breakpoints in it myself), but I have no idea "where" GitGutter gets stucked, if it throws exceptions ... nothing. And neither do I know how the development/debugging process of Sublime extensions, so I cannot do what I would normally do to debug source code (like pudb git_gutter.py or something).

stdedos avatar Feb 18 '19 19:02 stdedos