Code Monkey home page Code Monkey logo

Comments (5)

jisaacks avatar jisaacks commented on September 3, 2024

Right, because we are trying to get the diff for a file that isn't committed yet. GitGutter should still work but yeah it shouldn't blow up your console with errors.

It would be possible to check git for if the file exists first, but I don't want to have to run yet another external command for every operation. I think the best answer would be to just trap that error in a try-catch

from gitgutter.

hauntedhost avatar hauntedhost commented on September 3, 2024

gotcha. ok, well let me know if you need me to do any testing for this. i'm guessing i could patch git_gutter_handler.py somewhere?

from gitgutter.

jisaacks avatar jisaacks commented on September 3, 2024

SO it turns out I already put that inside a try catch see code

I just tried to reproduce your error myself and was unable.

What is the whole stack trace of the error?

from gitgutter.

hauntedhost avatar hauntedhost commented on September 3, 2024

sorry, how to i pull a stack trace for this?

fwiw, if i run sublime from within gnome (applications > programming), this error is never output to the sublime console. but if new.txt is already open in a tab when sublime is loading, this error appears in the console:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 195, in on_modified
  File "./sublime_plugin.py", line 154, in run_timed_function
  File "./sublime_plugin.py", line 194, in <lambda>
  File "./git_gutter_events.py", line 14, in on_modified
  File "./view_collection.py", line 19, in add
  File "./git_gutter_handler.py", line 45, in reset
AttributeError: 'NoneType' object has no attribute 'run_command'

the original message:

fatal: Path 'new.txt' does not exist in 'HEAD'

only shows up in my terminal if i run sublime from that same terminal like:

$ subl &

from gitgutter.

tiye avatar tiye commented on September 3, 2024

Same here, Seconds after I ran touch yinwang0/13-03-07.1.md, it prints in my terminal:

➤➤ fatal: Path 'yinwang0/13-03-07.1.md' exists on disk, but not in 'HEAD'.
fatal: Path 'yinwang0/13-03-07.1.md' exists on disk, but not in 'HEAD'.
fatal: Path 'yinwang0/13-03-07.md' exists on disk, but not in 'HEAD'.

And it prints error every time I switching to that buffer by a click.
Seens nothing wrong in Sublime's console:

plugin init time: 3.08837
loading bindings
loading pointer bindings
found 1 files for base name Default.sublime-theme
theme loaded
app ready
pre session restore time: 6.68927
using gamma: 1 (err: 0)
startup cache, total files: 118 cache hits: 118
startup time: 6.98839 (package setup was not run)
loaded 1075 snippets
Package Control: Installing 3 upgrades
Package Control: Upgraded CoffeeScript to latest git commit
reloading /home/chen/.config/sublime-text-2/Packages/GitGutter/GitGutter.sublime-settings
Reloading plugin /home/chen/.config/sublime-text-2/Packages/GitGutter/git_gutter.py
Reloading plugin /home/chen/.config/sublime-text-2/Packages/GitGutter/git_gutter_events.py
Reloading plugin /home/chen/.config/sublime-text-2/Packages/GitGutter/git_gutter_handler.py
Reloading plugin /home/chen/.config/sublime-text-2/Packages/GitGutter/git_helper.py
Reloading plugin /home/chen/.config/sublime-text-2/Packages/GitGutter/view_collection.py
found 9 files for base name Main.sublime-menu
Package Control: Upgraded GitGutter to v2013.03.06.09.17.02
Package Control: Upgraded PlistJsonConverter to latest git commit
reloading /home/chen/.config/sublime-text-2/Packages/User/Package Control.sublime-settings
Writing file /home/chen/code/page-site/_self/styl/global.styl with encoding UTF-8
Writing file /home/chen/code/backup/yinwang0/13-03-03.3.md with encoding UTF-8

from gitgutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.