diff --git a/contributions.json b/contributions.json index e86458bebc5a4..8e9d8d657ec2f 100644 --- a/contributions.json +++ b/contributions.json @@ -7951,6 +7951,19 @@ ] } }, + "gitlens.views.commitFixup": { + "label": "Commit (Fixup)...", + "enablement": "!operationInProgress", + "menus": { + "view/item/context": [ + { + "when": "viewItem =~ /gitlens:commit\\b(?!.*?\\b\\+rebase\\b)/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders", + "group": "1_gitlens_actions", + "order": 8 + } + ] + } + }, "gitlens.views.commits.attach": { "label": "Group into GitLens View", "icon": "$(close)", @@ -19057,14 +19070,14 @@ "order": 2, "welcomeContent": [ { - "contents": "Cloud Patches ᴘʀᴇᴠɪᴇᴡ — privately and securely share code with specific teammates and other developers, accessible from anywhere. Enhance collaboration without adding noise to your repositories." + "contents": "Cloud Patches ᴘʀᴇᴠɪᴇᴡ — privately and securely share code with specific teammates and other developers, accessible from anywhere. Enhance collaboration without adding noise to your repositories." }, { "contents": "[Create Cloud Patch](command:gitlens.views.drafts.create)", "when": "gitlens:plus" }, { - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22cloud-patches%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22cloud-patches%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22cloud-patches%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22cloud-patches%22%7D).", "when": "!gitlens:plus" }, { @@ -19126,11 +19139,11 @@ "order": 1, "welcomeContent": [ { - "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "gitlens:walkthroughSupported" }, { - "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "!gitlens:walkthroughSupported" }, { @@ -19142,7 +19155,7 @@ "when": "gitlens:launchpad:connected && gitlens:plus:state == -1" }, { - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", "when": "gitlens:launchpad:connected && gitlens:plus:state == 0" }, { @@ -19162,7 +19175,7 @@ "when": "gitlens:launchpad:connected && gitlens:plus:state == 4" }, { - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", "when": "gitlens:launchpad:connected && gitlens:plus:state == 5" } ] @@ -19229,19 +19242,19 @@ "when": "gitlens:views:scm:grouped:loading" }, { - "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", + "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:welcome && gitlens:install:new && !config.gitlens.advanced.skipOnboarding" }, { - "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nPrefer them separate? [Restore views to previous locations](command:gitlens.views.scm.grouped.welcome.restore)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", + "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nPrefer them separate? [Restore views to previous locations](command:gitlens.views.scm.grouped.welcome.restore)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:welcome && !gitlens:install:new && !config.gitlens.advanced.skipOnboarding" }, { - "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:walkthroughSupported" }, { - "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && !gitlens:walkthroughSupported" }, { @@ -19253,7 +19266,7 @@ "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == -1" }, { - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 0" }, { @@ -19273,7 +19286,7 @@ "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4" }, { - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 5" }, { @@ -19289,7 +19302,7 @@ "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == searchAndCompare && !gitlens:hasVirtualFolders" }, { - "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by allowing you to work on multiple branches simultaneously.", + "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by allowing you to work on multiple branches simultaneously.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && !gitlens:hasVirtualFolders" }, { @@ -19305,7 +19318,7 @@ "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && gitlens:plus:state == -1" }, { - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 0" }, { @@ -19325,11 +19338,11 @@ "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4" }, { - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 5" }, { - "contents": "⚠ Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", + "contents": "âš  Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && !gitlens:plus:required && gitlens:feature:unsupported:git:worktrees" } ] @@ -19398,14 +19411,14 @@ "order": 3, "welcomeContent": [ { - "contents": "Workspaces ᴘʀᴇᴠɪᴇᴡ — group and manage multiple repositories together, accessible from anywhere, streamlining your workflow.\n\nCreate workspaces just for yourself or share (coming soon in GitLens) them with your team for faster onboarding and better collaboration." + "contents": "Workspaces ᴘʀᴇᴠɪᴇᴡ — group and manage multiple repositories together, accessible from anywhere, streamlining your workflow.\n\nCreate workspaces just for yourself or share (coming soon in GitLens) them with your team for faster onboarding and better collaboration." }, { "contents": "[Create Cloud Workspace](command:gitlens.views.workspaces.create)", "when": "gitlens:plus" }, { - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22workspaces%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22workspaces%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22workspaces%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22workspaces%22%7D).", "when": "!gitlens:plus" }, { @@ -19424,7 +19437,7 @@ "order": 6, "welcomeContent": [ { - "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by working on multiple branches simultaneously." + "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by working on multiple branches simultaneously." }, { "contents": "Unlock this feature for privately hosted repos with [GitLens Pro](https://help.gitkraken.com/gitlens/gitlens-community-vs-gitlens-pro/).", @@ -19439,7 +19452,7 @@ "when": "gitlens:plus:state == -1" }, { - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", "when": "gitlens:plus:required && gitlens:plus:state == 0" }, { @@ -19459,11 +19472,11 @@ "when": "gitlens:plus:required && gitlens:plus:state == 4" }, { - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", "when": "gitlens:plus:required && gitlens:plus:state == 5" }, { - "contents": "⚠ Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", + "contents": "âš  Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", "when": "!gitlens:plus:required && gitlens:feature:unsupported:git:worktrees" } ] diff --git a/package.json b/package.json index af3440d289edf..89c29654d4d35 100644 --- a/package.json +++ b/package.json @@ -9015,6 +9015,11 @@ "title": "Refresh", "icon": "$(refresh)" }, + { + "command": "gitlens.views.commitFixup", + "title": "Commit (Fixup)...", + "enablement": "!operationInProgress" + }, { "command": "gitlens.views.commits.attach", "title": "Group into GitLens View", @@ -13768,6 +13773,10 @@ "command": "gitlens.views.commitDetails.refresh", "when": "false" }, + { + "command": "gitlens.views.commitFixup", + "when": "false" + }, { "command": "gitlens.views.commits.attach", "when": "false" @@ -19278,6 +19287,11 @@ "when": "viewItem =~ /gitlens:commit\\b(?!.*?\\b\\+rebase\\b)/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders", "group": "1_gitlens_actions@7" }, + { + "command": "gitlens.views.commitFixup", + "when": "viewItem =~ /gitlens:commit\\b(?!.*?\\b\\+rebase\\b)/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders", + "group": "1_gitlens_actions@8" + }, { "command": "gitlens.createBranch:views", "when": "viewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders", @@ -26363,7 +26377,7 @@ "viewsWelcome": [ { "view": "gitlens.views.drafts", - "contents": "Cloud Patches ᴘʀᴇᴠɪᴇᴡ — privately and securely share code with specific teammates and other developers, accessible from anywhere. Enhance collaboration without adding noise to your repositories." + "contents": "Cloud Patches ᴘʀᴇᴠɪᴇᴡ — privately and securely share code with specific teammates and other developers, accessible from anywhere. Enhance collaboration without adding noise to your repositories." }, { "view": "gitlens.views.drafts", @@ -26372,7 +26386,7 @@ }, { "view": "gitlens.views.drafts", - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22cloud-patches%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22cloud-patches%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22cloud-patches%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22cloud-patches%22%7D).", "when": "!gitlens:plus" }, { @@ -26382,12 +26396,12 @@ }, { "view": "gitlens.views.launchpad", - "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "gitlens:walkthroughSupported" }, { "view": "gitlens.views.launchpad", - "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "!gitlens:walkthroughSupported" }, { @@ -26402,7 +26416,7 @@ }, { "view": "gitlens.views.launchpad", - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", "when": "gitlens:launchpad:connected && gitlens:plus:state == 0" }, { @@ -26427,7 +26441,7 @@ }, { "view": "gitlens.views.launchpad", - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", "when": "gitlens:launchpad:connected && gitlens:plus:state == 5" }, { @@ -26437,22 +26451,22 @@ }, { "view": "gitlens.views.scm.grouped", - "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", + "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:welcome && gitlens:install:new && !config.gitlens.advanced.skipOnboarding" }, { "view": "gitlens.views.scm.grouped", - "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nPrefer them separate? [Restore views to previous locations](command:gitlens.views.scm.grouped.welcome.restore)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", + "contents": "GitLens groups many related views—Commits, Branches, Stashes, etc—here for easier view management.\n\n[Continue](command:gitlens.views.scm.grouped.welcome.dismiss)\n\nPrefer them separate? [Restore views to previous locations](command:gitlens.views.scm.grouped.welcome.restore)\n\nUse the tabs above to navigate, or detach the views you want to keep separated. You can regroup them anytime using the 'x' in the view header.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:welcome && !gitlens:install:new && !config.gitlens.advanced.skipOnboarding" }, { "view": "gitlens.views.scm.grouped", - "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:walkthroughSupported" }, { "view": "gitlens.views.scm.grouped", - "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", + "contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && !gitlens:walkthroughSupported" }, { @@ -26467,7 +26481,7 @@ }, { "view": "gitlens.views.scm.grouped", - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 0" }, { @@ -26492,7 +26506,7 @@ }, { "view": "gitlens.views.scm.grouped", - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 5" }, { @@ -26512,7 +26526,7 @@ }, { "view": "gitlens.views.scm.grouped", - "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by allowing you to work on multiple branches simultaneously.", + "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by allowing you to work on multiple branches simultaneously.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && !gitlens:hasVirtualFolders" }, { @@ -26532,7 +26546,7 @@ }, { "view": "gitlens.views.scm.grouped", - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 0" }, { @@ -26557,12 +26571,12 @@ }, { "view": "gitlens.views.scm.grouped", - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 5" }, { "view": "gitlens.views.scm.grouped", - "contents": "⚠ Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", + "contents": "âš  Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", "when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == worktrees && !gitlens:plus:required && gitlens:feature:unsupported:git:worktrees" }, { @@ -26582,7 +26596,7 @@ }, { "view": "gitlens.views.workspaces", - "contents": "Workspaces ᴘʀᴇᴠɪᴇᴡ — group and manage multiple repositories together, accessible from anywhere, streamlining your workflow.\n\nCreate workspaces just for yourself or share (coming soon in GitLens) them with your team for faster onboarding and better collaboration." + "contents": "Workspaces ᴘʀᴇᴠɪᴇᴡ — group and manage multiple repositories together, accessible from anywhere, streamlining your workflow.\n\nCreate workspaces just for yourself or share (coming soon in GitLens) them with your team for faster onboarding and better collaboration." }, { "view": "gitlens.views.workspaces", @@ -26591,7 +26605,7 @@ }, { "view": "gitlens.views.workspaces", - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22workspaces%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22workspaces%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22workspaces%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22workspaces%22%7D).", "when": "!gitlens:plus" }, { @@ -26601,7 +26615,7 @@ }, { "view": "gitlens.views.worktrees", - "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by working on multiple branches simultaneously." + "contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by working on multiple branches simultaneously." }, { "view": "gitlens.views.worktrees", @@ -26620,7 +26634,7 @@ }, { "view": "gitlens.views.worktrees", - "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", + "contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22worktrees%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22worktrees%22%7D).", "when": "gitlens:plus:required && gitlens:plus:state == 0" }, { @@ -26645,12 +26659,12 @@ }, { "view": "gitlens.views.worktrees", - "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", + "contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22worktrees%22%7D)\n\nReactivate your Pro trial and experience Worktrees and all the new Pro features — free for another 14 days!", "when": "gitlens:plus:required && gitlens:plus:state == 5" }, { "view": "gitlens.views.worktrees", - "contents": "⚠ Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", + "contents": "âš  Worktrees are not supported by your version of Git. Please upgrade to a more recent version.", "when": "!gitlens:plus:required && gitlens:feature:unsupported:git:worktrees" } ], diff --git a/src/constants.commands.generated.ts b/src/constants.commands.generated.ts index ef166adfe8a1b..d1f81b57f7550 100644 --- a/src/constants.commands.generated.ts +++ b/src/constants.commands.generated.ts @@ -390,6 +390,7 @@ export type ContributedCommands = | 'gitlens.views.closeRepository' | 'gitlens.views.collapseNode' | 'gitlens.views.commitDetails.refresh' + | 'gitlens.views.commitFixup' | 'gitlens.views.commits.attach' | 'gitlens.views.commits.refresh' | 'gitlens.views.commits.setCommitsFilterAuthors' diff --git a/src/env/node/git/sub-providers/operations.ts b/src/env/node/git/sub-providers/operations.ts index a3e605f39df9a..2e833eafe133d 100644 --- a/src/env/node/git/sub-providers/operations.ts +++ b/src/env/node/git/sub-providers/operations.ts @@ -401,4 +401,17 @@ export class OperationsGitSubProvider implements GitOperationsSubProvider { ); } } + + @log() + async commitFixup(repoPath: string, ref: string): Promise { + const scope = getLogScope(); + + try { + await this.git.exec({ cwd: repoPath, errors: GitErrorHandling.Throw }, 'commit', '--fixup', ref); + this.container.events.fire('git:cache:reset', { repoPath: repoPath, types: ['status'] }); + } catch (ex) { + Logger.error(ex, scope); + throw ex; + } + } } diff --git a/src/git/actions/repository.ts b/src/git/actions/repository.ts index 9a62d373ccb18..f55a2b451faae 100644 --- a/src/git/actions/repository.ts +++ b/src/git/actions/repository.ts @@ -86,6 +86,14 @@ export function switchTo( }); } +export async function commitFixup(repo: string | Repository, ref: GitRevisionReference): Promise { + const repoPath = typeof repo === 'string' ? repo : repo.path; + const repository = Container.instance.git.getRepository(repoPath); + if (repository == null) return; + + await repository.git.ops?.commitFixup?.(ref.ref); +} + export function revealRepository( repoPath: string, view?: ViewsWithRepositoryFolders, diff --git a/src/git/gitProvider.ts b/src/git/gitProvider.ts index b127e071474df..0f4499dea5b67 100644 --- a/src/git/gitProvider.ts +++ b/src/git/gitProvider.ts @@ -439,6 +439,7 @@ export interface GitOperationsSubProvider { options?: { mode?: 'hard' | 'keep' | 'merge' | 'mixed' | 'soft' }, ): Promise; revert(repoPath: string, refs: string[], options?: { editMessage?: boolean }): Promise; + commitFixup?(repoPath: string, ref: string): Promise; } export interface GitPausedOperationsSubProvider { diff --git a/src/views/viewCommands.ts b/src/views/viewCommands.ts index 9234191b02bed..0b44aaacc8451 100644 --- a/src/views/viewCommands.ts +++ b/src/views/viewCommands.ts @@ -1038,6 +1038,15 @@ export class ViewCommands implements Disposable { return RepoActions.revert(node.repoPath, node.ref); } + @command('gitlens.views.commitFixup') + @log() + private commitFixup(node: CommitNode | FileRevisionAsCommitNode) { + if (!node.isAny('commit', 'file-commit')) return Promise.resolve(); + + return RepoActions.commitFixup(node.repoPath, node.ref); + } + + @command('gitlens.views.setAsDefault') @log() private setAsDefault(node: RemoteNode) {