≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #1242

Feature request #1242: git add --check

Kind feature request
Product no product
When 2009-02-27T06:35:00Z
Status open
Reporter Greg Hurrell
Tags no tags

Description

Not sure whether this is worth adding or not but I am thinking of adding a --check switch to git add because I sometimes find myself doing stuff like:

git diff --check long/path
git add long/path

And it would be kind of nice to do:

git add --check long/path

Which would stage the file, but abort if whitespace errors were present.

There are other workflows, of course:

git diff long/path # visual inspection
git add long/path

Or:

git add long/path
git staged # retrospective visual inspection using alias for "git diff --cached"

Or:

git add long/path
git staged --check

But there are definitely some cases where the git add --check workflow would be nicest. I just don't know if it's worth the effort.

Comments

    Add a comment

    Comments are now closed for this issue.

    • contact
    • legal

    Menu

    • Blog
    • Wiki
    • Issues
    • Snippets