Re: [PATCH v2] Fix stale git status



On 12 April 2010 06:26, Peter Tyser <ptyser gmail com> wrote:
> Recent commit 84524f7f2be4722f206e77e3d8fc8acb25de7fea replaced the use
> of "git status" with the lower-level "git diff-index".  However, when
> using "git diff-index" we need to explicitly update the index prior
> to running "git diff-index".  Previously, "git status" would
> automatically update the index prior to diffing.
>
> If the index is not explicitly updated, meld reports incorrect
> file status in certain scenarios.  For example, running:
>  - sed -i 's/firefox/chrome/' GNUMakefile
>  - git diff (update git's index)
>  - sed -i 's/chrome/firefox/' GNUMakefile (git's index is now out of date)
>  - bin/meld ./
>
> Meld will then show GNUMakefile as being modified even though its contents
> are actually unchanged.
>
> Calling "git update-index --refresh" prior to "git diff-index" resolves
> the previous stale status issue.

I've pushed both of these. Thanks muchly.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]