Re: [PATCH] rebase: make the warning more useful when the work tree is unclean.
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- Oct 3, 2007, 09:02 UTC
- Message-ID
- <vpq1wcca7w2.fsf@bauges.imag.fr>
- In-Reply-To
- <7vejgchijf.fsf_-_@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Instead of letting "update-index --refresh" report paths needing > updates and merges, use git-status to give more useful output. > > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > > * I won't be a good judge of the updated behaviour, as I never > start rebase in an unclear tree. Running git-status in a > large tree may be too expensive to be worth changing the > output.
I see your patch as an improvement too. status is a bit expansive, but you hit this portion of code only when trying "rebase" by mistake, so it's acceptable to let git take a bit of time to explain your mistake.
That said, I think it's still worth making the messages of "update-index" a little more verbose and consistant with "status" (my previous patch), since I think there are other occurences of user-visible output of update-index in porcelain git.
Ideally, update-index would be a C function returning a struct containing all the information about the status, with a function is_clean(...) and another print_as_status(...), to allow the same functionality with better performances, but I won't have time to do this.
-- Matthieu