contribute-now 0.3.0-dev.6bb647c → 0.3.0-dev.dbe86c3

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -205,13 +205,6 @@ async function branchExists(branch) {
205
205
  const { exitCode } = await run(["rev-parse", "--verify", branch]);
206
206
  return exitCode === 0;
207
207
  }
208
- async function countCommitsAhead(branch, upstream) {
209
- const { exitCode, stdout } = await run(["rev-list", "--count", `${upstream}..${branch}`]);
210
- if (exitCode !== 0)
211
- return 0;
212
- const count = Number.parseInt(stdout.trim(), 10);
213
- return Number.isNaN(count) ? 0 : count;
214
- }
215
208
  async function fetchRemote(remote) {
216
209
  return run(["fetch", remote]);
217
210
  }
@@ -2001,7 +1994,7 @@ import pc7 from "picocolors";
2001
1994
  // package.json
2002
1995
  var package_default = {
2003
1996
  name: "contribute-now",
2004
- version: "0.3.0-dev.6bb647c",
1997
+ version: "0.3.0-dev.dbe86c3",
2005
1998
  description: "Git workflow CLI for squash-merge two-branch models. Keeps dev in sync with main after squash merges.",
2006
1999
  type: "module",
2007
2000
  bin: {
@@ -2904,19 +2897,6 @@ var start_default = defineCommand8({
2904
2897
  if (!await refExists(syncSource.ref)) {
2905
2898
  warn(`Remote ref ${pc11.bold(syncSource.ref)} not found. Creating branch from local ${pc11.bold(baseBranch)}.`);
2906
2899
  }
2907
- const currentBranch = await getCurrentBranch();
2908
- if (currentBranch === baseBranch && await refExists(syncSource.ref)) {
2909
- const ahead = await countCommitsAhead(baseBranch, syncSource.ref);
2910
- if (ahead > 0) {
2911
- warn(`You are on ${pc11.bold(baseBranch)} with ${pc11.bold(String(ahead))} local commit${ahead > 1 ? "s" : ""} not in ${pc11.bold(syncSource.ref)}.`);
2912
- info(" Syncing will discard those commits. Consider backing them up first (e.g. create a branch).");
2913
- const proceed = await confirmPrompt("Discard local commits and sync to remote?");
2914
- if (!proceed) {
2915
- info("Aborted. Your local commits are untouched.");
2916
- process.exit(0);
2917
- }
2918
- }
2919
- }
2920
2900
  const updateResult = await updateLocalBranch(baseBranch, syncSource.ref);
2921
2901
  if (updateResult.exitCode !== 0) {
2922
2902
  if (await refExists(syncSource.ref)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contribute-now",
3
- "version": "0.3.0-dev.6bb647c",
3
+ "version": "0.3.0-dev.dbe86c3",
4
4
  "description": "Git workflow CLI for squash-merge two-branch models. Keeps dev in sync with main after squash merges.",
5
5
  "type": "module",
6
6
  "bin": {