checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Add reset and clean for submodules

Open XavierChapron opened this issue 3 years ago • 11 comments

Related to https://github.com/actions/checkout/issues/358

XavierChapron avatar Oct 29 '21 09:10 XavierChapron

@ericsciple Please have a look.

XavierChapron avatar Oct 29 '21 09:10 XavierChapron

Any news on this issue? Would be nice to get fixed 🍻

jeppefrandsen avatar Feb 21 '22 15:02 jeppefrandsen

I might pick up this PR and finish it. This is causing disruptions for my company.

AceCoderLaura avatar Feb 22 '22 04:02 AceCoderLaura

This PR appears to break two tests, I will attempt to remedy this.

AceCoderLaura avatar Feb 22 '22 05:02 AceCoderLaura

I think I've addressed the review items as well as passed the tests. Please fast forward this branch to https://github.com/AceCoderLaura/checkout/tree/finishing-628 if my changes are satisfactory.

AceCoderLaura avatar Feb 22 '22 05:02 AceCoderLaura

I think I've addressed the review items as well as passed the tests. Please fast forward this branch to https://github.com/AceCoderLaura/checkout/tree/finishing-628 if my changes are satisfactory.

Hello, thank you! You have many whitespace change in your commit https://github.com/AceCoderLaura/checkout/commit/8328374403a422ebe7803250ea3ced9d8f07803d Can you change this? Or if the change are legetimate, maybe create a specific commit?

Then I will be pleased to cherry-pick your commits. And I hope someone will review and merge this anytime soon!

XavierChapron avatar Feb 22 '22 19:02 XavierChapron

Ah yes, my git configuration wasn't setup to convert line endings back to UNIX-style. I'll fix it some time today if I get some time.

AceCoderLaura avatar Feb 23 '22 22:02 AceCoderLaura

I've pushed a version with only the changes to the TypeScript source files here: https://github.com/AceCoderLaura/checkout/tree/finishing-628-no-compile I will have to ask you to build the project yourself because I've run out of time to fix the line endings issue. Hope this helps!

AceCoderLaura avatar Feb 24 '22 02:02 AceCoderLaura

I got some more time to work on this today and successfully transpiled the change to index.js without any disruptions to the line endings.

AceCoderLaura avatar Feb 25 '22 05:02 AceCoderLaura

I got some more time to work on this today and successfully transpiled the change to index.js without any disruptions to the line endings.

Thanks a lot, I've included your commit in this PR.

XavierChapron avatar Feb 25 '22 09:02 XavierChapron

Hitting the same issue. Will this ever be merged?

pefribeiro avatar Jun 21 '22 18:06 pefribeiro

We're still using this fork but it's getting stale and it now has conflicts with the main branch. I haven't tried the latest version, does anyone know if this is still an issue in the main branch? If it is, I'll make some time to update the forked version.

AceCoderLaura avatar Mar 15 '23 00:03 AceCoderLaura

I ran into this issue recently. For me, a file in a submodule got modified by a previous run and then was present in the next run, causing issues.

It would be nice if this got merged so I can have reliable CI without adding hacks.

This was my workaround by the way:

      - uses: actions/checkout@v3
        with:
          submodules: true
      - name: Submodule cleanup fix  # Bodge for https://github.com/actions/checkout/issues/358
        run: |
          git submodule foreach --recursive git clean -ffdx
          git submodule foreach --recursive git reset --hard

OscarVanL avatar Aug 10 '23 13:08 OscarVanL