Re: [PATCH V2] check-ignore: Add option to ignore index contents
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Sep 2, 2013, 22:15 UTC
- Message-ID
- <CAPig+cRPmFViknOkq3OnK3wjTtdd+7ywrCJUHd_85=4xyzHH_g@mail.gmail.com>
- In-Reply-To
- <20130902212054.GA7012@opensourcesolutions.co.uk>
On Mon, Sep 2, 2013 at 5:20 PM, Dave Williams <dave@opensourcesolutions.co.uk> wrote:
Show 11 quoted lines
> I have updated the original version of this patch to encompass the > feedback comments obtained. Updates include: > 1) Rename option to --no-index for consistency with other commands > 2) Improved Documentation text > 3) Extension to test scripts to include this option > > Regarding test scripts I have scoped coverage to ensure correct > behaviour with the new option in all standard cases but without > duplicating every single corner case. > > The original patch is at $gmane/233381.
This commentary, which is not intended as part of the commit message, normally goes below the '---' line after your sign-off just before the diffstat. When the project maintainer applies a patch with git-am, such commentary is stripped out automatically, otherwise he has to strip it manually. (Alternately, you could use a -->8-- line to separate the above commentary from the commit message.)
One more minor issue below...
Show 26 quoted lines
> check-ignore currently shows how .gitignore rules would treat untracked
> paths. Tracked paths do not generate useful output. This prevents
> debugging of why a path became tracked unexpectedly unless that path is
> first removed from the index with `git rm --cached <path>`.
>
> This option (-i, --no-index) simply by-passes the check for the path
> being in the index and hence allows tracked paths to be checked too.
>
> Whilst this behaviour deviates from the characteristics of `git add` and
> `git status` its use case is unlikely to cause any user confusion.
>
> Test scripts are augmented to check this option against the standard
> ignores to ensure correct behaviour.
>
> Signed-off-by: Dave Williams <dave@opensourcesolutions.co.uk>
> ---
> diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
> index c29342d..0ad0534 100755
> --- a/t/t0008-ignores.sh
> +++ b/t/t0008-ignores.sh
> @@ -87,6 +87,9 @@ test_check_ignore () {
> # check-ignore --verbose output is the same as normal output except
> # for the extra first column.
> #
> +# A parameter is used to determine if the tests are run with the
> +# normal case (using the index), or with the -i or --no_index option.s/--no_index/--no-index/
> +# > # Arguments: > # - (optional) prereqs for this test, e.g. 'SYMLINKS' > # - test name