gitbasher 5.3.0 → 5.3.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to gitbasher are generated automatically by [semantic-release](https://github.com/semantic-release/semantic-release) from [Conventional Commits](https://www.conventionalcommits.org/) on `main`. The project follows [Semantic Versioning](https://semver.org/).
4
4
 
5
+ ## [5.3.1](https://github.com/maxbolgarin/gitbasher/compare/v5.3.0...v5.3.1) (2026-10-13)
6
+
7
+ ### 🐛 Bug Fixes
8
+
9
+ * **push:** avoid fatal errors when pushing a branch with no own commits ([d8ff3f8](https://github.com/maxbolgarin/gitbasher/commit/d8ff3f83340101f8d4992bcecebac443d5fa8e8e))
10
+
5
11
  ## [5.3.0](https://github.com/maxbolgarin/gitbasher/compare/v5.2.1...v5.3.0) (2026-09-30)
6
12
 
7
13
  ### 🚀 Features
package/dist/gitb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  set -o pipefail
3
- GITBASHER_VERSION="5.3.0"
3
+ GITBASHER_VERSION="5.3.1"
4
4
  if [ "$1" == "init" ] || [ "$1" == "i" ]; then
5
5
  git init
6
6
  fi
@@ -1272,17 +1272,18 @@ function get_push_list {
1272
1272
  fi
1273
1273
  fi
1274
1274
  base_commit=$(diff -u <(git rev-list --first-parent "$1" 2>/dev/null) <(git rev-list --first-parent "$2" 2>/dev/null) | sed -ne 's/^ //p' | head -1 || true)
1275
+ if [ -z "$base_commit" ]; then
1276
+ base_commit=$(git merge-base "$1" "$2" 2>/dev/null || true)
1277
+ fi
1275
1278
  if [ -n "$base_commit" ]; then
1276
1279
  push_list=$(commit_list 999 "tab" "$base_commit..HEAD")
1277
1280
  history_from="${base_commit::7}"
1281
+ elif git rev-parse --verify --quiet "$origin/$2" >/dev/null 2>&1; then
1282
+ push_list=$(commit_list 999 "tab" "$origin/$2..HEAD")
1283
+ history_from="$origin/$2"
1278
1284
  else
1279
- if [ -z "$origin" ]; then
1280
- push_list=""
1281
- history_from=""
1282
- else
1283
- push_list=$(commit_list 999 "tab" "$origin/$2..HEAD")
1284
- history_from="$origin/$2"
1285
- fi
1285
+ push_list=$(commit_list 999 "tab")
1286
+ history_from="HEAD"
1286
1287
  fi
1287
1288
  }
1288
1289
  function list_branches {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitbasher",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Simple bash utility that makes git easy to use",
5
5
  "keywords": [
6
6
  "git",