Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Git commit editor input #153366

Closed
3 tasks done
lszomoru opened this issue Jun 27, 2022 · 2 comments
Closed
3 tasks done

Test: Git commit editor input #153366

lszomoru opened this issue Jun 27, 2022 · 2 comments

Comments

@lszomoru
Copy link
Member

lszomoru commented Jun 27, 2022

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
@isidorn
Copy link
Contributor

isidorn commented Jun 29, 2022

Cool work 👏
To be honest since 5 years I had VS Code configured as the git commit input, so I was sort of living this experience...

@TylerLeonhardt
Copy link
Member

I heckin love this feature

@TylerLeonhardt TylerLeonhardt removed their assignment Jun 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants