Skip to content

Remove breaks when used with pull #492

Description

@krokofant

Consider this:

- uses: EndBug/add-and-commit@v9
  with:
    add: '["file-that-changed.txt"]'
    remove: '["file-that-was-removed.txt"]'
    author_name: GitHub-Automated
    author_email: foo@example.com
    default_author: github_actor
    message: "Changing files"
    pathspec_error_handling: exitImmediately
    pull: "--rebase --autostash"
    push: false

First the file is removed here

Then if pull is used, the file is also removed here which breaks the action, since the file is already marked as removed.

::error::Error: fatal: pathspec 'file-that-was-removed.txt' did not match any files
::error::Error: Remove command did not match any file:%0A git rm file-that-was-removed.txt

If one wants to rebase it does not make sense that the commit is done after the pull. The commit should be done, then a pull rebase should happen, that would not break the flow.
I guess it's hard to account for these different approaches.

Activity

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

    status: pinnedShould not be labeled as stale

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions