Comments (5)
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.
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.
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.
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.
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)
- Inline commit log message and file types HOT 2
- GitGutter not available to install in package control HOT 4
- How do I make the icons show? HOT 2
- Gutter icon too small HOT 1
- How to disable key bindings? HOT 1
- 'NoneType' object has no attribute 'set_timeout' HOT 1
- AttributeError: 'NoneType' object has no attribute 'replace'
- I can't see any information on sublime 4100 HOT 1
- Allow formatting of line_author_time HOT 1
- ST4 - config "show_line_annotation" not working HOT 4
- What is supposed to be insert icon instead is modify icon. HOT 1
- Sublime Text 4 support, please HOT 12
- feature: command to copy commit_id from line annotation and hyperlink commit id to external git client HOT 2
- Compare against branch indicates no changes and differs from "git diff <branch>" HOT 4
- Not work for network mount wsl2 disk HOT 2
- Files in cloned gists don't show the inline git blame when `show_line_annotation` is set to `true` HOT 2
- `~` is not accepted/resolved to home in `git_binary` HOT 3
- 1.11.8 can not work in ST4 with win11. HOT 5
- GitGutter is throwing errors related to mdpopups and not working HOT 2
- Change font on popups HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitgutter.