Coder Social home page Coder Social logo

gitkraken / vscode-gitlens Goto Github PK

View Code? Open in Web Editor NEW
8.8K 8.8K 1.1K 127.62 MB

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more

Home Page: http://gitkraken.com/gitlens

License: Other

TypeScript 90.17% JavaScript 0.97% HTML 5.54% SCSS 3.28% Handlebars 0.03%
git github vscode vscode-extension

vscode-gitlens's People

Contributors

amandacameron avatar arajkumar avatar arrpee avatar axosoft-ramint avatar cmalard avatar connor4312 avatar d13 avatar dependabot[bot] avatar eamodio avatar ericf-axosoft avatar gitter-badger avatar jogo- avatar justinrobots avatar leo9-py avatar miggy-e avatar rasa avatar rebornix avatar rivy avatar segevfiner avatar shafinkhadem avatar sir-kain avatar skylerdawson avatar slavik-lvovsky avatar spaceeec avatar tamuratak avatar tradiff avatar tristanthelamb avatar uzitech avatar zaboyle avatar zeeshanadnan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-gitlens's Issues

Copy Commit Sha to Clipboard not working

Hello,

I can't seem to make the "Copy Commit Sha to Clipboard" feature work, no matter how hard I try.

I'm using version 1.9.1 on Ubuntu-Gnome 16.04.

I tried the feature using various ways: the right click contextual menu, the command palette or one of the various quick pick uis.

This has never resulted in anything being copied to the clipboard. Actually my clipboard remains unchanged and still contains what it had before.

Any way to investigate this ?

Thanks.

Invalid Object Name '00000000'

It seems that now all files are detected as not yet commited, hence, when I try to get the blame history I end up with the following
image

Running the contributed command:'gitlens.toggleBlame' failed.

Stack trace in console:

/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:121 Path must be a string. Received undefined: TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.relative (path.js:576:5)
    at Function.Git.normalizePath (C:\Users\felix\.vscode\extensions\eamodio.gitlens-0.0.5\out\src\git.js:19:53)
    at GitProvider.getBlameForFile (C:\Users\felix\.vscode\extensions\eamodio.gitlens-0.0.5\out\src\gitProvider.js:58:34)
    at GitCodeLensProvider.provideCodeLenses (C:\Users\felix\.vscode\extensions\eamodio.gitlens-0.0.5\out\src\gitCodeLensProvider.js:54:45)
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:11:28014
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:6:22775
    at new n.Class.derive._oncancel (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:5:26897)
    at Object.l [as asWinJsPromise] (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:6:22738)
    at e.provideCodeLenses (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:11:27968)
    at c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:12:5839
    at t._withAdapter (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:12:5149)
    at t.$provideCodeLenses (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:12:5801)
    at t.e.handle (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:10:22905)
    at s (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:7:30449)
    at p (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:7:31126)

Uncommited change behavior on tab or space

Hello,

OS: Linux Ubuntu 16.04
VS Code: 1.10.2
GitLens: 2.11.2

When you use space or tab on empty line you get Uncommited change, if I remember correctly it was VS Code problem and you created new issue, but seems it wasn't fixed...

screenshot from 2017-03-12 17 19 51

P.S. Enabled debug, seems everything fine, no errors or warning from GitLens.

Debug breakpoints not visible in blame view (author history view) - Current commit area

Thanks for making this awesome extension. I just noticed that in the blame view (author/commit history view), its not possible to see the breakpoints on the lines highlighted by the current commit.

The breakpoints are set and removed and work fine. Just that they are not visible because i think the commit line block visually overwrites the red break point circle.

Refer to the example image below - There are breakpoints on both line 82 and 83. But its only visible on 83.

image

Its a small issue but really helps during the code review. I can easily see the changes made as a part of that commit and debug them as part of the code review.

Commit messages can causes markdown formatting in hovers

When message starts with # symbol, it is displayed as title and looks messy.

img_27022017_094903_0

Do markdown support is really necessary here or just messages is't properly escaped ?
p.s.
If this is a feature, is there some option to disable markdown support in tooltips?

rendering issue

what could be causing this? alle lens stuff is rendered outside the editor

image

Cannot read property 'sha' of undefined

The extension throws some errors i the console. This is how it looks when I open Visual Studio Code with the extension activated. I have had some problems with VS Code recently. Error messages showing up and prompting to reload window. That is how I discovered this. I do not yet know if this extension has something to do with that error message.

screen shot 2017-01-07 at 09 24 52 1

[request] Allow disabling automatic blame, possibly by default

While using blame is indeed very useful, much of the time it's not needed, and so showing the blame "lines" unconditionally can be distracting (how do you call these lines of [author], [NN time ago] which show up at the source code when editing?).

I'd suggest to add a config to control whether or not the blame lines should display when opening a new file, while possibly setting it to false by default.

This would probably require adding another key binding to toggle the blame lines.

File History not working on Windows 7

On Windows 7, it always show me this warning "Unable to show file history. File is probably not under source control" and does not work... The file (and the project itself) is on git and github too.
However, the blame feature works well.

On OS X Sierra all works well (file history + blame), but in Windows 7, I can't make it work properly.

Thanks for this awesome extension !

Absolute paths fail on Windows due to backslash

Currently the code at src/git.ts looks as follows, which seem to intend to normalize backslashes to slashes:

    static normalizePath(fileName: string, repoPath: string) {
        fileName = fileName.replace(/\\/g, '/');
        return isAbsolute(fileName) ? relative(repoPath, fileName) : fileName;
    }

However, on Windows path.relative appears to return paths with backslashes - which makes the git commands fail. The node docs seems to support it - https://nodejs.org/api/path.html#path_path_relative_from_to (note that at the example the absolute path is with backslashes, while in your code it's with slashes, however, it still seems to return backslashes).

I'd suggest to rewrite it like so:

    static normalizePath(fileName: string, repoPath: string) {
        if (isAbsolute(fileName))
            fileName = relative(repoPath, fileName);
        return fileName.replace(/\\/g, '/');
    }

Finding first non-white-space fails sometimes

gitCodeLensProvider.ts has the following line:

         let startChar = line.text.search(`\\b${symbol.name}\\b`); //line.firstNonWhitespaceCharacterIndex;

However, it seems that on some cases symbol.name ends up as the entire source code line with whatever chars it has in it, and sometimes it breaks the regex.

I've replaced it locally with this which seems to work:

        var startChar = -1;
        try {
            startChar = line.text.search("\\b\\" + symbol.name + "\\b"); //line.firstNonWhitespaceCharacterIndex;
        } catch (e) {
            var i = 0, c;
            while ((c = line.text[i]) && (c == ' ' || c == '\t'))
                i++;
            startChar = c ? i : -1;
        }

but there are probably cleaner approaches for the fix.

Unable to click on status bar button in diff mode

Steps:

  1. modify any file;
  2. open SCM tab;
  3. click on modified file to see diff;
  4. put cursor on any line in left part of diff to see author in status bar
  5. click on author in status bar

Expected: GitLens menu for selected commit.

Actual: status bar button hide.

command 'gitlens.XXX' not found

I installed Gitlens 0.5.5. When I right-click and click one of the Gitlens options, the command isn't found. For example if I click "Toggle Git Blame Annotations", the error pops up "command 'gitlens.toggleBlame' not found". In the console, I have:

command 'gitlens.toggleBlame' not found: Error: command 'gitlens.toggleBlame' not found
    at e._tryExecuteCommand (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:61:8124)
    at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:61:7963
    at then (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:31:17056)
    at e.executeCommand (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:61:7937)
    at t.run (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:49:26492)
    at e.runAction (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:88:11655)
    at click (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:88:11425)
    at CallbacksRegistry.apply (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\common\api\callbacks-registry.js:54:39)
    at EventEmitter.<anonymous> (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\renderer\api\remote.js:275:21)
    at emitThree (events.js:116:13)e.doShow @ messageService.ts:128e.show @ messageService.ts:107(anonymous function) @ contextmenuService.ts:105done @ winjs.base.raw.js:1378e.runAction @ contextmenuService.ts:105click @ contextmenuService.ts:88apply @ C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\common\api\callbacks-registry.js:54(anonymous function) @ C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\renderer\api\remote.js:275emitThree @ events.js:116emit @ events.js:194

Scroll change on input if codeLens is visible on css files

Hi, Just started using the extension and it's awesome.

But when the codelens are visible on any css files that can be scrolled and your scroll is not on top of the page, if you type something the scroll will go down a little. If the scroll is on top, the page just bounce a little and go back to the original state.

Support blame on files outside the workspace repository

This extension seems broken for all files that are outside of the workspace's Git repo. I get errors like this in the developer console:

fake:1 fatal: '../../../../../HaxeToolkit/haxe/lib/flixel/git/flixel/FlxObject.hx' is outside repository

The absolute path for that is C:/HaxeToolkit/haxe/lib/flixel/git/flixel/FlxObject.hx, and that file is in a Git repo, just a different one than the workspace I'm currently in.

The command run seems to be git blame --porcelain --root -- <file-path> - probably need to switch the working directory first in these cases?

git log Error: fatal: unknown date format iso8601-strict Failed with exit code: 128

Hello,

I am getting this error message whenever I try to user gitlens on a file.

This is the output:

Add log cache for 'c:/users/...js' git log --follow --name-only --no-merges --date=iso8601-strict --format=%H -%nauthor %an%nauthor-date %ai%ncommitter %cn%ncommitter-date %ci%nsummary %s%nfilename ? ..js cwd='c:/Users/...' Error: fatal: unknown date format iso8601-strict Failed with exit code: 128

Cheers

Python file scrolling

In a python file, if there is gitlens stuff showing and I type in the file, the page scrolls up a little each time I press a key. When at the top it bounces a little. I'm currently using

VS Code Version 1.8.0-insider
Commit 043310affe454f94c665494b77818c1425cbe8db
Date 2016-11-17T12:27:28.054Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

GitLens 1.0.2

This looks like if may be along the same line as closed issue #9 .

Extension bootup failed => dependency error(lodash is missing)

Hey there,
many thanks for this awesome plugin. 👍

Since v0.3.1 im getting a dependency error on vscode startup. Looks like spawn-rx requires lodash as dependency.

image

Used vscode version:
Version 1.5.2
Commit 66f37fd2a99eb9d628dd374d81d78835b410c39b
Date 2016-09-12T13:30:03.456Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0

[request] Provide some debug info when things fail

First, thanks for what seems like the best approach so far to explore commits history!

I noticed some issues like sometimes ERROR: Running the contributed command:'gitlens.toggleBlame' failed., or some other issues like opening a diff ends up with one or two sides of the comparison empty (to working tree and to previous commit, respectively).

However, the debug console is empty and I couldn't find any other place where more info about the issue is available.

I think it could be useful to post some debug info when something fails or possibly unexpected (e.g. empty diff pane which should not be empty), possibly behind some debug config preference.

Thanks again for this extension, looking forward to see it grow!

Unable to find git

Hello,

GitLens can not find my installed git. The complete error message is:

GitLens: Unable to find Git. Please make sure Git is installed. Also ensure that Git is either in the PATH, or that 'gitlens.advanced.git' is pointed to its installed location.

Git is located in /usr/local/bin/git and the containing directory is in the path. Specifying a path breaks my setup because the path is not the same on Windows ( settings are synced ). Running Git on the commandline works, too.

How can I find out where GitLens looks for git or help you to help me?

Kind regards,
Sascha

File-level CodeLens isn't using the blame of the whole file as it should

Hello,

firstly thanks for such amazing extension for VS Code, secondly I have one problem which a little bit annoys me, because it doesn't produce the real info about commit, I updated README.md file more than 10 times and I always see svipben, a day ago, but it was yesterday and today, same applies for all files also function Compare with Previous commit shows bad info as well as codelens, I mean it shows only first commit, I made ~30 commits and it doesn't updated.

OS: Linux Ubuntu 16.04
VS Code: 1.10
Git: 2.11.0
User Settings: Default
Workspace Settings: Default

Thanks,
svipben

00000000 Uncommitted changes distracting

I find the Uncommitted changes info mostly distracting. These new changes has well indicated besides the line no and also in the scroll bar (maybe also in the coming mini-map). It would be great if we can hide it.

fff

GitLens only displayed for some files

I don't know if this is a bug or some user error triggered by me, anyway the gitlens only show up inline in some files. Is this supposed to be like this, are there configuration settings I miss or is this something else?

Here I don't see any gitlens information inline in editor
lens-hidden

but in this file it's displayed.
lens-displayed

Feature request: Copy commit hash to clipboard

Hey there, loving the plugin.

I'm really missing some way to copy the commit hash on the blame annotation to the clipboard. A keyboard command is a possibility, but just adding the option the context menu would be sufficient.

Open file should open the selected version of the file

In "Show File History" feature, click a particular commit on the list, it shows "go back", "Compare with Previous Commit", "Compare with Working Tree", and "Open File" etc., when clicking "Open File", it doesn't open the version of previously selected commit, instead just open the file currently in the folder! That's less interesting. It should open the the version of the selected commit.

Annotations broken in insider build

Just installed 2.0.1 of this extension in the latest insider build (from this morning) and every one of the three annotations styles is broken in some way. (Also not the escaped bytes like \0.)

Is this a regression in vscode or some other extension that messes this up? It worked perfectly last week with a pre-2.0 version (and an earlier insider build). Sorry to not have more information on this.

compact

expanded

trailing

File history or Changed files not shown

VSCode 1.10.1
macOS Sierra

Hi!

I installed the extension, blaming works well, but when I want to see e.g. File History, I get a warn, that "Unable to show file history. File is probably not under source control". Also when I want to look at Changed Files (click on Commit Details -> Show Changed Files) I get warn "Unable to show commit details".

But as I said...Blame works.

What should I do to let it work? Extension looks awesome, but it would be much better if it work for me :)

Thanks a lot!

display extra gitlens in vue file with vetur

When working together with vetur (vscode's officially recommended vue plugin) vuejs/vetur#87, .vue files <style> part has extra gitlens displays:

image

If using other vue support plugins such asvue or vue-component there is no this issue. Simply renaming .vue file to .html file doesn't show the extra gitlens either. This happens only with vetur.

Add date format options for status bar blame

Can you add setting to output dates as is?
Not "15 minutes ago" or "a month ago" (it hard to calculate actual datetime), but "Today"/"Yesterday"/earlier as plain date "02.03.2017" + time

Samples:

  • Today at 12:24
  • Yesterday at 09:00
  • at 01.02.2017 19:34

thank you.

Blame information is invalid when a file has unsaved changes

GitLens ignore new line shifts in modified file.

Steps:

  1. open document modify history has few people, for example:
    line 1 by user A
    line 2 by user B
    line 3 by user C
  2. put cursor in end of line 1 and press Enter
  3. check owners of lines 1-4

Expected:
line 1 by user A
line 2 (empty) has no user
line 3 by user B
line 4 by user C

Actual:
line 1 by user A
line 2 (empty) by user B
line 3 by user C
line 4 has no user

Encoding issues

There is some issues when encoding of files in Git is not UTF-8.
If I have a file opened in vscode encoded in Windows 1252 (this is my default encoding for my workspace),
when using the Compare with ... command, the files from Git (not the current one in the Working folder) is displayed with the wrong encoding.

To replicate:

  1. Create a new file and put this text inside: référence
  2. Save it with encoding Windows 1252
  3. Commit it in a Git repository
  4. Modify it and use Compare with Working Tree to show the difference

The current file is OK but the one in Git is wrong (garbage instead of é).
I think the encoding from the current file in vscode must be used to decode the files from Git.

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.