GithubHelp home page GithubHelp logo

gitkraken / vscode-gitlens Goto Github PK

View Code? Open in Web Editor NEW
8.8K 91.0 1.1K 127.09 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 vscode vscode-extension github

vscode-gitlens's Introduction

GitLens — Supercharge Git in VS Code

Supercharge Git and unlock untapped knowledge within your repository to better understand, write, and review code. Focus, collaborate, accelerate.

GitLens is a powerful open-source extension for Visual Studio Code.

GitLens supercharges your Git experience in VS Code. Maintaining focus is critical, extra time spent context switching or missing context disrupts your flow. GitLens is the ultimate tool for making Git work for you, designed to improve focus, productivity, and collaboration with a powerful set of tools to help you and your team better understand, write, and review code.

GitLens sets itself apart from other Git tools through its deep level of integration, versatility, and ease of use. GitLens sits directly within your editor, reducing context switching and promoting a more efficient workflow. We know Git is hard and strive to make it as easy as possible while also going beyond the basics with rich visualizations and step-by-step guidance and safety, just to name a few.

Getting Started

Watch the GitLens Getting Started video

Install GitLens by clicking Install on the banner above, or from the Extensions side bar in VS Code, by searching for GitLens.

Use Switch to Pre-Release Version on the extension banner to live on the edge and be the first to experience new features.

Is GitLens Free?

All features are free to use on all repos, except for features,

  • marked with a ✨ require a trial or paid plan for use on privately hosted repos
  • marked with a ☁️ require a GitKraken account, with access level based on your plan, e.g. Free, Pro, etc

See the FAQ for more details.

Features | Labs | Pro | FAQ | Support and Community | Contributing | Contributors | License

Discover Powerful Features

Quickly glimpse into when, why, and by whom a line or code block was changed. Zero-in on the most important changes and effortlessly navigate through history to gain further insights as to how a file or individual line's code evolved. Visualize code authorship at a glance via Git blame annotations and Git CodeLens. Seamlessly explore Git repositories with the visually-rich Commit Graph. Gain valuable insights via GitLens Inspect, and much more.

Blame, CodeLens, and Hovers

Gain a deeper understanding of how code changed and by whom through in-editor code annotations and rich hovers.

Inline and Status Bar Blame

Provides historical context about line changes through unobtrusive blame annotation at the end of the current line and on the status bar.

Inline Line Blame

Inline blame annotations

Status Bar Blame

Status bar blame annotations

💡 Use the Toggle Line Blame and Toggle Git CodeLens commands from the Command Palette to turn the annotations on and off.

Git CodeLens

Adds contextual and actionable authorship information at the top of each file and at the beginning of each block of code.

  • Recent Change — author and date of the most recent commit for the file or code block
  • Authors — number of authors of the file or code block and the most prominent author (if there is more than one)

Rich Hovers

Hover over blame annotations to reveal rich details and actions.

Current Line Hovers

File Annotations

Use on-demand whole file annotations to see authorship, recent changes, and a heatmap. Annotations are rendered as visual indicators directly in the editor.

File Blame

File Blame annotations

File Changes

File Changes annotations

File Heatmap

File Heatmap annotations

💡 On an active file, use the Toggle File Blame, Toggle File Changes, and Toggle File Heatmap commands from the Command Palette to turn the annotations on and off.

Revision Navigation

With just a click of a button, you can navigate backwards and forwards through the history of any file. Compare changes over time and see the revision history of the whole file or an individual line.

Revision Navigation

Side Bar Views

Our views are arranged for focus and productivity, although you can easily drag them around to suit your needs.

Side Bar views

GitLens Inspect as shown above has been manually moved into the Secondary Side Bar

💡 Use the Reset Views Layout command to quickly get back to the default layout.

GitLens Inspect

An x-ray or developer tools Inspect into your code, focused on providing contextual information and insights to what you're actively working on.

  • Inspect — See rich details of a commit or stash.
  • Line History — Jump through the revision history of the selected line(s).
  • File History — Explore the revision history of a file, folder, or selected lines.
  • Visual File History ✨ — Quickly see the evolution of a file, including when changes were made, how large they were, and who made them.
  • Search & Compare — Search and explore for a specific commit, message, author, changed file or files, or even a specific code change, or visualize comparisons between branches, tags, commits, and more.

GitLens

Quick access to many GitLens features. Also the home of GitKraken teams and collaboration services (e.g. GitKraken Workspaces), help, and support.

  • Home — Quick access to many features.
  • GitKraken Workspaces ☁️ — Easily group and manage multiple repositories together, accessible from anywhere, streamlining your workflow.
  • GitKraken Account — Power-up with GitKraken Cloud Services.

Source Control

Shows additional views that are focused on exploring and managing your repositories.

  • Commits — Comprehensive view of the current branch commit history, including unpushed changes, upstream status, quick comparisons, and more.
  • Branches — Manage and navigate branches.
  • Remotes — Manage and navigate remotes and remote branches.
  • Stashes — Save and restore changes you are not yet ready to commit.
  • Tags — Manage and navigate tags.
  • Worktrees ✨ — Simultaneously work on different branches of a repository.
  • Contributors — Ordered list of contributors, providing insights into individual contributions and involvement.
  • Repositories — Unifies the above views for more efficient management of multiple repositories.

(Bottom) Panel

Convenient and easy access to the Commit Graph with a dedicated details view.

  • Commit Graph ✨ — Visualize your repository and keep track of all work in progress.

Commit Graph ✨

Easily visualize your repository and keep track of all work in progress.

Use the rich commit search to find exactly what you're looking for. Its powerful filters allow you to search by a specific commit, message, author, a changed file or files, or even a specific code change.

Commit Graph

💡Quickly toggle the Graph via the Toggle Commit Graph command.

💡Maximize the Graph via the Toggle Maximized Commit Graph command.

GitKraken Workspaces ☁️ and Focus ✨

GitKraken Workspaces allow you to easily group and manage multiple repositories together, accessible from anywhere, streamlining your workflow. Create workspaces just for yourself or share (coming soon in GitLens) them with your team for faster onboarding and better collaboration.

Focus brings all of your GitHub pull requests and issues into a unified actionable view to help to you more easily juggle work in progress, pending work, reviews, and more. Quickly see if anything requires your attention while keeping you focused.

Focus view

Visual File History ✨

Quickly see the evolution of a file, including when changes were made, how large they were, and who made them. Use it to quickly find when the most impactful changes were made to a file or who best to talk to about file changes and more.

Visual File History view

Worktrees ✨

Efficiently multitask by minimizing the context switching between branches, allowing you to easily work on different branches of a repository simultaneously.

Avoid interrupting your work in progress when needing to review a pull request. Simply create a new worktree and open it in a new VS Code window, all without impacting your other work.

Worktrees view

Interactive Rebase Editor

Easily visualize and configure interactive rebase operations with the intuitive and user-friendly Interactive Rebase Editor. Simply drag & drop to reorder commits and select which ones you want to edit, squash, or drop.

Interactive Rebase Editor

Comprehensive Commands

Stop worrying about memorizing Git commands; GitLens provides a rich set of commands to help you do everything you need.

Git Command Palette

A guided, step-by-step experience for quickly and safely executing Git commands.

Git Command Palette

Quick Access Commands

Use a series of new commands to:

  • Explore the commit history of branches and files
  • Quickly search for and navigate to (and action upon) commits
  • Explore a file of a commit
  • View and explore your stashes
  • Visualize the current repository status

Integrations

Context switching kills productivity. GitLens not only reveals buried knowledge within your repository, it also brings additional context from issues and pull requests providing you with a wealth of information and insights at your fingertips.

Simplify your workflow and quickly gain insights with automatic linking of issues and pull requests across multiple Git hosting services including GitHub, GitHub Enterprise ✨, GitLab, GitLab self-managed ✨, Gitea, Gerrit, Google Source, Bitbucket, Bitbucket Server, Azure DevOps, and custom servers.

All integration provide automatic linking, while rich integrations with GitHub & GitLab offer detailed hover information for autolinks, and correlations between pull requests, branches, and commits, as well as user avatars for added context.

Define your own autolinks

Use autolinks to linkify external references, like Jira issues or Zendesk tickets, in commit messages.

GitKraken Labs

Our incubator for experimentation and exploration with the community to gather early reactions and feedback. Below are some of our current experiments.

🧪AI Explain Commit

Use the Explain panel on the Inspect view to leverage AI to help you understand the changes introduced by a commit.

🧪Automatically Generate Commit Message

Use the Generate Commit Message command from the Source Control view's context menu to automatically generate a commit message for your staged changes by leveraging AI.

Ready for GitLens Pro?

When you're ready to unlock the full potential of GitLens and enjoy all the benefits on your privately hosted repos, consider upgrading to GitLens Pro. With GitLens Pro, you'll gain access to ✨ features on privately hosted repos and ☁️ features based on the Pro plan.

To learn more about the pricing and the additional ✨ and ☁️ features offered with GitLens Pro, visit the GitLens Pricing page. Upgrade to GitLens Pro today and take your Git workflow to the next level!

FAQ

Is GitLens free to use?

Yes. All features are free to use on all repos, except for features,

  • marked with a ✨ require a trial or paid plan for use on privately hosted repos
  • marked with a ☁️ require a GitKraken Account, with access level based on your plan, e.g. Free, Pro, etc

While GitLens offers a remarkable set of free features, a subset of features tailored for professional developers and teams, marked with a ✨, require a trial or paid plan for use on privately hosted repos — use on local or publicly hosted repos is free for everyone. Additionally some features marked with a ☁️, rely on GitKraken Dev Services which requires a GitKraken account and access is based on your plan, e.g. Free, Pro, etc.

Preview ✨ features instantly for free for 3 days without an account, or start a free GitLens Pro trial to get an additional 7 days and gain access to ☁️ features to experience the full power of GitLens.

Are ✨ and ☁️ features free to use?

✨ features are free for use on local and publicly hosted repos, while a paid plan is required for use on privately hosted repos. ☁️ feature access is based on your plan including a Free plan.

Where can I find pricing?

Visit the GitLens Pricing page for detailed pricing information and feature matrix for plans.

Support and Community

Support documentation can be found on the GitLens Help Center. If you need further assistance or have any questions, there are various support channels and community forums available for GitLens:

Issue Reporting and Feature Requests

Found a bug? Have a feature request? Reach out on our GitHub Issues page.

Discussions

Join the GitLens community on GitHub Discussions to connect with other users, share your experiences, and discuss topics related to GitLens.

GitKraken Support

For any issues or inquiries related to GitLens, you can reach out to the GitKraken support team via the official support page. They will be happy to assist you with any problems you may encounter.

With GitLens Pro, you gain access to priority email support from our customer success team, ensuring higher priority and faster response times. Custom onboarding and training are also available to help you and your team quickly get up and running with a GitLens Pro plan.

Contributing

GitLens is an open-source project that greatly benefits from the contributions and feedback from its community.

Your contributions, feedback, and engagement in the GitLens community are invaluable, and play a significant role in shaping the future of GitLens. Thank you for your support!

Code Contributions

Want to contribute to GitLens? Follow the CONTRIBUTING docs to get started.

Documentation Contributions

Contributions to the documentation are greatly appreciated. If you find any areas that can be improved or have suggestions for new documentation, you can submit them as pull requests to the GitLens Docs repository.

Contributors

A big thanks to the people that have contributed to this project 🙏❤️:

Also special thanks to the people that have provided support, testing, brainstorming, etc:

And of course the awesome vscode team!

License

This repository contains both OSS-licensed and non-OSS-licensed files.

All files in or under any directory named "plus" fall under LICENSE.plus.

The remaining files fall under the MIT license.

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

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?

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

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.

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.

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

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.

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.

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.

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

[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!

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?

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.

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 .

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.

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)

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

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.

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.

rendering issue

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

image

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

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.

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

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, '/');
    }

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

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

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

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

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

[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.

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.

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 !

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.