Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project.py: fix west diff --manifest to use manifest-rev #748

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Oct 8, 2024

Fixes new west diff --manifest option added by commit 0d5ee4e ("app: project: Allow to diff against manifest revision")

Do not pass project.revision to git diff because project.revision is unresolved user input and does not always resolve to a commit. For instance, project.revision can be the name of a remote branch like v3.7-branch that does not exist locally; then git diff fails. Or even worse: there could be a local branch of the same name which points to a totally different commit.

This bug was found when discussing issue #747, see 7th comment there for a longer description of what manifest-rev is and how it works.

Fixes new `west diff --manifest` option added by commit
0d5ee4e ("app: project: Allow to diff against manifest revision")

Do not pass `project.revision` to `git diff` because `project.revision`
is unresolved user input and does not always resolve to a commit. For
instance, `project.revision` can be the name of a remote branch like
`v3.7-branch` that does not exist locally; then `git diff` fails. Or
even worse: there could be a local branch of the same name which points
to a totally different commit.

This bug was found when discussing issue zephyrproject-rtos#747, see 7th comment there for
a longer description of what `manifest-rev` is and how it works.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb merged commit 0199418 into zephyrproject-rtos:main Oct 9, 2024
16 checks passed
@marc-hb marc-hb deleted the diff-manifest-rev branch October 9, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants