diff --git a/CHANGELOG.md b/CHANGELOG.md index 217d3b0..caf3295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Unreleased +# v1.9.3 + +- Fix: use main branch in `git-merged` (instead of hardcoding `master`) + +# v1.9.2 + +- `git-shatter-by-file` will still work when there are "skipped" files +- Various internal shell script improvements + # v1.9.1 - `git-main-branch` will now also recognize `mainline` as a main branch name, diff --git a/git-merged b/git-merged index ed42154..dd27b19 100755 --- a/git-merged +++ b/git-merged @@ -4,7 +4,7 @@ set -eu usage () { echo "usage: git merged [-uh] []" >&2 echo >&2 - echo "Shows what local branches have been merged into branch (defaults to master)." >&2 + echo "Shows what local branches have been merged into branch (defaults to main branch)." >&2 echo >&2 echo "Options:" >&2 echo "-u Show unmerged branches instead of merged branches" >&2 @@ -26,5 +26,11 @@ else opts="--merged" fi -base="${1-master}" +if [ $# -gt 0 ]; then + base="$1" + shift 1 +else + base="$(git main-branch)" +fi + git branch $opts "$base" | cut -c3- | grep -vxF "$base" diff --git a/git-spinoff b/git-spinoff index 1d289ed..004edc4 100755 --- a/git-spinoff +++ b/git-spinoff @@ -16,7 +16,7 @@ usage () { echo "previously current branch is not touched." >&2 echo >&2 echo "This is useful to create a feature branch after work has already" >&2 - echo "began on the old branch (likely but not necessarily \"master\")." >&2 + echo "began on the old branch (likely but not necessarily \"main\")." >&2 echo >&2 echo "Options:" >&2 echo "-h Show this help" >&2