Skip to content

What is the current re-patching workflow? #1468

Closed

Description

@dagood

Now that we use Darc to clone component repos rather than submodules, I expect https://github.com/dotnet/source-build/blob/release/3.1/extract-patches.sh no longer works. Do we have an updated typical workflow?

When I solved a bug in 3.0, I used git am to reapply patches to an external clone I made, then manually ran git format-patch to recreate patch files, then copied them over into source-build.

@crummel @adaggarwal @dseefeld

Activity

  1. dseefeld commented on Feb 4, 2020

    @dseefeld
    Contributor

    I use extract-patches.sh. When making changes in repos, I work in the "non-commit-id labelled" directory of the repo in bin/src and checkout the target commit. Then I run git am to reapply patches, make my changes and commit and then use extract-patches.sh to recreate patch files.

  2. dagood commented on Feb 4, 2020

    @dagood
    MemberAuthor

    Interesting... I wouldn't expect this to work anymore--I would expect it to give you the source-build commit, which is not in the same tree as the repo commit, causing some sort of failure or unexpected behavior:

    getIndexedSubmoduleSha() {
    (
    cd ".."
    git ls-tree HEAD "$REPO_NAME" | awk '{print $3}'
    )
    }

    (Edit: On second glance, not sure if that would even give you the source-build commit.)

  3. dseefeld commented on Feb 4, 2020

    @dseefeld
    Contributor

    I see. I don't ever use that path because I always pass in the base SHA instead of allowing it to try to figure it out.

  4. adaggarwal commented on Feb 4, 2020

    @adaggarwal
    Member

    I usually go with the manual approach git am -> format-patch

  5. dagood commented on Feb 4, 2020

    @dagood
    MemberAuthor

    Thanks, filed #1469 to track improving the script.

  6. dagood commented on Jul 22, 2020

    @dagood
    MemberAuthor

    Reopening to track documenting the expected way to do this. In particular, for servicing scenarios, where we shouldn't spend time figuring out a personal process.

  7. reopened this on Jul 22, 2020
  8. added
    area-infra
    on Jul 30, 2020
  9. MichaelSimons commented on Oct 18, 2022

    @MichaelSimons
    Member

    [Triage] We don't want patches and don't want to do work that encourages them 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infra

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions