fix: multiple safety check and sync improvements
- bd-dtm: Changed stderr printing to use SafetyWarnings in worktree.go - bd-ciu: Fixed non-deterministic output order in formatVanishedIssues - bd-dmd: Removed duplicate safety check message in sync.go - bd-k2n: PushSyncBranch now recreates worktree if cleaned up - bd-c5m: Fixed string(rune()) in tests to use strconv.Itoa - bd-8uk: Added test for SafetyWarnings population - bd-1kf: Fixed mergePriority to handle negative priorities - bd-xo9: Documented sync.require_confirmation_on_mass_delete config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -427,7 +427,7 @@ func mergeNotes(base, left, right string) string {
|
||||
|
||||
// mergePriority handles priority merging - on conflict, higher priority wins (lower number)
|
||||
// Special case: 0 is treated as "unset/no priority" due to Go's zero value.
|
||||
// Any explicitly set priority (>0) wins over 0. (bd-d0t fix)
|
||||
// Any explicitly set priority (!=0) wins over 0. (bd-d0t fix, bd-1kf fix)
|
||||
func mergePriority(base, left, right int) int {
|
||||
// Standard 3-way merge for non-conflict cases
|
||||
if base == left && base != right {
|
||||
@@ -442,10 +442,11 @@ func mergePriority(base, left, right int) int {
|
||||
// True conflict: both sides changed to different values
|
||||
|
||||
// bd-d0t fix: Treat 0 as "unset" - explicitly set priority wins over unset
|
||||
if left == 0 && right > 0 {
|
||||
// bd-1kf fix: Use != 0 instead of > 0 to handle negative priorities
|
||||
if left == 0 && right != 0 {
|
||||
return right // right has explicit priority, left is unset
|
||||
}
|
||||
if right == 0 && left > 0 {
|
||||
if right == 0 && left != 0 {
|
||||
return left // left has explicit priority, right is unset
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user