Skip to content

Unable to commit only submodule updates #148

Closed

Description

@lencioni

In my dotfiles repo, I am trying to update some git submodules, but when I do it, overcommit fails out and I am unable to commit.

~/dotfiles git:master ❯❯❯ git commit
Running pre-commit hooks

✓ All pre-commit hooks passed

Unable to restore working tree after pre-commit hooks run:
STDOUT:
STDERR:No stash found.

At the end of this, I am left with my updated submodules uncommitted and unstaged. This might be happening because overcommit is creating a stash with nothing in it (because submodules are weird), which results in no stash getting created.

I believe I used to be able to do this, so I think this might be a problem with the latest release. overcommit 0.23.0

Activity

  1. lencioni commented on Mar 25, 2015

    @lencioni
    ContributorAuthor

    As a temporary workaround, I just did this:

    overcommit --uninstall; git commit; overcommit --install
  2. jawshooah commented on Mar 25, 2015

    @jawshooah
    Contributor

    Worse still, it ignores the fact that no stash was created and applies the most recent stash anyway!

    We should only git reset --hard and git stash pop if a stash was successfully created.

  3. sds commented on Mar 26, 2015

    @sds
    Owner

    Fixed by #149. Thanks!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions