From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: vc-git: workaround for "file unregistered" problem Date: Thu, 12 Nov 2009 08:44:53 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258033727 4082 80.91.229.12 (12 Nov 2009 13:48:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2009 13:48:47 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 12 14:48:40 2009 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 1N8a2R-0002tV-Si for ged-emacs-devel@m.gmane.org; Thu, 12 Nov 2009 14:48:40 +0100 Original-Received: from localhost ([127.0.0.1]:51215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8a2R-00075w-22 for ged-emacs-devel@m.gmane.org; Thu, 12 Nov 2009 08:48:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8Zz0-0003jk-4E for emacs-devel@gnu.org; Thu, 12 Nov 2009 08:45:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8Zys-0003gM-AL for emacs-devel@gnu.org; Thu, 12 Nov 2009 08:45:02 -0500 Original-Received: from [199.232.76.173] (port=52556 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8Zyr-0003gB-O9 for emacs-devel@gnu.org; Thu, 12 Nov 2009 08:44:57 -0500 Original-Received: from mail-gx0-f224.google.com ([209.85.217.224]:44972) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8Zyr-0002XG-DQ for emacs-devel@gnu.org; Thu, 12 Nov 2009 08:44:57 -0500 Original-Received: by gxk24 with SMTP id 24so4654098gxk.6 for ; Thu, 12 Nov 2009 05:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=MDWJzTtE4e4mkZTom7DzHDF8tNPDQiCw9PREtdHR9Zk=; b=fm8BT/cPi8zVu/jHQDHGvxMTYe7Upny2B8h4+sochllzdQJ8UC+qwmQNGPr6UZ7MYx 5n+JJl87mjJp+mRft70bPOvwq04qbO8trqsh2inxHFbI90LV4DotDt35+d+cyjyWqt++ Cdd1Zfdi/BV7ii094kGnSznKcKFsNQS3Gzo9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=eOfQhrMWMSuLRiddiJMS/CzhsftTTorzjm9E0PI66E5Nz66EK6KlHbZEysNbYI/nvC fzj858wvjL0Na5YlMdRkfnL22OTPcc3iGOos4BBFdIxLLaBQ55oLbVBH8MgkVGKsBM3d Zhy5FPGvUrgcymtSbILe/TYkwDxY0viY0QvOU= Original-Received: by 10.101.11.23 with SMTP id o23mr1513604ani.9.1258033496638; Thu, 12 Nov 2009 05:44:56 -0800 (PST) Original-Received: from scarlett.local (pool-96-235-8-122.pitbpa.east.verizon.net [96.235.8.122]) by mx.google.com with ESMTPS id 5sm1044535ywd.8.2009.11.12.05.44.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Nov 2009 05:44:55 -0800 (PST) X-Mailer: Apple Mail (2.1077) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:116881 Archived-At: I've been having some problems with git: In some circumstances, git fails to report the status of files and = pretends they are unregistered. One symptom can be that vc-git will try = to add the file a second time. I have inquired about this on the Git = list [1], but received no response - I'm not sure if this is a bug in = git. =20 Either way, specifying full paths works around the problem, and the = patch below does that for those who encounter similar issues. [1] http://marc.info/?l=3Dgit&m=3D125787684318129&w=3D2 commit c1285a8335c943f319d1597c4332707b3291f967 Author: David Reitter Date: Tue Nov 10 13:16:30 2009 -0500 vc-git-registered: temporary workaround for a git not finding files git doesn't understand relative path specs in some situations diff --git a/lisp/vc-git.el b/lisp/vc-git.el index cee3abe..3113c19 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -147,7 +147,7 @@ If nil, use the value of `vc-diff-switches'. If t, = use no switches." (when (vc-git-root file) (with-temp-buffer (let* (process-file-side-effects - (dir (file-name-directory file)) + (dir (vc-git-root file)) (name (file-relative-name file dir)) (str (ignore-errors (when dir (cd dir))=