git-stack-cli 1.3.5 → 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.
@@ -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}" --keep-redundant-commits`);
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
@@ -34322,7 +34320,7 @@ async function command() {
34322
34320
  .wrap(123)
34323
34321
  // disallow unknown options
34324
34322
  .strict()
34325
- .version("1.3.5" )
34323
+ .version("1.3.6" )
34326
34324
  .showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
34327
34325
  .help("help", "Show usage via `git stack help`").argv);
34328
34326
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-stack-cli",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "author": "magus",
6
6
  "license": "MIT",
@@ -102,18 +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(
115
- `git cherry-pick "${first_commit.sha}^..${last_commit.sha}" --keep-redundant-commits`
116
- );
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}`);
117
112
  }
118
113
 
119
114
  // after all commits have been cherry-picked and amended