Skip to content

Test: Git commit editor input #153366

@lszomoru

Description

@lszomoru

Refs: #30562

Complexity: 5

Authors: @joaomoreno, @lszomoru

Create Issue


This milestone we have polished and merged a long standing community contribution that enables using a full size editor as a commit message input. This new experience is controlled using two new settings: git.useEditorAsCommitInput (default value is true), git.terminalGitEditor (default value is false).

Prerequisites

  • Open VS Code Insiders and ensure that the settings are set to their default values:
    • git.useEditorAsCommitInput is set to true
    • git.terminalGitEditor is set to false

Commit message editor

  • Open VS Code Insiders and open a folder/workspace that contains a git repository
  • Make a change to one or more files from the folder/workspace and switch to the "Source Control" viewlet
  • Leave the commit input empty, and click on the "Commit" button
    • Confirm that a new editor with the COMMIT_EDITMSG document gets opened
    • Confirm that while the document is opened:
      • Commit button is disabled
      • Commit input is empty and read-only. Typing a message displays a hover that the input is read-only.
      • Commit related commands are not shown in the Command Palette
      • Commit related commands are disabled in the ... -> Commit submenu in the SCM viewlet
  • Close the COMMIT_EDITMSG editor
    • Confirm that an information notification is shown that the commit operation was cancelled
    • Confirm that the changes were not committed
  • Leave the commit input empty, and click on the "Commit" button
  • In the opened editor enter a commit message (try single line, multi line, etc.). When done, close the editor
    • Confirm that the changes were committed with the provided message

Terminal integration

  • Open VS Code Insiders and open a folder/workspace that contains a git repository
  • Make a change to one or more files from the folder/workspace
  • Open a new integrated terminal window, and execute git commit
    • Confirm that your configured GIT_EDITOR is being used (ex: vim)
  • Close the integrated terminal window
  • Open Setting and set the git.terminalGitEditor setting to true
  • Open a new integrated terminal window, and execute git commit
    • Confirm that a new editor tab is opened with the COMMIT_EDITMSG document
  • In the opened editor enter a commit message (try single line, multi line, etc.). When done, close the editor
    • Confirm that the changes were committed with the provided message

Legacy functionality

  • Open VS Code Insiders and open a folder/workspace that contains a git repository
  • Open Setting, set the git.useEditorAsCommitInput setting to false
  • Reload the window
  • Make a change to one or more files from the folder/workspace and switch to the "Source Control" viewlet
  • Leave the commit input empty, and click on the "Commit" button
    • Confirm that the quick input is being shown
  • Press ESCAPE to cancel the operation
    • Confirm that the operation has been cancelled and the changes were not committed
  • Leave the commit input empty, and click on the "Commit" button
    • Confirm that the quick input is being shown
  • Enter a message in the quick input and press ENTER
    • Confirm that the changes are committed with the provided message

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions