Subject: [PATCH v5 0/3] interactive git clean

From: Jiang Xin <[email-masked]>
Date: Fri, 3 May 2013 11:49:52 +0800

The interactive git clean combines `git clean -n` and `git clean -f`
together to do safe cleaning, and has more features.

First it displays what would be removed in columns (so that you can
see them all in one screen). The user must confirm before actually
cleaning.

    WARNING: The following items will be removed permanently. Press "y"
    WARNING: to start cleaning, and press "n" to abort the cleaning.
    WARNING: You can also enter the "edit" mode, and select items
    WARNING: to be excluded from the cleaning.

      What would be removed...    What would be removed...
      What would be removed...    What would be removed...
    
    Remove (yes/no/Edit) ? 

In this confirmation dialog, the user has three choices:

 * Yes: Start to do cleaning.
 * No:  Nothing will be deleted.
 * Edit (default for the first time): Enter the edit mode.

When the user chooses the edit mode, it would look like this:

    NOTE: Will remove the following items. You can input space-seperated
    NOTE: patterns (just like .gitignore) to exclude items from deletion,
    NOTE: or press ENTER to continue.
    
      What would be removed...    What would be removed...
      What would be removed...    What would be removed...
    
    Input ignore patterns> 

The user can input space-separated patterns (the same syntax as gitignore),
and each clean candidate that matches with one of the patterns will be
excluded from cleaning.

When the user feels it's OK, presses ENTER and back to the confirmation dialog.

    WARNING: The following items will be removed permanently. Press "y"
    WARNING: to start cleaning, and press "n" to abort the cleaning.
    WARNING: You can also enter the "edit" mode, and select items
    WARNING: to be excluded from the cleaning.

      What would be removed...
    
    Remove (Yes/no/edit) ? 

This time the default choice of the confirmation dialog is "YES".
So when user press ENTER, start cleaning.

Jiang Xin (3):
  Add support for -i/--interactive to git-clean
  Show items of interactive git-clean in columns
  Add colors to interactive git-clean

 Documentation/git-clean.txt |  15 ++-
 builtin/clean.c             | 295 +++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 291 insertions(+), 19 deletions(-)

-- 
1.8.3.rc0.364.gc6aefbf