diff --git a/README.md b/README.md index a323099..028ffae 100644 --- a/README.md +++ b/README.md @@ -409,12 +409,11 @@ A [customizable](#search-commits-view-settings- 'Jump to the Search Commits view - A toolbar provides quick access to the _Search Commits_, _Keep Results_, _Clear Results_, and _Refresh_ commands - A context menu provides _Automatic Layout_, _List Layout_, _Tree Layout_, _Open Settings_ commands - Use the _Search Commits_ command (`gitlens.showCommitSearch`) with a shortcut of `alt+/` to search for commits - - by message — use `` to search for commits with messages that match `` — See [Git docs](https://git-scm.com/docs/git-log#git-log---grepltpatterngt 'Open Git docs') - - or, by author — use `@` to search for commits with authors that match `` — See [Git docs](https://git-scm.com/docs/git-log#git-log---authorltpatterngt 'Open Git docs') - - or, by commit id — use `#` to search for a commit with id of `` — See [Git docs](https://git-scm.com/docs/git-log#git-log-ltrevisionrangegt 'Open Git docs') - - or, by files — use `:` to search for commits with file names that match `` — See [Git docs](https://git-scm.com/docs/git-log---ltpathgt82308203 'Open Git docs') - - or, by changes — use `~` to search for commits with differences whose patch text contains added/removed lines that match `` — See [Git docs](https://git-scm.com/docs/git-log#git-log--Gltregexgt 'Open Git docs') - - or, by changed lines — use `=` to search for commits with differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file — See [Git docs](https://git-scm.com/docs/git-log#git-log--Sltstringgt 'Open Git docs') + - by message — use `` to search for commits with messages that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---grepltpatterngt 'Open Git docs') + - or, by author — use `@` to search for commits with authors that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---authorltpatterngt 'Open Git docs') + - or, by commit id — use `#` to search for a commit with id of `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs') + - or, by files — use `:` to search for commits with file names that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---ltpathgt82308203 'Open Git docs') + - or, by changes — use `~` to search for commits with differences whose patch text contains added/removed lines that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt--Gltregexgt 'Open Git docs') The search commits view provides the following features, diff --git a/src/commands/diffDirectory.ts b/src/commands/diffDirectory.ts index 9969cba..eb82b59 100644 --- a/src/commands/diffDirectory.ts +++ b/src/commands/diffDirectory.ts @@ -97,7 +97,7 @@ export class DiffDirectoryCommand extends ActiveEditorCommand { return commands.executeCommand( BuiltInCommands.Open, - Uri.parse('https://git-scm.com/docs/git-config#git-config-difftool') + Uri.parse('https://git-scm.com/docs/git-config#Documentation/git-config.txt-difftool') ); } diff --git a/src/commands/externalDiff.ts b/src/commands/externalDiff.ts index 3411e50..bae1425 100644 --- a/src/commands/externalDiff.ts +++ b/src/commands/externalDiff.ts @@ -197,7 +197,7 @@ export class ExternalDiffCommand extends Command { return commands.executeCommand( BuiltInCommands.Open, - Uri.parse('https://git-scm.com/docs/git-config#git-config-difftool') + Uri.parse('https://git-scm.com/docs/git-config#Documentation/git-config.txt-difftool') ); } diff --git a/src/commands/searchCommits.ts b/src/commands/searchCommits.ts index ade579a..072f4e1 100644 --- a/src/commands/searchCommits.ts +++ b/src/commands/searchCommits.ts @@ -19,19 +19,17 @@ import { } from './common'; import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails'; -const searchByRegex = /^([@~=:#])/; +const searchByRegex = /^([@~:#])/; const symbolToSearchByMap = new Map([ ['@', GitRepoSearchBy.Author], - ['~', GitRepoSearchBy.ChangedLines], - ['=', GitRepoSearchBy.Changes], + ['~', GitRepoSearchBy.Changes], [':', GitRepoSearchBy.Files], ['#', GitRepoSearchBy.Sha] ]); const searchByToSymbolMap = new Map([ [GitRepoSearchBy.Author, '@'], - [GitRepoSearchBy.ChangedLines, '~'], - [GitRepoSearchBy.Changes, '='], + [GitRepoSearchBy.Changes, '~'], [GitRepoSearchBy.Files, ':'], [GitRepoSearchBy.Sha, '#'] ]); @@ -120,7 +118,7 @@ export class SearchCommitsCommand extends ActiveEditorCachedCommand { value: args.search, prompt: 'Please enter a search string', placeHolder: - 'Search commits by message, author (@), files (:), commit id (#), changes (=), changed lines (~)', + 'Search commits by message, author (@), files (:), commit id (#), or changes (~)', valueSelection: selection }; args.search = await window.showInputBox(opts); @@ -153,10 +151,6 @@ export class SearchCommitsCommand extends ActiveEditorCachedCommand { searchLabel = `commits with an author matching '${args.search}'`; break; - case GitRepoSearchBy.ChangedLines: - searchLabel = `commits with changed lines matching '${args.search}'`; - break; - case GitRepoSearchBy.Changes: searchLabel = `commits with changes matching '${args.search}'`; break; diff --git a/src/git/gitService.ts b/src/git/gitService.ts index e1bb810..43e67a1 100644 --- a/src/git/gitService.ts +++ b/src/git/gitService.ts @@ -87,7 +87,6 @@ const mappedAuthorRegex = /(.+)\s<(.+)>/; export enum GitRepoSearchBy { Author = 'author', - ChangedLines = 'changed-lines', Changes = 'changes', Files = 'files', Message = 'message', @@ -1319,16 +1318,6 @@ export class GitService implements Disposable { `--author=${search}` ]; break; - case GitRepoSearchBy.ChangedLines: - searchArgs = [ - `-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`, - '--all', - '--full-history', - '-E', - '-i', - `-G${search}` - ]; - break; case GitRepoSearchBy.Changes: searchArgs = [ `-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`, @@ -1336,8 +1325,7 @@ export class GitService implements Disposable { '--full-history', '-E', '-i', - '--pickaxe-regex', - `-S${search}` + `-G${search}` ]; break; case GitRepoSearchBy.Files: diff --git a/src/views/nodes/searchNode.ts b/src/views/nodes/searchNode.ts index 5a5d1c4..6320c1a 100644 --- a/src/views/nodes/searchNode.ts +++ b/src/views/nodes/searchNode.ts @@ -81,19 +81,8 @@ export class SearchNode extends ViewNode { arguments: [this, getCommandArgs(GitRepoSearchBy.Changes)] }, `${GlyphChars.Space.repeat(4)} or, by changes`, - '= pattern', - 'Click to search commits by changes' - ), - new CommandMessageNode( - this.view, - this, - { - ...command, - arguments: [this, getCommandArgs(GitRepoSearchBy.ChangedLines)] - }, - `${GlyphChars.Space.repeat(4)} or, by changed lines`, '~ pattern', - 'Click to search commits by changed lines' + 'Click to search commits by changes' ) ]; }