git-stack-cli 1.3.4 → 1.3.6

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 CHANGED
@@ -100,11 +100,8 @@ npm run build:standalone
100
100
 
101
101
  > [!IMPORTANT]
102
102
  >
103
- > **You must update the `version` in `package.json` before running `npm run release`**
104
- >
105
- > ```bash
106
- > npm version patch
107
- > ```
103
+ > **You must update the `version` in `package.json` before running `npm run release`.
104
+ > DO NOT use `npm version` or commit the change, the release scripts handle git tags etc.**
108
105
 
109
106
  ```bash
110
107
  npm run release
@@ -27589,13 +27589,11 @@ async function run$3() {
27589
27589
  picked_commit_list.push(commit);
27590
27590
  }
27591
27591
  if (picked_commit_list.length > 0) {
27592
- const first_commit = picked_commit_list.at(0);
27593
- const last_commit = picked_commit_list.at(-1);
27594
- invariant(first_commit, "first_commit must exist");
27595
- invariant(last_commit, "last_commit must exist");
27596
27592
  // ensure clean base to avoid conflicts when applying patch
27597
27593
  await cli(`git clean -fd`);
27598
- await cli(`git cherry-pick "${first_commit.sha}^..${last_commit.sha}"`);
27594
+ // create list of sha for cherry-pick
27595
+ const sha_list = picked_commit_list.map((commit) => commit.sha).join(" ");
27596
+ await cli(`git cherry-pick --keep-redundant-commits ${sha_list}`);
27599
27597
  }
27600
27598
  // after all commits have been cherry-picked and amended
27601
27599
  // move the branch pointer to the newly created temporary branch
@@ -28673,7 +28671,10 @@ function SelectCommitRangesInternal(props) {
28673
28671
  const commit_metadata_id = commit_map.get(commit.sha);
28674
28672
  const selected = commit_metadata_id !== null;
28675
28673
  let disabled;
28676
- if (group.id === props.commit_range.UNASSIGNED) {
28674
+ if (group_input) {
28675
+ disabled = true;
28676
+ }
28677
+ else if (group.id === props.commit_range.UNASSIGNED) {
28677
28678
  disabled = true;
28678
28679
  }
28679
28680
  else {
@@ -34319,7 +34320,7 @@ async function command() {
34319
34320
  .wrap(123)
34320
34321
  // disallow unknown options
34321
34322
  .strict()
34322
- .version("1.3.4" )
34323
+ .version("1.3.6" )
34323
34324
  .showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
34324
34325
  .help("help", "Show usage via `git stack help`").argv);
34325
34326
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-stack-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "author": "magus",
6
6
  "license": "MIT",
@@ -102,16 +102,13 @@ async function run() {
102
102
  }
103
103
 
104
104
  if (picked_commit_list.length > 0) {
105
- const first_commit = picked_commit_list.at(0);
106
- const last_commit = picked_commit_list.at(-1);
107
-
108
- invariant(first_commit, "first_commit must exist");
109
- invariant(last_commit, "last_commit must exist");
110
-
111
105
  // ensure clean base to avoid conflicts when applying patch
112
106
  await cli(`git clean -fd`);
113
107
 
114
- await cli(`git cherry-pick "${first_commit.sha}^..${last_commit.sha}"`);
108
+ // create list of sha for cherry-pick
109
+ const sha_list = picked_commit_list.map((commit) => commit.sha).join(" ");
110
+
111
+ await cli(`git cherry-pick --keep-redundant-commits ${sha_list}`);
115
112
  }
116
113
 
117
114
  // after all commits have been cherry-picked and amended
@@ -166,7 +166,9 @@ function SelectCommitRangesInternal(props: Props) {
166
166
 
167
167
  let disabled;
168
168
 
169
- if (group.id === props.commit_range.UNASSIGNED) {
169
+ if (group_input) {
170
+ disabled = true;
171
+ } else if (group.id === props.commit_range.UNASSIGNED) {
170
172
  disabled = true;
171
173
  } else {
172
174
  disabled = Boolean(selected && commit_metadata_id !== group.id);