You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/script/config_diff.py: add support for ref-commit-sha and cmp-commit-sha arguments
Introduced `ref-commit-sha` and `cmp-commit-sha` arguments to the
`diff-branch-remote-repo` mode, enabling comparison of remote
branches against specific commits.
This enhancement is crucial for comparing configuration changes
between a pull request (PR) and the Ceph upstream main branch. It
allows for precise comparison by focusing on files changed in the
PR, rather than simply comparing the PR's head with its latest
commit.
The approach mirrors GitHub's three-dot diff [1], where the PR is
compared against the common ancestor of the Ceph upstream repository
, i.e., the point where the PR was forked.
[1]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests
Signed-off-by: Naveen Naidu <[email protected]>
-`--remote-repo`: The remote repository URL for the branch to compare.
54
54
-`--ref-repo`: (Optional) The repository URL for the reference branch. Defaults to the Ceph upstream repository.
55
+
-`--ref-commit-sha`: (Optional) The commit sha for the reference branch that is used for reference
56
+
-`--cmp-commit-sha`: (Optional) The commit sha of the comparing branch
55
57
-`--skip-clone`: (Optional) Skips cloning repositories for diff. **Note**: When using this flag, the script must be run from a valid Ceph upstream repository or a forked repository that has access to the branches present in the upstream repository or already contains those branches.
56
58
-`--format`: (Optional) Specify the output format for the configuration diff. Options are `json` or `posix-diff`. Default is `json`.
0 commit comments