dolthub / dolt

Dolt – Git for Data
https://www.dolthub.com
Apache License 2.0
18k stars 516 forks source link

Bug fix: `dolt_commit_diff` support for detached head mode #8566

Closed fulghum closed 1 week ago

fulghum commented 2 weeks ago

When we added support for showing diffs for the STAGED root through dolt_commit_diff_ system tables, we didn't take into account that in detached head mode, there wouldn't be a valid staged root. This change detects if we're in detached head mode and replaces the staged root with the root of the detached head.

coffeegoddd commented 1 week ago

@fulghum DOLT

comparing_percentages
100.000000 to 100.000000
version result total
623ff4f ok 5937457
version total_tests
623ff4f 5937457
correctness_percentage
100.0