akuity / kargo

Application lifecycle orchestration
https://kargo.akuity.io/
Apache License 2.0
1.39k stars 114 forks source link

bug: includePaths breaks discovery if it reaches the root commit #2140

Closed krancour closed 3 weeks ago

krancour commented 3 weeks ago
error discovering artifacts: error discovering commits: error listing commits from git repo "https://github.com/krancour/kargo-demo-gitops-2.git": error getting diff paths for commit "5e48a597589d86abb2e46db8753468209ef33528" in git repo "https://github.com/krancour/kargo-demo-gitops-2.git": error getting diffs for commit "5e48a597589d86abb2e46db8753468209ef33528": error executing cmd [/usr/bin/git diff --name-only 5e48a597589d86abb2e46db8753468209ef33528^ 5e48a597589d86abb2e46db8753468209ef33528]: fatal: ambiguous argument '5e48a597589d86abb2e46db8753468209ef33528^': unknown revision or path not in the working tree.

This occurs because 5e48a597589d86abb2e46db8753468209ef33528 is the root commit, which makes 5e48a597589d86abb2e46db8753468209ef33528^ invalid.

hiddeco commented 3 weeks ago

Think we could potentially solve this by resorting to using git show --pretty="" --name-only <commit ID>.