Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

143 rader
8.4 KiB

8 år sedan
  1. # GitLens
  2. Provides Git information (most recent commit, # of authors) in CodeLens, on-demand inline blame annotations, status bar blame information, a blame explorer, and commands to compare changes with the working tree or previous versions.
  3. ---
  4. ## Features
  5. - Provides **CodeLens** on code blocks:
  6. - **Recent Change** - author and date of the most recent check-in for that block
  7. > Clicking on the CodeLens opens a **Blame history explorer** with the commits and changed lines in the right pane and the commit (file) contents on the left
  8. - **Authors** - number of authors of a block and the most prominent author (if there are more than one)
  9. > Clicking on the CodeLens toggles Git blame annotations on/off
  10. - Provides on-demand **inline blame annotations** with multiple styles
  11. - Provides Git blame information about the selected line in the **status bar**
  12. - Provides a Git **blame history explorer** to visualize the history of a file or block
  13. - Provides ability to **compare diffs** with the working tree as well as with previous versions
  14. - Provides many configuration settings to allow the **customization** of almost all Features
  15. ---
  16. ## Screenshots
  17. > ![GitLens preview](https://raw.githubusercontent.com/eamodio/vscode-git-codelens/master/images/preview-gitlens.gif)
  18. ---
  19. ## Requirements
  20. Must be using Git and it must be in your path.
  21. ---
  22. ## Extension Settings
  23. |Name | Description
  24. |-----|------------
  25. |`gitlens.blame.annotation.style`|Specifies the style of the blame annotations. `compact` - groups annotations to limit the repetition and also adds author and date when possible. `expanded` - shows an annotation on every line
  26. |`gitlens.blame.annotation.sha`|Specifies whether the commit sha will be shown in the blame annotations. Applies only to the `expanded` annotation style
  27. |`gitlens.blame.annotation.author`|Specifies whether the committer will be shown in the blame annotations. Applies only to the `expanded` annotation style
  28. |`gitlens.blame.annotation.date`|Specifies whether the commit date will be shown in the blame annotations. Applies only to the `expanded` annotation style
  29. |`gitlens.codeLens.visibility`|Specifies when CodeLens will be triggered in the active document. `auto` - automatically. `ondemand` - only when requested. `off` - disables all active document CodeLens
  30. |`gitlens.codeLens.location`|Specifies where CodeLens will be rendered in the active document. `all` - render at the top of the document, on container-like (classes, modules, etc), and on member-like (methods, functions, properties, etc) lines. `document+containers` - render at the top of the document and on container-like lines. `document` - only render at the top of the document. `custom` - rendering controlled by `gitlens.codeLens.locationCustomSymbols`
  31. |`gitlens.codeLens.locationCustomSymbols`|Specifies the set of document symbols to render active document CodeLens on. Must be a member of `SymbolKind`
  32. |`gitlens.codeLens.recentChange.enabled`|Specifies whether the recent change CodeLens is shown
  33. |`gitlens.codeLens.recentChange.command`|Specifies the command executed when the recent change CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `git.viewFileHistory` - opens a file history picker, which requires the Git History (git log) extension
  34. |`gitlens.codeLens.authors.enabled`|Specifies whether the authors CodeLens is shown
  35. |`gitlens.codeLens.authors.command`|Specifies the command executed when the authors CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `git.viewFileHistory` - opens a file history picker, which requires the Git History (git log) extension
  36. |`gitlens.statusBar.enabled`|Specifies whether blame information is shown in the status bar
  37. |`gitlens.statusBar.command`|"Specifies the command executed when the blame status bar item is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `git.viewFileHistory` - opens a file history picker, which requires the Git History (git log) extension"
  38. ---
  39. ## Known Issues
  40. - Content in the **Blame history explorer** disappears after a bit: [vscode issue](https://github.com/Microsoft/vscode/issues/11360)
  41. - Highlighted lines disappear in **Blame explorer** after changing selection and returning to a previous selection: [vscode issue](https://github.com/Microsoft/vscode/issues/11360)
  42. - CodeLens aren't updated properly after a file is saved: [vscode issue](https://github.com/Microsoft/vscode/issues/11546)
  43. - Visible whitespace causes issue with blame overlay (currently fixed with a hack, but fails randomly): [vscode issue](https://github.com/Microsoft/vscode/issues/11485)
  44. ---
  45. ## Release Notes
  46. ### 1.0.0
  47. - Adds support for git history (log)
  48. - Changes `gitlens.diffWithPrevious` command to only be line sensitive if blame annotations are visible, otherwise it uses file history
  49. - Changes `gitlens.diffWithWorking` command to only be line sensitive if blame annotations are visible, otherwise it uses file history
  50. - Fixes issue where blame annotations would not be cleared properly when switching between open files
  51. ### 0.5.5
  52. - Fixes another off-by-one issue when diffing with caching
  53. ### 0.5.4
  54. - Fixes off-by-one issues with blame annotations without caching and when diffing with a previous version
  55. ### 0.5.3
  56. - Adds better uncommitted hover message in blame annotations
  57. - Adds more protection for dealing with uncommitted lines
  58. ### 0.5.2
  59. - Fixes loading issue on Linux
  60. ### 0.5.1
  61. - Adds blame information in the StatusBar
  62. - Add new StatusBar settings -- see **Extension Settings** above for details
  63. - Renames the `gitlens.codeLens.recentChange.command` & `gitlens.codeLens.authors.command` settings options (to align with command names)
  64. - Adds new `gitlens.diffWithPrevious` option to the `gitlens.codeLens.recentChange.command` & `gitlens.codeLens.authors.command` settings
  65. - Fixes Diff with Previous when the selection is uncommitted
  66. - Removes `gitlens.blame.annotation.useCodeActions` setting and behavior
  67. ### 0.3.3
  68. - Fixes [#7](https://github.com/eamodio/vscode-gitlens/issues/7) - missing spawn-rx dependency (argh!)
  69. ### 0.3.2
  70. - Fixes [#7](https://github.com/eamodio/vscode-gitlens/issues/7) - missing lodash dependency
  71. ### 0.3.1
  72. - Adds new CodeLens visibility & location settings -- see **Extension Settings** above for details
  73. - Adds new command to toggle CodeLens on and off when `gitlens.codeLens.visibility` is set to `ondemand`
  74. ### 0.2.0
  75. - Fixes [#1](https://github.com/eamodio/vscode-gitlens/issues/1) - Support blame on files outside the workspace repository
  76. - Replaces blame regex parsing with a more robust parser
  77. - Fixes failures with Diff with Previous command
  78. - Fixes issues with blame explorer CodeLens when dealing with previous commits
  79. - Fixes display issues with compact blame annotations (now skips blank lines)
  80. ### 0.1.3
  81. - Improved blame annotations, now with sha and author by default
  82. - Add new blame annotation styles -- compact and expanded (default)
  83. - Adds many new configuration settings; see **Extension Settings** above for details
  84. ### 0.0.7
  85. - Fixes [#4](https://github.com/eamodio/vscode-gitlens/issues/4) - Absolute paths fail on Windows due to backslash (Really!)
  86. - Fixes [#5](https://github.com/eamodio/vscode-gitlens/issues/5) - Finding first non-white-space fails sometimes
  87. - Adds .gitignore checks to reduce the number of blame calls
  88. ### 0.0.6
  89. - Fixes [#2](https://github.com/eamodio/vscode-gitlens/issues/2) - [request] Provide some debug info when things fail
  90. - Fixes [#4](https://github.com/eamodio/vscode-gitlens/issues/4) - Absolute paths fail on Windows due to backslash
  91. - Attempts to scroll to the correct position when opening a diff
  92. ### 0.0.5
  93. - Fixes issues where filename changes in history would cause diffs to fails
  94. - Fixes some issues with uncommitted blames
  95. - Removes CodeLens from fields and single-line properties to reduce visual noise
  96. - Automatically turns off blame only when required now
  97. ### 0.0.4
  98. Candidate for preview release on the vscode marketplace.
  99. ### 0.0.1
  100. Initial release but still heavily a work in progress.