diff --git a/CHANGELOG.md b/CHANGELOG.md index afd05c0..911aae9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.26.11] - 2026-11-20 + +### Fixed +- `detect` now fails (stderr + exit 1) when the merge-base / divergence point cannot be identified, instead of silently reporting no changes. For an already-merged HEAD, `--compare-branch` resolution finds the merge commit and runs `git merge-base HEAD ^1`; when that failed (typically shallow history cutting HEAD off from the target branch), it fell back to HEAD itself, so `git diff` against HEAD was empty and `detect` printed `[]` with exit 0. Both `git merge-base` calls now return `failed to identify merge-base/divergence-point between …: `. + ## [0.26.10] - 2026-11-19 ### Changed @@ -503,6 +508,7 @@ Together these keep genuine import-time changes flagged while eliminating the la - Multi-stage Docker build - Automated vendor upgrade workflow +[0.26.11]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.26.10...v0.26.11 [0.26.10]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.26.9...v0.26.10 [0.26.9]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.26.8...v0.26.9 [0.26.8]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.26.7...v0.26.8 diff --git a/VERSION b/VERSION index 826b2a1..a3ed211 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.26.10 \ No newline at end of file +0.26.11 \ No newline at end of file diff --git a/internal/git/git.go b/internal/git/git.go index 1f486c5..21e65d2 100644 --- a/internal/git/git.go +++ b/internal/git/git.go @@ -23,7 +23,7 @@ func MergeBase(branch string) (string, error) { ref := branch base, err := Cmd("merge-base", "HEAD", ref) if err != nil { - return "", err + return "", fmt.Errorf("failed to identify merge-base/divergence-point between HEAD and %s: %w", ref, err) } head, err := Cmd("rev-parse", "HEAD") @@ -48,9 +48,12 @@ func MergeBase(branch string) (string, error) { if err != nil { return base, nil } + // No silent fallback to base here: base == HEAD, so diffing against it + // would report no changes at all. A failure here usually means shallow + // history cut HEAD off from the target branch. realBase, err := Cmd("merge-base", head, firstParent) if err != nil { - return base, nil + return "", fmt.Errorf("failed to identify merge-base/divergence-point between %s and %s: %w", head, firstParent, err) } return realBase, nil }