Closed ChowSinWon closed 9 years ago
problem occurs with and without "diff" activated.
repo seems to be undefined in git-history-view.coffee if i change line
(119) repo.repo.workingDirectory.replace(/\\/g, '/'),"
back to
path.dirname(@file),
there is no more error, but i am not sure if that's correct either. it looks good, though.
Can you explain your current workspace? Do you just have one root project open or multiple? Do you have multiple git repos active for your current workspace? Perhaps a subtree setup with a top level repo containing another repo?
switching it back to path.dirname(@file)
doesn't work for me.
Also seeing this error. Happens whether with a single self-contained repo, or a parent container repo with one submodule. Atom 0.204 / Win7
ChowSinWon's fix works for me as well.
sorry for late reply. here some answers to your questions:
Can you explain your current workspace? Do you just have one root project open or multiple? Do you have multiple git repos active for your current workspace? Perhaps a subtree setup with a top level repo containing another repo?
workspace consisted of two project folders, where each is one git repository, but no nested repositories.
i just made some debug outputs and found, that paths in this.file have backslashes (due to windows file system) and r.repo.workingDirectory from atom.project.getRepositories() always has common slashes.
this explains why my "fix" worked, since i coincidentally tried to get a diff from first project.
real fix coming up right now, please stand by :)
Thanks @ChowSinWon ! I was facing this issue ... Your pull request fixed it for me :-)
Same as @JohnMurga, I ran into this issue and fixed it using @ChowSinWon's fix. Thanks!
I am having this issue as well. The only special thing I could imagine is that I do not have set a remote repository, just a local git init.
Atom Version: 1.0.19 System: Mac OS X 10.11 Thrown From: git-history package, v3.1.0
Uncaught TypeError: Cannot read property 'repo' of undefined
At /Users/jeffreyarts/.atom/packages/git-history/lib/git-history-view.coffee:119
TypeError: Cannot read property 'repo' of undefined
at GitHistoryView._loadRevision (/Users/jeffreyarts/.atom/packages/git-history/lib/git-history-view.coffee:119:17)
at GitHistoryView.confirmed (/Users/jeffreyarts/.atom/packages/git-history/lib/git-history-view.coffee:112:10)
at GitHistoryView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-li.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:139:19)
at HTMLOListElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at HTMLOListElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
-8:53.2.0 application:open (atom-text-editor.editor.is-focused)
-1:05.6.0 find-and-replace:show (atom-text-editor.editor.is-focused)
2x -1:03.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-1:03.1.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
-1:03.1.0 git-diff-details:close-git-diff-details (atom-text-editor.editor.mini.is-focused)
-1:03.1.0 core:cancel (atom-text-editor.editor.mini.is-focused)
2x -0:56.2.0 core:move-down (atom-text-editor.editor.is-focused)
-0:48.3.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:45.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:14.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:14.7.0 git-history:show-file-history (atom-text-editor.editor)
-0:11.9.0 core:move-down (atom-text-editor.editor.mini.is-focused)
-0:10.1.0 core:move-up (atom-text-editor.editor.mini.is-focused)
-0:04.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"seti-monokai"
],
"disabledPackages": [
"jslint",
"git-difftool"
],
"excludeVcsIgnoredPaths": false
}
}
# User
Sublime-Style-Column-Selection, v1.3.0
atom-beautify, v0.28.11
docblockr, v0.7.2
emmet, v2.3.10
git-diff-details, v0.20.0
git-history, v3.1.0
jshint, v1.8.0
linter, v0.12.7
linter-csslint, v0.0.13
set-syntax, v0.3.0
seti-monokai, v0.3.1
# Dev
No dev packages
Atom Version: 1.5.3 System: Ubuntu 15.10 Thrown From: git-history package, v3.2.0
Uncaught TypeError: Cannot read property 'repo' of undefined
At /home/qnub/.atom/packages/git-history/lib/git-history-view.coffee:120
TypeError: Cannot read property 'repo' of undefined
at GitHistoryView._loadRevision (/home/qnub/.atom/packages/git-history/lib/git-history-view.coffee:120:17)
at GitHistoryView.confirmed (/home/qnub/.atom/packages/git-history/lib/git-history-view.coffee:113:10)
at GitHistoryView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-li.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:139:19)
at HTMLOListElement.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at HTMLOListElement.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
-9:15.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
2x -3:15 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-one-dark-ui)
-2:57.6.0 split-diff:toggle (atom-text-editor.editor.is-focused)
4x -2:57.3.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-one-dark-ui)
-2:36.3.0 core:close (atom-text-editor.editor.is-focused)
4x -2:36.3.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-one-dark-ui)
-0:11.3.0 git-history:show-file-history (atom-text-editor.editor.is-focused)
{
"core": {
"ignoredNames": [
"*.py[co]",
".DS_Store"
],
"themes": [
"one-dark-ui",
"atom-dark-syntax"
]
},
"git-history": {}
}
# User
Stylus, v2.1.2
atom-terminal, v0.8.0
atom-typescript, v8.2.0
autoclose-html, v0.20.0
autocomplete-python, v1.6.1
ctrl-last-tab, v0.3.0
editorconfig, v1.2.4
emmet, v2.4.1
exception-reporting, v0.37.0
file-icons, v1.6.14
git-history, v3.2.0
highlight-selected, v0.11.2
language-django, v0.1.1
language-jade, v0.6.3
language-rust, v0.4.6
linter, v1.11.3
linter-eslint, v6.0.0
linter-pyflakes, v0.2.1
linter-rust, v0.3.0
metrics, v0.53.1
minimap, v4.19.0
minimap-codeglance, v0.4.5
minimap-highlight-selected, v4.3.1
minimap-linter, v1.1.1
minimap-pigments, v0.1.7
minimap-split-diff, v0.3.0
pigments, v0.23.1
project-manager, v2.7.6
release-notes, v0.53.0
split-diff, v0.5.5
symbols-tree-view, v0.11.0
sync-settings, v0.6.0
synced-sidebar, v0.4.3
tabs-to-spaces, v1.0.1
tag, v0.3.0
tasks, v2.6.0
# Dev
No dev packages
I do not have set a remote repo
Atom Version: 1.5.4 System: Ubuntu 14.04.3 Thrown From: git-history package, v3.2.0
Uncaught TypeError: Cannot read property 'repo' of undefined
At /home/gabriel/.atom/packages/git-history/lib/git-history-view.coffee:120
TypeError: Cannot read property 'repo' of undefined
at GitHistoryView._loadRevision (/home/gabriel/.atom/packages/git-history/lib/git-history-view.coffee:120:17)
at GitHistoryView.confirmed (/home/gabriel/.atom/packages/git-history/lib/git-history-view.coffee:113:10)
at GitHistoryView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-li.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:139:19)
at HTMLOListElement.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at HTMLOListElement.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
-8:37.4.0 find-and-replace:show (atom-text-editor.editor.is-focused)
-8:36.2.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
-8:36.2.0 core:cancel (atom-text-editor.editor.mini.is-focused)
-8:35.5.0 project-find:show (atom-text-editor.editor.is-focused)
-8:34.6.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
-8:34.6.0 core:cancel (atom-text-editor.editor.mini.is-focused)
-8:31.4.0 core:undo (atom-text-editor.editor.is-focused.autocomplete-active)
-6:19.2.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
-6:16.8.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
-6:16.8.0 core:cancel (atom-text-editor.editor.is-focused)
-0:32 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:24.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:16.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:16.5.0 git-history:show-file-history (atom-text-editor.editor)
{
"core": {
"audioBeep": false,
"ignoredNames": [
"*.pot",
".git",
"*.po",
"*.po~",
"*.jpg",
"*.png",
"*.pdf",
"*.log",
"*_Gettext",
"*.map",
"vendor",
"dist"
],
"openEmptyEditorOnStart": false,
"packagesWithKeymapsDisabled": [
"zentabs"
]
}
}
# User
duplicate-line-or-selection, v0.5.0
git-history, v3.2.0
zentabs, v0.8.7
# Dev
No dev packages
I still have the same problem with the currently latest version 3.3.0. Is there a good reason why this issue is closed?
Is there a particular way to move the pull-request into the integrated build that atom users use? @ChowSinWon 's fix worked, and I believe is already cleared in the pull requests. why is this not in the official build after 2 years?
I suspect the package needs to be published to Atom's package repository. @jakesankey would you mind publishing an update?
I am getting this issue in 3.3.0 & Atom 1.52.0
I am getting this issue in version 3.3.0 and Atom 1.53.0. Multiple open projects (each project a repo, no nested repos). One file open and trying to view the Git History.
[Enter steps to reproduce below:]
Atom Version: 0.204.0 System: KYRILL Thrown From: git-history package, v3.0.0
Stack Trace
Uncaught TypeError: Cannot read property 'repo' of undefined
Commands
Config
Installed Packages