Ignore Git unstaged changes and untracked files

Create issue
Issue #3 new
khumba created an issue

When used with Git repositories, repo-commit acts in ways counter-intuitive to users expecting regular "git commit" behaviour:

  • It stages all unstaged changes before committing, as though committing with -a.

  • It aborts if there are untracked files in the tree and forces you to move them out of the repo before continuing.

Both of these mean it's extra work to do partial commits, and things like egencache also cause problems in overlays because of untracked metadata files. I these behaviours weird, but assuming they are deliberate, it would be nice to have a command line flag to disable them, perhaps something like --only-git-staged. Not sure if this would be appropriate for other VCSes as well... Mercurial?

What do you think? Would you consider a pull request for this feature?

Comments (2)

  1. Michał Górny

    It's never this simple. This would require proper support from repoman (from Portage) in the first place. Possibly echangelog too but these days repoman replaces it.

  2. khumba reporter

    That's fair, but wouldn't it work to git stash save -k -u away everything, run checks and commit, then restore? Afaik this is a common pre-commit strategy.

  3. Log in to comment