alexcorre / git-blame Goto Github PK
View Code? Open in Web Editor NEWPlugin for Atom Editor. Toggle git-blame annotations for the current file in the gutter.
License: MIT License
Plugin for Atom Editor. Toggle git-blame annotations for the current file in the gutter.
License: MIT License
as requested by @aake
Steps to reproduce:
[Enter steps to reproduce below:]
Atom Version: 0.165.0
System: Mac OS X 10.10.1
Thrown From: git-blame package, v0.3.3
Uncaught TypeError: Cannot read property '0' of null
At /Users/me/.atom/packages/git-blame/lib/util/blameFormatter.js:11
TypeError: Cannot read property '0' of null
at parseRevision (/Users/me/.atom/packages/git-blame/lib/util/blameFormatter.js:11:35)
at parseBlameLine (/Users/me/.atom/packages/git-blame/lib/util/blameFormatter.js:97:11)
at Array.map (native)
at Object.parseBlameOutput [as parseBlame] (/Users/me/.atom/packages/git-blame/lib/util/blameFormatter.js:133:51)
at /Users/me/.atom/packages/git-blame/lib/util/gitCommander.js:89:44
at ChildProcess.<anonymous> (/Users/me/.atom/packages/git-blame/lib/util/gitCommander.js:62:14)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1013:16)
at Socket.<anonymous> (child_process.js:1181:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:461:12)
-0:25.6 fuzzy-finder:toggle-file-finder (atom-pane.pane.active)
-0:21.3 core:confirm (input.hidden-input)
2x -0:19.4 git-blame:toggle (input.hidden-input)
2x -0:02.9 tree-view:collapse-directory (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:00.0 git-blame:toggle (input.hidden-input)
{
"core": {
"themes": [
"atom-dark-ui",
"monokai"
],
"useReactEditor": true,
}
}
# User
file-icons, v1.4.3
git-blame, v0.3.3
language-haml, v0.14.0
monokai, v0.9.0
react, v0.7.1
ruby-slim, v0.2.0
# Dev
No dev packages
/cc @atom/core
It looks like your spec/ directory is set up to use jasmine-node, but when I run jasmine-node spec/
with jasmine-node version 1.14.3, I run into some require errors. Have I started off down the wrong track?
Pressing Ctrl-b opens the git blame, but on my machine at least. Clicking on the SHA causes Atom to instantly shut down.
Why not bring this into Git-Plus and you can work on even more in terms of Git there?
Working with a repository that is not hosted on github/bitbucket without having set a custom URL and opening up the blame view opens up an error box for every single git blame line. I'm using the current git master HEAD.
The GIT Blame window with name can't be resized anymore? I restarted multiple times Atom for it. Any fixes?
Hi,
I'm trying your plugin and I think it's great. I'm using a custom repository url as my project is neither in github nor in bitbucket.
I've defined the custom url like this:
https://git.my-company.com/<%- project %>/<%- repo %>/commit/<%- revision %>
But when the url is opened in the browser the generated url is:
https://git.my-company.com///[email protected]:2222/group/repo-name/commit/c0a10505d58ef8563bf06fec9c7de05d61eaf9c2
As you can see the //[email protected]:2222/ is not right. If I remove this part from the url the link is generated correctly.
Is there any way I can define the custom url without the ssh url that I use to push to the repo?
Regards, Iván.
When clicking the sha link atom crashes silently, raising no errors or console output.
I am running Xubuntu 14.04
I set the Customer Commit Url Template String.
But still has the error message tell me to set this.
If I reopen Atom, Customer Commit Url Template String will be empty again.
From #23 (comment)
It appears that we are missing data for the last line of each file or are one line off in our display:
This doesn't repro on ab1dd26 so I think it was introduced by #21.
can we add an option to show full name of the committer ?, it'll be helpful more than the last name only.
Hello,
I love this package, the only thing that is currently missing ihmo is the possibility to configure git blame to be runned with the -w
option to ignore whitespaces.
I don't really use git blame without this option so for now I've just edited the blame
method of gitCommander.js to add the -w option but it will be cool if this features was built-in.
Thanks,
Hey, I'm using Atom on Linux. Git balme used to work, but now since a few atom releases or git-blame updates (sadly I can't pinpoint the exact time, sorry) ctrl+b does nothing. Git blame does not open, the development console does not popup with errors.
Checked what keys are bound to ctrl+b, this is what I found:
https://www.dropbox.com/s/q2e2wp87h93aske/K%C3%A9perny%C5%91k%C3%A9p%20%E2%80%93%202014-11-28%2014%3A30%3A30.png?dl=0
Basically no outside source is sitting on the key combo, only git-blame, and atom core stuff.
I interact with git repositories from multiple places (GitHub, BitBucket, internal Stash repositories, etc.). Would it be possible to make the custom commit url template string setting per-project? One idea would be to read a custom git configuration property set in the local repository's .git/config
file.
I just lost 15 minutes wondering why git-blame kept on giving me the message that my custom url template was not configured while it was filled out.
The reason is that the checkbox to enable this was 3 field lower (both date format and ignore whitespace fields were between the template field and the toggle checkbox). I would replace the template field label with the checkbox label and put the checkbox in front. Also I would hide the template field when the checkbox is not checked...
when we are unable to parse project / repo out of the remote url, the error toast is shown once per line, which requires user to dismiss all of them to make Atom usable.
I have only one remote, named 'gerrit' which points to my Gerrit code review git repo. We also have a cgit connected to this which provides an HTTP interface to the repo. I utilized the custom url in settings: 'https:///cgit.cgi/<%-repo%>/gerrit.git/commit/?id=<%-revision%>' (nifty feature by the way). When I now click on a commit after bringing up the git blame, it gives me 'Uncaught TypeError: Cannot call method 'match' of null' in '/home/alexo/.atom/packages/git-blame/lib/util/RemoteRevision.js:65'.
I tried changing the name on my remote to 'origin', where it worked fine (and correctly opened my browser to the specified commit).
If you open a folder containing multiple git repos and open a file and try blame then it doesn’t work saying file is not in a git repository. It should ideally go upward in a file path until it finds a .git repo.
Showing the author
and author-time
is more consistent with how the CLI git blame
command works. I'm working with a repo that was ported over from SVN. All pre-import lines only list our admin (who performed the import) and the time of import, which is not particularly useful. The author*
fields contain the relevant information.
Could we get the log messages on hover? That would make this much more useful for me.
It would be great if user could input a commit/ date which he wants to be highlighted. Would help in code reviews, seeing at a glance which lines have been changed/ added in a particular commit.
User might also specify something like >2014-12-05
, which would highlight lines (either the line in the panel, or lines in the editor, as well) that were changed later than a specified date. Same might work for commits, but I figure it would require to go an extra mile to determine which commits are further in the commit tree.
Do you mind to use a different keybinding for toggling? Ctrl-b is the default keybinding for move cursor one character left (Emacs style)
I receive an error on starting Atom.
Using Atom v0.147. But it was happening on 0.146, too.
[Enter steps to reproduce below:]
Atom Version: 0.187.0
System: Mac OS X 10.10.2
Thrown From: git-blame package, v0.4.0
Failed to activate the git-blame package
At undefined is not a function
TypeError: undefined is not a function
at BlameErrorView.module.exports.BlameErrorView.attach (/Users/ashod/.atom/packages/git-blame/lib/views/blame-error-view.coffee:18:19)
at Object.showError (/Users/ashod/.atom/packages/git-blame/lib/controllers/errorController.js:24:15)
at initializeContext (/Users/ashod/.atom/packages/git-blame/lib/git-blame.js:21:21)
at Object.activate (/Users/ashod/.atom/packages/git-blame/lib/git-blame.js:10:3)
at Package.module.exports.Package.activateNow (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/package.js:240:19)
at /Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/package.js:742:29
at Emitter.module.exports.Emitter.emit (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/command-registry.js:227:20)
at /Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:120:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-div.atom.commands.add.core:confirm (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/command-registry.js:246:29)
at /Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Users/ashod/Downloads/Atom.app/Contents/Resources/app/src/window-event-handler.js:182:20)
-1:17.2 core:confirm (atom-text-editor.editor.mini)
-1:17.2 open-on-github:blame (atom-text-editor.editor)
-1:14.1 command-palette:toggle (atom-text-editor.editor)
-1:10.8 core:confirm (atom-text-editor.editor.mini)
-1:10.8 open-on-github:blame (atom-text-editor.editor)
-1:08.3 command-palette:toggle (atom-text-editor.editor)
-1:05.4 core:move-down (atom-text-editor.editor.mini)
-1:05.2 core:confirm (atom-text-editor.editor.mini)
-1:05.2 settings-view:install-packages-and-themes (atom-text-editor.editor)
2x -1:01.4 core:confirm (atom-text-editor.editor.mini)
-0:19.9 find-and-replace:show (atom-text-editor.editor.mini)
3x -0:18.9 core:confirm (atom-text-editor.editor.mini)
-0:03.4 fuzzy-finder:toggle-file-finder (atom-text-editor.editor)
-0:02.2 command-palette:toggle (atom-text-editor.editor.mini)
-0:00.5 core:confirm (atom-text-editor.editor.mini)
-0:00.5 git-blame:toggle (atom-text-editor.editor.mini)
{
"core": {},
"git-blame": {}
}
# User
git-blame, v0.4.0
set-syntax, v0.2.1
# Dev
No dev packages
[Enter steps to reproduce below:]
Atom Version: 0.187.0
System: Mac OS X 10.10.2
Thrown From: git-blame package, v0.4.0
Uncaught Error: Repository has been destroyed
At /Applications/Atom.app/Contents/Resources/app/src/git-repository.js:394
Error: Repository has been destroyed
at GitRepository.module.exports.GitRepository.getRepo (/Applications/Atom.app/Contents/Resources/app/src/git-repository.js:394:15)
at GitRepository.module.exports.GitRepository.getConfigValue (/Applications/Atom.app/Contents/Resources/app/src/git-repository.js:202:19)
at GitRepository.module.exports.GitRepository.getOriginURL (/Applications/Atom.app/Contents/Resources/app/src/git-repository.js:206:19)
at Object.toggleBlame (/Users/stelek/.atom/packages/git-blame/lib/controllers/blameViewController.js:26:40)
at atom-workspace.toggleBlame (/Users/stelek/.atom/packages/git-blame/lib/git-blame.js:34:23)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:246:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:182:20)
-1:09.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused)
-1:01.7 core:copy (atom-text-editor.editor.is-focused)
-1:00.5 core:paste (atom-text-editor.editor.is-focused)
-0:58.7 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-0:58.7 editor:newline (atom-text-editor.editor.is-focused)
2x -0:31.8 core:save (atom-text-editor.editor.is-focused)
-0:23.8 editor:select-line (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-atom-dark-ui)
-0:23.6 application:open (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-atom-dark-ui)
-0:22.0 build-tools-cpp:make (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-atom-dark-ui)
-0:22.0 window:save-all (atom-text-editor.editor.is-focused)
-0:20.9 linter:lint (atom-text-editor.editor.is-focused)
-0:09.5 core:delete (atom-text-editor.editor.is-focused)
-0:02.5 core:save (atom-text-editor.editor.is-focused)
-0:01.0 git-blame:toggle (atom-text-editor.editor.is-focused)
-0:00.2 editor:consolidate-selections (atom-text-editor.editor.is-focused)
-0:00.2 core:cancel (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"linter",
"linter-clang",
"atom-ctags"
],
"themes": [
"atom-dark-ui",
"monokai"
],
"audioBeep": false,
"excludeVcsIgnoredPaths": false
},
"git-blame": {}
}
# User
Sublime-Style-Column-Selection, v1.2.3
auto-detect-indentation, v0.3.0
autocomplete-clang, v0.6.2
autocomplete-plus, v2.4.1
build-tools-cpp, v1.2.0
docblockr, v0.6.3
git-blame, v0.4.0
monokai, v0.12.0
reveal-active-file-context, v0.2.0
symbol-gen, v0.2.0
symbols-tree-view, v0.6.1
term2, v0.9.4
tree-view-git-projects, v0.5.0
# Dev
No dev packages
[Enter steps to reproduce below:]
Atom Version: 0.170.0
System: Mac OS X 10.10.1
Thrown From: git-blame package, v0.4.0
Uncaught TypeError: undefined is not a function
At /Users/ariel/.atom/packages/git-blame/lib/controllers/blameViewController.js:26
TypeError: undefined is not a function
at Object.toggleBlame (/Users/ariel/.atom/packages/git-blame/lib/controllers/blameViewController.js:26:40)
at atom-workspace.toggleBlame (/Users/ariel/.atom/packages/git-blame/lib/git-blame.js:34:23)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)
-0:00.0 git-blame:toggle (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
]
}
}
# User
language-haml, v0.14.0
# Dev
No dev packages
/cc @atom/core
bitbucket and github both allow a "." in the repo name, however this script ignores those.
for example, these would be valid remotes (assuming they existed)
[email protected]:foo/bar.baz.git
[email protected]:foo/bar.baz.git
pointing to the locations:
github.com/foo/bar.baz
bitbucket.org/foo/bar.baz
I figure you just pass the user-input date format into Moment's format
method. This makes it impossible to format the date relative to now
. You could add a ☐ relative
checkbox which would address this issue.
Atom Version: 0.172.0
System: Mac OS X 10.10.1
This error is happend When I open git-blame.
I don't have custom commit url template string set and my projects are hosted on our on git server with no http(s) access.
When I hit ctrl-b to toggle git blame I get the error popup I previously only saw when trying to click on a certain commit in the git blame drawer. The git blame drawer is not shown.
This was working before the 0.3 release.
Beanstalk support would be awesome! I'd submit a PR myself but I don't fully understand how the remotes are parsed.
Git Repository URL(s):
SSH: git@{project}.git.beanstalkapp.com:/{project}/{repo}.git
HTTPS: https://{project}.git.beanstalkapp.com/{repo}.git
Changeset URL:
https://{project}.beanstalkapp.com/{repo}/changesets/{commit}
steps to reproduce
While working with multiple panes of the editor, I'm unable to generate the git blame in more than one pane. It happens so that the git blame is generated only for a particular pane and never for the other panes.
Trying to get git-blame to work but the only thing stated in the instructions is that the .editor must be active. Is that a setting somewhere? How do I know if .editor is active/inactive?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.