Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

132 lignes
7.9 KiB

  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. ### 0.5.4
  47. - Fixes off-by-one issues with blame annotations without caching and when diffing with a previous version
  48. ### 0.5.3
  49. - Adds better uncommitted hover message in blame annotations
  50. - Adds more protection for dealing with uncommitted lines
  51. ### 0.5.2
  52. - Fixes loading issue on Linux
  53. ### 0.5.1
  54. - Adds blame information in the statusBar
  55. - Add new StatusBar settings -- see **Extension Settings** above for details
  56. - Renames the `gitlens.codeLens.recentChange.command` & `gitlens.codeLens.authors.command` settings options (to align with command names)
  57. - Adds new `gitlens.diffWithPrevious` option to the `gitlens.codeLens.recentChange.command` & `gitlens.codeLens.authors.command` settings
  58. - Fixes Diff with Previous when the selection is uncommitted
  59. - Removes `gitlens.blame.annotation.useCodeActions` setting and behavior
  60. ### 0.3.3
  61. - Fixes [#7](https://github.com/eamodio/vscode-gitlens/issues/7) - missing spawn-rx dependency (argh!)
  62. ### 0.3.2
  63. - Fixes [#7](https://github.com/eamodio/vscode-gitlens/issues/7) - missing lodash dependency
  64. ### 0.3.1
  65. - Adds new CodeLens visibility & location settings -- see **Extension Settings** above for details
  66. - Adds new command to toggle CodeLens on and off when `gitlens.codeLens.visibility` is set to `ondemand`
  67. ### 0.2.0
  68. - Fixes [#1](https://github.com/eamodio/vscode-gitlens/issues/1) - Support blame on files outside the workspace repository
  69. - Replaces blame regex parsing with a more robust parser
  70. - Fixes failures with Diff with Previous command
  71. - Fixes issues with blame explorer CodeLens when dealing with previous commits
  72. - Fixes display issues with compact blame annotations (now skips blank lines)
  73. ### 0.1.3
  74. - Improved blame annotations, now with sha and author by default
  75. - Add new blame annotation styles -- compact and expanded (default)
  76. - Adds many new configuration settings; see **Extension Settings** above for details
  77. ### 0.0.7
  78. - Fixes [#4](https://github.com/eamodio/vscode-gitlens/issues/4) - Absolute paths fail on Windows due to backslash (Really!)
  79. - Fixes [#5](https://github.com/eamodio/vscode-gitlens/issues/5) - Finding first non-white-space fails sometimes
  80. - Adds .gitignore checks to reduce the number of blame calls
  81. ### 0.0.6
  82. - Fixes [#2](https://github.com/eamodio/vscode-gitlens/issues/2) - [request] Provide some debug info when things fail
  83. - Fixes [#4](https://github.com/eamodio/vscode-gitlens/issues/4) - Absolute paths fail on Windows due to backslash
  84. - Attempts to scroll to the correct position when opening a diff
  85. ### 0.0.5
  86. - Fixes issues where filename changes in history would cause diffs to fails
  87. - Fixes some issues with uncommitted blames
  88. - Removes CodeLens from fields and single-line properties to reduce visual noise
  89. - Automatically turns off blame only when required now
  90. ### 0.0.4
  91. Candidate for preview release on the vscode marketplace.
  92. ### 0.0.1
  93. Initial release but still heavily a work in progress.