git-stack-cli 1.2.3 → 1.2.5
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/README.md +20 -7
- package/dist/cjs/index.cjs +17 -19
- package/package.json +1 -1
- package/src/app/DependencyCheck.tsx +36 -25
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
- 💪 **Work seamlessly with GitHub's interface**
|
|
10
10
|
- 🚫 **Avoid juggling mutiple branches and complex rebasing**
|
|
11
11
|
- 📚 **Preserve your detailed commit history**
|
|
12
|
+
- ⚡ **Faster, in-memory rebase via [`git revise`](https://github.com/mystor/git-revise)**
|
|
12
13
|
|
|
13
14
|
## Demo
|
|
14
15
|
|
|
@@ -16,24 +17,36 @@
|
|
|
16
17
|
|
|
17
18
|
## Install
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
> [!TIP]
|
|
21
|
+
>
|
|
22
|
+
> Install via **[Homebrew](https://brew.sh/)** to ensure the **[official Github CLI](https://cli.github.com/)** and **[git revise](https://github.com/mystor/git-revise)** dependencies are installed automatically
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
```bash
|
|
24
25
|
brew tap magus/git-stack
|
|
25
26
|
brew install git-stack
|
|
26
27
|
```
|
|
27
28
|
|
|
29
|
+
### `npm`
|
|
30
|
+
|
|
31
|
+
Installing via **[npm](https://www.npmjs.com/)** requires installing the **[official Github CLI](https://cli.github.com/)** and **[git revise](https://github.com/mystor/git-revise)** dependencies separarely
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
brew install gh
|
|
35
|
+
brew install git-revise
|
|
36
|
+
|
|
37
|
+
npm i -g git-stack-cli
|
|
38
|
+
```
|
|
39
|
+
|
|
28
40
|
## Usage
|
|
29
41
|
|
|
30
42
|
```bash
|
|
31
|
-
git stack
|
|
43
|
+
git stack # group and sync commits in branch to Github
|
|
32
44
|
|
|
45
|
+
git stack --check # print status only, skipping rebase and sync to Github
|
|
33
46
|
git stack --verbose # print more detailed logs for debugging internals
|
|
34
47
|
git stack --no-verify # skip git hooks such as pre-commit and pre-push
|
|
35
48
|
|
|
36
|
-
git
|
|
49
|
+
git stack help # print a table of all CLI arguments
|
|
37
50
|
```
|
|
38
51
|
|
|
39
52
|
## Why?
|
|
@@ -58,7 +71,7 @@ Managing even a few stacked diffs requires a relatively strong knowledge of `git
|
|
|
58
71
|
- `ghstack` requires rebasing and squashing since each commit creates a pull request, which means you lose commit history
|
|
59
72
|
- `git stack` allows developing in a single local branch and selecting groups of commits for each pull request
|
|
60
73
|
- `git stack` adds a clear comment to each pull request in the stack showing the entire stack
|
|
61
|
-
- `git stack` does not break if you land pull requests through Github directly, `ghstack` requires landing from the
|
|
74
|
+
- `git stack` does not break if you land pull requests through Github directly, `ghstack` requires landing from the CLI interface
|
|
62
75
|
- `git stack` uses the [official GitHub CLI](https://cli.github.com/) (`gh`) instead of personal access tokens
|
|
63
76
|
|
|
64
77
|
## Development
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -26920,12 +26920,10 @@ function CheckGithubCli(props) {
|
|
|
26920
26920
|
actions.output(reactExports.createElement(Text, { color: colors.yellow },
|
|
26921
26921
|
reactExports.createElement(Command, null, "gh"),
|
|
26922
26922
|
" must be installed."));
|
|
26923
|
-
actions.output(reactExports.createElement(Text, { color: colors.yellow },
|
|
26924
|
-
|
|
26925
|
-
|
|
26926
|
-
|
|
26927
|
-
reactExports.createElement(Parens, null,
|
|
26928
|
-
reactExports.createElement(Command, null, "gh"))));
|
|
26923
|
+
actions.output(reactExports.createElement(FormatText, { wrapper: reactExports.createElement(Text, { color: colors.yellow }), message: "Visit {url} to install the official Github CLI {command}", values: {
|
|
26924
|
+
url: reactExports.createElement(Url, null, "https://cli.github.com"),
|
|
26925
|
+
command: reactExports.createElement(Command, null, "gh"),
|
|
26926
|
+
} }));
|
|
26929
26927
|
actions.exit(3);
|
|
26930
26928
|
} }, props.children));
|
|
26931
26929
|
}
|
|
@@ -26950,10 +26948,10 @@ function CheckGithubCliAuth(props) {
|
|
|
26950
26948
|
if (actions.isDebug()) {
|
|
26951
26949
|
actions.error("gh auth status could not find username");
|
|
26952
26950
|
}
|
|
26953
|
-
actions.output(reactExports.createElement(Text, { color: colors.yellow },
|
|
26954
|
-
|
|
26955
|
-
|
|
26956
|
-
|
|
26951
|
+
actions.output(reactExports.createElement(FormatText, { wrapper: reactExports.createElement(Text, { color: colors.yellow }), message: "{gh} requires login, please run {command}", values: {
|
|
26952
|
+
gh: reactExports.createElement(Command, null, "gh"),
|
|
26953
|
+
command: reactExports.createElement(Command, null, "gh auth login"),
|
|
26954
|
+
} }));
|
|
26957
26955
|
actions.exit(4);
|
|
26958
26956
|
} }, props.children));
|
|
26959
26957
|
}
|
|
@@ -26967,20 +26965,20 @@ function CheckGitRevise(props) {
|
|
|
26967
26965
|
return (reactExports.createElement(Await, { fallback: reactExports.createElement(Text, { color: colors.yellow },
|
|
26968
26966
|
reactExports.createElement(Text, null,
|
|
26969
26967
|
"Checking ",
|
|
26970
|
-
reactExports.createElement(Command, null, "git
|
|
26968
|
+
reactExports.createElement(Command, null, "git revise"),
|
|
26971
26969
|
" install...")), function: async () => {
|
|
26972
26970
|
if (is_command_available("git-revise")) {
|
|
26973
26971
|
return;
|
|
26974
26972
|
}
|
|
26975
26973
|
actions.output(reactExports.createElement(Text, { color: colors.yellow },
|
|
26976
|
-
reactExports.createElement(Command, null, "git
|
|
26974
|
+
reactExports.createElement(Command, null, "git revise"),
|
|
26977
26975
|
" must be installed."));
|
|
26978
|
-
actions.output(reactExports.createElement(Text, { color: colors.yellow },
|
|
26979
|
-
|
|
26980
|
-
|
|
26981
|
-
|
|
26982
|
-
|
|
26983
|
-
|
|
26976
|
+
actions.output(reactExports.createElement(FormatText, { wrapper: reactExports.createElement(Text, { color: colors.yellow }), message: "Visit {url} to install the {git_revise} CLI for faster, in-memory rebasing {command}", values: {
|
|
26977
|
+
url: reactExports.createElement(Url, null, "https://github.com/mystor/git-revise#install"),
|
|
26978
|
+
git_revise: reactExports.createElement(Command, null, "git revise"),
|
|
26979
|
+
command: (reactExports.createElement(Parens, null,
|
|
26980
|
+
reactExports.createElement(Command, null, "git revise"))),
|
|
26981
|
+
} }));
|
|
26984
26982
|
actions.exit(10);
|
|
26985
26983
|
} }, props.children));
|
|
26986
26984
|
}
|
|
@@ -34336,7 +34334,7 @@ async function command() {
|
|
|
34336
34334
|
.wrap(123)
|
|
34337
34335
|
// disallow unknown options
|
|
34338
34336
|
.strict()
|
|
34339
|
-
.version("1.2.
|
|
34337
|
+
.version("1.2.5" )
|
|
34340
34338
|
.showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
|
|
34341
34339
|
.help("help", "Show usage via `git stack help`").argv);
|
|
34342
34340
|
}
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import * as Ink from "ink-cjs";
|
|
|
4
4
|
|
|
5
5
|
import { Await } from "~/app/Await";
|
|
6
6
|
import { Command } from "~/app/Command";
|
|
7
|
+
import { FormatText } from "~/app/FormatText";
|
|
7
8
|
import { Parens } from "~/app/Parens";
|
|
8
9
|
import { Store } from "~/app/Store";
|
|
9
10
|
import { Url } from "~/app/Url";
|
|
@@ -89,15 +90,15 @@ function CheckGithubCli(props: Props) {
|
|
|
89
90
|
);
|
|
90
91
|
|
|
91
92
|
actions.output(
|
|
92
|
-
<
|
|
93
|
-
<Ink.Text
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<Command>gh</Command
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
<FormatText
|
|
94
|
+
wrapper={<Ink.Text color={colors.yellow} />}
|
|
95
|
+
message="Visit {url} to install the official Github CLI {command}"
|
|
96
|
+
values={{
|
|
97
|
+
url: <Url>https://cli.github.com</Url>,
|
|
98
|
+
|
|
99
|
+
command: <Command>gh</Command>,
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
101
102
|
);
|
|
102
103
|
|
|
103
104
|
actions.exit(3);
|
|
@@ -141,11 +142,15 @@ function CheckGithubCliAuth(props: Props) {
|
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
actions.output(
|
|
144
|
-
<
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
<FormatText
|
|
146
|
+
wrapper={<Ink.Text color={colors.yellow} />}
|
|
147
|
+
message="{gh} requires login, please run {command}"
|
|
148
|
+
values={{
|
|
149
|
+
gh: <Command>gh</Command>,
|
|
150
|
+
|
|
151
|
+
command: <Command>gh auth login</Command>,
|
|
152
|
+
}}
|
|
153
|
+
/>
|
|
149
154
|
);
|
|
150
155
|
|
|
151
156
|
actions.exit(4);
|
|
@@ -170,7 +175,7 @@ function CheckGitRevise(props: Props) {
|
|
|
170
175
|
fallback={
|
|
171
176
|
<Ink.Text color={colors.yellow}>
|
|
172
177
|
<Ink.Text>
|
|
173
|
-
Checking <Command>git
|
|
178
|
+
Checking <Command>git revise</Command> install...
|
|
174
179
|
</Ink.Text>
|
|
175
180
|
</Ink.Text>
|
|
176
181
|
}
|
|
@@ -181,20 +186,26 @@ function CheckGitRevise(props: Props) {
|
|
|
181
186
|
|
|
182
187
|
actions.output(
|
|
183
188
|
<Ink.Text color={colors.yellow}>
|
|
184
|
-
<Command>git
|
|
189
|
+
<Command>git revise</Command> must be installed.
|
|
185
190
|
</Ink.Text>
|
|
186
191
|
);
|
|
187
192
|
|
|
188
193
|
actions.output(
|
|
189
|
-
<
|
|
190
|
-
<Ink.Text
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
<Command>git
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
<FormatText
|
|
195
|
+
wrapper={<Ink.Text color={colors.yellow} />}
|
|
196
|
+
message="Visit {url} to install the {git_revise} CLI for faster, in-memory rebasing {command}"
|
|
197
|
+
values={{
|
|
198
|
+
url: <Url>https://github.com/mystor/git-revise#install</Url>,
|
|
199
|
+
|
|
200
|
+
git_revise: <Command>git revise</Command>,
|
|
201
|
+
|
|
202
|
+
command: (
|
|
203
|
+
<Parens>
|
|
204
|
+
<Command>git revise</Command>
|
|
205
|
+
</Parens>
|
|
206
|
+
),
|
|
207
|
+
}}
|
|
208
|
+
/>
|
|
198
209
|
);
|
|
199
210
|
|
|
200
211
|
actions.exit(10);
|