From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#2678: 23.0.91; vc-next-action in vc-dir acts strangely when only adds are necessary Date: Fri, 20 Mar 2009 09:15:07 -0700 (PDT) Message-ID: <200903201615.n2KGF70T023133@godzilla.ics.uci.edu> References: <87d4cjcoan.fsf@catnip.gol.com> Reply-To: Dan Nicolaescu , 2678@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237566847 11468 80.91.229.12 (20 Mar 2009 16:34:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2009 16:34:07 +0000 (UTC) Cc: 2678@emacsbugs.donarmstrong.com To: Miles Bader Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 20 17:35:23 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lkhgp-0004W9-3n for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2009 17:35:23 +0100 Original-Received: from localhost ([127.0.0.1]:45324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkhfS-0004Wo-Eq for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2009 12:33:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkhVf-0007O5-Lx for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2009 12:23:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkhVa-0007L9-OM for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2009 12:23:51 -0400 Original-Received: from [199.232.76.173] (port=55998 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkhVa-0007L3-E8 for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2009 12:23:46 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44084) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LkhVZ-0002K1-Vu for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2009 12:23:46 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2KGNh7J026662; Fri, 20 Mar 2009 09:23:43 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2KGK2si025483; Fri, 20 Mar 2009 09:20:02 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Fri, 20 Mar 2009 16:20:02 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2678 X-Emacs-PR-Package: emacs,vc X-Emacs-PR-Keywords: Original-Received: via spool by 2678-submit@emacsbugs.donarmstrong.com id=B2678.123756572225300 (code B ref 2678); Fri, 20 Mar 2009 16:20:02 +0000 Original-Received: (at 2678) by emacsbugs.donarmstrong.com; 20 Mar 2009 16:15:22 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2KGFJ1p025294 for <2678@emacsbugs.donarmstrong.com>; Fri, 20 Mar 2009 09:15:20 -0700 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id n2KGF8Gr015400; Fri, 20 Mar 2009 09:15:08 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n2KGF70T023133; Fri, 20 Mar 2009 09:15:07 -0700 (PDT) In-Reply-To: <87d4cjcoan.fsf@catnip.gol.com> (Miles Bader's message of "Sun, 15 Mar 2009 15:06:56 +0900") Original-Lines: 75 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n2KGF8Gr015400 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 20 Mar 2009 12:23:50 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26506 Archived-At: Miles Bader writes: > [Note: I have Dan's patch for fixing whole-directory vc-dir commit in > Git applied, though I don't think it should affect the following, as it > relates to final commit.] > > If I have a vc-dir buffer showing a tree where the only entries are new > files (not yet registered with source-control): > > VC backend : Git > Working dir: /tmp/zonk/ > Branch : master > > ./ > unregistered llll > unregistered oiuoiu > > Then hitting "v" on the first line of the buffer acts strangely -- I'd > expect it to simply register all these files with source control, but in > fact, it simply appears to do nothing. > > There are actually several behaviors (though it always does nothing in > the end). If this is the first time I've tried to do this, it just > displays a message like "Registering (/tmp/zonk/)... done" [where > "/tmp/zonk2" is the root of the working directory in question] but > doesn't seem to really do it. > > If I then try the "v" command again, it will first show the message: > > Previous master file has vanished. Make a new one? (y or n) > > If I enter "n" it just gives an error and aborts. > > If I type "y", then it will either display a "Registering > (/tmp/zonk/)... done" message like the initial time (and again have no > real result), or show a *vc-log* buffer to prompt for an "initial > comment"; in the latter case, when I then hit C-c C-c to continue, the > *vc-log* buffer goes away -- but nothing further appears to happen. > [I'm not sure what causes it to open a *vc-log* buffer or not ... in my > initial tests it did, but when I tried again with emacs -Q, it didn't.] > > Anyway, the end result is always the same, no registered files. > > > To reproduce: > > (1) Execute the following shell script to create a test repo in > "/tmp/zonk2": > > #!/bin/sh > cd /tmp > rm -rf zonk2 > mkdir zonk2 > cd zonk2 > git init > echo plugh > ppling > git add . > git commit -m'Init' -a > echo Fnord >> newf1 > echo Chnevy >> newf2 Given that you are familiar with git, the function to fix to get this working is the one liner `vc-git-register': (defun vc-git-register (files &optional rev comment) "Register FILE into the git version-control system." (vc-git-command nil 0 files "update-index" "--add" "--")) just add the correct command(s) to run to vc-git-command, and it should work. In case above vc-git-register is called like this: (vc-git-register "/tmp/zonk2/")