From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandre Julliard Newsgroups: gmane.emacs.devel Subject: Re: [patch] vc-git-dired-state-info buglet Date: Tue, 27 Nov 2007 22:55:06 +0100 Message-ID: <87ir3nl5fp.fsf@wine.dyndns.org> References: <87tzndw4cu.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196200562 22868 80.91.229.12 (27 Nov 2007 21:56:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2007 21:56:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thien-Thi Nguyen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 27 22:56:08 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ix8P6-0003BB-Iv for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2007 22:55:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ix8Or-0001gt-3c for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2007 16:55:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ix8On-0001gf-F4 for emacs-devel@gnu.org; Tue, 27 Nov 2007 16:55:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ix8Om-0001gF-6f for emacs-devel@gnu.org; Tue, 27 Nov 2007 16:55:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ix8Om-0001gA-2n for emacs-devel@gnu.org; Tue, 27 Nov 2007 16:55:20 -0500 Original-Received: from mail.codeweavers.com ([216.251.189.131]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ix8Ol-0006XW-KB for emacs-devel@gnu.org; Tue, 27 Nov 2007 16:55:19 -0500 Original-Received: from adsl-84-227-131-178.adslplus.ch ([84.227.131.178] helo=wine.dyndns.org) by mail.codeweavers.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Ix8Ob-0003ut-DT; Tue, 27 Nov 2007 15:55:15 -0600 Original-Received: from wine.dyndns.org (localhost [127.0.0.1]) by wine.dyndns.org (Postfix) with ESMTP id AB7861E70CA; Tue, 27 Nov 2007 22:55:06 +0100 (CET) In-Reply-To: <87tzndw4cu.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Fri, 23 Nov 2007 13:09:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-Spam-Score: -1.9 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84220 Archived-At: Thien-Thi Nguyen writes: > i think `vc-git-dired-state-info' should call `vc-git-state' > instead of `vc-state'. here is a recipe: create dir `test', > put it under git version control system, add and commit some > files, then modify a subset of the files. then do: > > C-x v d test RET ; => empty because no files "locked" > v t ; => toggle terse mode > > before the patch, no files are shown w/ "(modified)" status. > after the patch, some are shown, as i expected. > > i wonder if my expectation is incorrect. comments? That's not the real problem, the other backends also use vc-state here and it works fine. The real problem is that vc-git-dir-state is broken. Something like this should help: Index: lisp/vc-git.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v retrieving revision 1.29 diff -u -p -r1.29 vc-git.el --- lisp/vc-git.el 25 Nov 2007 00:41:49 -0000 1.29 +++ lisp/vc-git.el 27 Nov 2007 21:54:06 -0000 @@ -152,7 +152,7 @@ (defun vc-git-dir-state (dir) (with-temp-buffer - (vc-git-command (current-buffer) nil nil "ls-files" "-t") + (vc-git-command (current-buffer) nil nil "ls-files" "-t" "-c" "-m" "-o") (goto-char (point-min)) (let ((status-char nil) (file nil)) -- Alexandre Julliard julliard@winehq.org