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

RFE: git-checkout cherry-picks support filtering #1422

Open
smoser opened this issue Aug 7, 2024 · 2 comments
Open

RFE: git-checkout cherry-picks support filtering #1422

smoser opened this issue Aug 7, 2024 · 2 comments

Comments

@smoser
Copy link
Contributor

smoser commented Aug 7, 2024

I've seen this need twice in the past two days.
Once with squid wolfi-dev/os#25778 and once wolfi-dev/os#25652

An upstream commit may have unrelated changes that don't apply.
In the squid case, the changes that went into the same commit as the desired chagnes were for .github/workflows.

We'd like to have some prettier way to do this.

The solution employed in both the above PRs was:

  - runs: |
      git fetch origin master:master
      # Fix failure to build from source against new libxml2, without
      # nanohttp support.
      git show <COMMIT> -- FILE1 [FILE2 ...] > partial-cherry-pick.patch
      git apply partial-cherry-pick.patch

The documentation for git pipelines shows that the structure of the cherry-picks is:

pipeline:
  - uses: git-checkout
    with:
      expected-commit: 976ea78599d71f22e9c0fefc2dc37c1d9fc835a4
      repository: https://github.com/python/cpython.git
      tag: v3.10.14
      cherry-picks: |
        3.10/c62c9e518b784fe44432a3f4fc265fb95b651906: CVE-2024-4032

Note the format of cherry-picking: [branch/]commit: comment here

That is unfortunately limiting, as we want to add some metadata (which files to ignore).

@smoser
Copy link
Contributor Author

smoser commented Aug 7, 2024

@xnox fyi

@smoser
Copy link
Contributor Author

smoser commented Aug 19, 2024

Also seen wolfi-dev/os#26609

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

No branches or pull requests

1 participant