git-stack-cli 1.11.6 → 1.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +26 -17
- package/package.json +1 -1
- package/src/app/VerboseDebugInfo.tsx +1 -1
- package/src/commands/Fixup.tsx +33 -26
package/dist/cjs/index.cjs
CHANGED
|
@@ -31917,11 +31917,11 @@ function VerboseDebugInfo(props) {
|
|
|
31917
31917
|
async function run$2() {
|
|
31918
31918
|
const actions = Store.getState().actions;
|
|
31919
31919
|
try {
|
|
31920
|
-
await cli(`git config --list --show-origin`);
|
|
31921
31920
|
await cli(`echo HOME=$HOME`);
|
|
31922
31921
|
await cli(`echo USER=$USER`);
|
|
31923
31922
|
await cli(`echo GIT_AUTHOR_NAME=$GIT_AUTHOR_NAME`);
|
|
31924
31923
|
await cli(`echo GIT_AUTHOR_EMAIL=$GIT_AUTHOR_EMAIL`);
|
|
31924
|
+
await cli(`git config --list --show-origin`);
|
|
31925
31925
|
}
|
|
31926
31926
|
catch (err) {
|
|
31927
31927
|
actions.error("Unable to log verbose debug information.");
|
|
@@ -31976,6 +31976,10 @@ async function run$1() {
|
|
|
31976
31976
|
// get the commit SHA of the target commit
|
|
31977
31977
|
const commit_sha = (await cli(`git rev-parse HEAD~${adjusted_number}`))
|
|
31978
31978
|
.stdout;
|
|
31979
|
+
actions.output(reactExports.createElement(FormatText, { wrapper: reactExports.createElement(Text, { color: colors.yellow }), message: "\uD83D\uDEE0\uFE0F fixup {relative_number} {commit_sha}", values: {
|
|
31980
|
+
commit_sha: reactExports.createElement(Parens, null, commit_sha),
|
|
31981
|
+
relative_number: relative_number,
|
|
31982
|
+
} }));
|
|
31979
31983
|
await cli(`git commit --fixup ${commit_sha}`);
|
|
31980
31984
|
// check if stash required
|
|
31981
31985
|
let save_stash = false;
|
|
@@ -31987,21 +31991,26 @@ async function run$1() {
|
|
|
31987
31991
|
await cli("git stash -q");
|
|
31988
31992
|
actions.output(reactExports.createElement(Text, null, "\uD83D\uDCE6 Changes saved to stash"));
|
|
31989
31993
|
}
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
|
|
31999
|
-
|
|
32000
|
-
|
|
32001
|
-
|
|
32002
|
-
|
|
32003
|
-
await cli("git
|
|
32004
|
-
|
|
31994
|
+
try {
|
|
31995
|
+
// rebase target needs to account for new commit created above
|
|
31996
|
+
const rebase_target = Number(relative_number) + 1;
|
|
31997
|
+
await cli(`git rebase -i --autosquash HEAD~${rebase_target}`, {
|
|
31998
|
+
env: {
|
|
31999
|
+
...process.env,
|
|
32000
|
+
GIT_EDITOR: "true",
|
|
32001
|
+
},
|
|
32002
|
+
});
|
|
32003
|
+
}
|
|
32004
|
+
catch (error) {
|
|
32005
|
+
actions.error("🚨 Fixup failed");
|
|
32006
|
+
await cli("git rebase --abort");
|
|
32007
|
+
await cli("git reset --soft HEAD~1");
|
|
32008
|
+
}
|
|
32009
|
+
finally {
|
|
32010
|
+
if (save_stash) {
|
|
32011
|
+
await cli("git stash pop -q");
|
|
32012
|
+
actions.output(reactExports.createElement(Text, { color: colors.green }, "\u2705 Changes restored from stash"));
|
|
32013
|
+
}
|
|
32005
32014
|
}
|
|
32006
32015
|
}
|
|
32007
32016
|
|
|
@@ -37420,7 +37429,7 @@ async function command() {
|
|
|
37420
37429
|
.wrap(123)
|
|
37421
37430
|
// disallow unknown options
|
|
37422
37431
|
.strict()
|
|
37423
|
-
.version("1.11.
|
|
37432
|
+
.version("1.11.7" )
|
|
37424
37433
|
.showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
|
|
37425
37434
|
.help("help", "Show usage via `git stack help`")
|
|
37426
37435
|
.argv;
|
package/package.json
CHANGED
|
@@ -29,11 +29,11 @@ async function run() {
|
|
|
29
29
|
const actions = Store.getState().actions;
|
|
30
30
|
|
|
31
31
|
try {
|
|
32
|
-
await cli(`git config --list --show-origin`);
|
|
33
32
|
await cli(`echo HOME=$HOME`);
|
|
34
33
|
await cli(`echo USER=$USER`);
|
|
35
34
|
await cli(`echo GIT_AUTHOR_NAME=$GIT_AUTHOR_NAME`);
|
|
36
35
|
await cli(`echo GIT_AUTHOR_EMAIL=$GIT_AUTHOR_EMAIL`);
|
|
36
|
+
await cli(`git config --list --show-origin`);
|
|
37
37
|
} catch (err) {
|
|
38
38
|
actions.error("Unable to log verbose debug information.");
|
|
39
39
|
|
package/src/commands/Fixup.tsx
CHANGED
|
@@ -74,6 +74,17 @@ async function run() {
|
|
|
74
74
|
const commit_sha = (await cli(`git rev-parse HEAD~${adjusted_number}`))
|
|
75
75
|
.stdout;
|
|
76
76
|
|
|
77
|
+
actions.output(
|
|
78
|
+
<FormatText
|
|
79
|
+
wrapper={<Ink.Text color={colors.yellow} />}
|
|
80
|
+
message="🛠️ fixup {relative_number} {commit_sha}"
|
|
81
|
+
values={{
|
|
82
|
+
commit_sha: <Parens>{commit_sha}</Parens>,
|
|
83
|
+
relative_number: relative_number,
|
|
84
|
+
}}
|
|
85
|
+
/>
|
|
86
|
+
);
|
|
87
|
+
|
|
77
88
|
await cli(`git commit --fixup ${commit_sha}`);
|
|
78
89
|
|
|
79
90
|
// check if stash required
|
|
@@ -91,31 +102,27 @@ async function run() {
|
|
|
91
102
|
actions.output(<Ink.Text>📦 Changes saved to stash</Ink.Text>);
|
|
92
103
|
}
|
|
93
104
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
actions.output(
|
|
118
|
-
<Ink.Text color={colors.green}>✅ Changes restored from stash</Ink.Text>
|
|
119
|
-
);
|
|
105
|
+
try {
|
|
106
|
+
// rebase target needs to account for new commit created above
|
|
107
|
+
const rebase_target = Number(relative_number) + 1;
|
|
108
|
+
|
|
109
|
+
await cli(`git rebase -i --autosquash HEAD~${rebase_target}`, {
|
|
110
|
+
env: {
|
|
111
|
+
...process.env,
|
|
112
|
+
GIT_EDITOR: "true",
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
} catch (error) {
|
|
116
|
+
actions.error("🚨 Fixup failed");
|
|
117
|
+
await cli("git rebase --abort");
|
|
118
|
+
await cli("git reset --soft HEAD~1");
|
|
119
|
+
} finally {
|
|
120
|
+
if (save_stash) {
|
|
121
|
+
await cli("git stash pop -q");
|
|
122
|
+
|
|
123
|
+
actions.output(
|
|
124
|
+
<Ink.Text color={colors.green}>✅ Changes restored from stash</Ink.Text>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
120
127
|
}
|
|
121
128
|
}
|