From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 14 16:50:07 2019 Received: (at submit) by debbugs.gnu.org; 14 Dec 2019 21:50:07 +0000 Received: from localhost ([127.0.0.1]:35834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igFIc-0004Aj-Vp for submit@debbugs.gnu.org; Sat, 14 Dec 2019 16:50:07 -0500 Received: from lists.gnu.org ([209.51.188.17]:55480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igFIb-0004Ac-Gr for submit@debbugs.gnu.org; Sat, 14 Dec 2019 16:50:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41095) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igFIa-0004IN-7r for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 16:50:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igFIY-0004qb-Vg for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 16:50:04 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:35631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igFIY-0004lz-Og for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 16:50:02 -0500 Received: by mail-lj1-x234.google.com with SMTP id j6so2623970lja.2 for ; Sat, 14 Dec 2019 13:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=AcmpG7WnX+DMvJzqJ3QAI82uP/hgvWz2z1riUmthhzk=; b=GEAJ1cUktBBvhuwBbJBGmMGlCtGM4IZbQBO0jRF/X0UMTTDWoVkmamJ1UG0bcopbiS u10W/KOJ08c38hRXO72zt2j2qi2YAfxHtSv6nivcX9xRYoycpEUnzTI1cEqroxE06jlG bxRsmheZfv2Q7sp2RX4MSQhpv0prD7sFPApTNFaDYhmG1T94BQ4ICi0iTb5sxWm4uDck fuItmaCCtS+b/rhpV2g2R+0RQmn0LJNQrZxBqFxMaeMokOVOrtWAnOae8JwrMiSZFpuf fbgchGcxD8Q9Fu6SJHo8dSJ3maNbIe1OmdfqwH4TabWFzaXxIUGFQKuM/gE0oLUgZnXp uEPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=AcmpG7WnX+DMvJzqJ3QAI82uP/hgvWz2z1riUmthhzk=; b=arPkuR2lR6I8QUj694j9m7SrYtx0WhYHEYXng0Ug9QxMtd8Xf5MJhJWuwZxym6dLrD xWw9UAQTWuJcCehRABu9YW7fd2TgO7FTTWkre6+0WyZX1eWbFCQ5rhfcJmUcKcZ39FJR QISAwfJ1bvU9I3NgMY00+nQsWoXTD/UnuFd8dt12k++GOO7avVCXPzkrPUQeKyelMFBe yAolSxexhM1yoqL2HEdzqsCmNHMYQ8venLSFhEdSyfStgoPcgP3YRt2D0kmkln8a2v+4 zbWCYMmEcLED+hEJJkPHUShiUElDjpfLzO1BHOxqHiuqwIvkJZdr1pD8WVKU7bwT+Y9p 7Zrw== X-Gm-Message-State: APjAAAW7StQjzPldw3h4UFoiYDc1OITnlFkNFKfKMIjayz0k6K6v5xaW hxgBCoZXE7rUDsocpm0VR0jZWwpa X-Google-Smtp-Source: APXvYqw0H3vqJwgxir+zOI00AUY24YihK5pckARVQIoyPrcCf1O/gwgsZrF8AZuxQA5HgFwFlbJIUw== X-Received: by 2002:a2e:2d11:: with SMTP id t17mr12526428ljt.177.1576327281720; Sat, 14 Dec 2019 04:41:21 -0800 (PST) Received: from muffinmac.local ([91.206.110.139]) by smtp.gmail.com with ESMTPSA id w19sm5758332lfl.55.2019.12.14.04.41.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2019 04:41:21 -0800 (PST) From: Andrii Kolomoiets To: bug-gnu-emacs@gnu.org Subject: 27.0.50; vc-git: Wrong status in vc-dir after registering directory Date: Sat, 14 Dec 2019 14:41:11 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::234 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 0. mkdir test && cd test git init touch file git add file git commit -m "initial" mkdir dir touch dir/file1 1. emacs -Q 2. C-x v d "dir/" is listed with "unregistered" status. 3. v "dir/" has "added" status. 4. g "dir/file1" is listed with "up-to-date" status. Shouldn't it have "added" status? 5. g Now "dir/file1" properly has "added" status. Also: - After step 3 point is moved to word "dir" on second line. - Press "n" before step 3 to move point to "dir/". After step 3 "dir/" status is not updated and remains "unregistered". From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 15 20:25:11 2019 Received: (at 38615) by debbugs.gnu.org; 16 Dec 2019 01:25:11 +0000 Received: from localhost ([127.0.0.1]:37541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igf8J-000529-1g for submit@debbugs.gnu.org; Sun, 15 Dec 2019 20:25:11 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:40619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igf8G-00051l-Ix for 38615@debbugs.gnu.org; Sun, 15 Dec 2019 20:25:09 -0500 Received: by mail-wm1-f47.google.com with SMTP id t14so4908694wmi.5 for <38615@debbugs.gnu.org>; Sun, 15 Dec 2019 17:25:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=cN2JCPKUix5XcSo22fNYOlxnglEHEPOyvsMg2G/WCuI=; b=mRA81YA1e9H3Us8+TfFqgxz2vGe15jeLQ26Zd4lxbZ009Dpg4Ygk60cfJFEkAQ6X/R AtklejZ6X9UUaEKJjCIAPOatE8cxkhvIjrKYsYN30on4AmPulbzKn9Z4x0OILZLP04sT gYZRUBNr9JaTVjZSB/FoAOv5WX/eAC5Vbi7Wk2TgR8HMJmq4X8lrXLK+cMOEXQF/XiVg WGPY5OiyENn1MvitvyZZvKqPMGLy8/21T7DJdFCWkqoCVLdpLlyHqb8KAEFKKorq1bAM 1qD6OJUEsM77ouN6OCW9tePxO+DY/Tw61D/WnB4L6dF6ENaPj+UzeGKV42mfs9a1n/NH mPBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=cN2JCPKUix5XcSo22fNYOlxnglEHEPOyvsMg2G/WCuI=; b=WBQ4NlBEgkqGQRbCzJ7elgc8+Nazlj4mkPsOUJWG3LlymEHCw+DejHyttz401g5SD/ WBAR/pAExcprcGCMTrdmFLttJCpX89JNs32Oaw5iIl4cTdt6ENax5auLdkLDUOXeLJ/g Psacdg8+11Kc605R7mkUIFLSGST7xvTTVlR0ZG6s2Me0rMlA/Pbls6qjWqygwTed0Tsj 4mGIQhtnPW5tzkuGabsIMgCJQPBrmJ7AmGKAV8rJPDlxzvUdlkuHp4C+WPyTeoYZJKCA mJfAt5ZztLIDE2dWMyqjM6ESYZBiAEQhDIbkPwjLGZmPt1y8vhUsmjohhkj1jmPot7+3 XzGA== X-Gm-Message-State: APjAAAWsutAKPjTpDB2O+zmQsuyKl86pp8WriE9R6c/8MxU0c9F0oPRo 3nOfJBfinvVvyNwRJtTWRGOfDCrYPes= X-Google-Smtp-Source: APXvYqzmZLRHFmUE4HcI5T0qGqxrrcttrJdIHUYwwPlbn9sLJ+dnYYHarXUf8vCxUYXfp+/y5jla1Q== X-Received: by 2002:a1c:8095:: with SMTP id b143mr28253106wmd.7.1576459502302; Sun, 15 Dec 2019 17:25:02 -0800 (PST) Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id s1sm19387959wmc.23.2019.12.15.17.25.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Dec 2019 17:25:01 -0800 (PST) Subject: Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory To: Andrii Kolomoiets , 38615@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: Date: Mon, 16 Dec 2019 03:25:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------C27F4E1D79B8B85B6A032C6C" Content-Language: en-US X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38615 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) This is a multi-part message in MIME format. --------------C27F4E1D79B8B85B6A032C6C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Andrii, On 14.12.2019 14:41, Andrii Kolomoiets wrote: > 0. mkdir test && cd test > git init > touch file > git add file > git commit -m "initial" > mkdir dir > touch dir/file1 > 1. emacs -Q > 2. C-x v d > "dir/" is listed with "unregistered" status. > 3. v > "dir/" has "added" status. > 4. g > "dir/file1" is listed with "up-to-date" status. Shouldn't it have > "added" status? > 5. g > Now "dir/file1" properly has "added" status. > > Also: > - After step 3 point is moved to word "dir" on second line. > - Press "n" before step 3 to move point to "dir/". After step 3 "dir/" > status is not updated and remains "unregistered". Thanks for the repro. This problem seems to have been with us for a while. vc-git's dir-status-files code is a bit hard to follow, but here's a patch you can try. I'll commit it in the next few days if nothing comes up. --------------C27F4E1D79B8B85B6A032C6C Content-Type: text/x-patch; name="vc-git-dir-status-files+added.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vc-git-dir-status-files+added.diff" diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 71307cdffd..9e02a820ac 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -521,14 +521,17 @@ vc-git-after-dir-status-stage ('ls-files-up-to-date (setq next-stage 'ls-files-unknown) (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} \\([0-3]\\)\t\\([^\0]+\\)\0" nil t) - (let ((perm (string-to-number (match-string 1) 8)) - (state (match-string 2)) - (name (match-string 3))) - (vc-git-dir-status-update-file - git-state name (if (equal state "0") - 'up-to-date - 'conflict) - (vc-git-create-extra-fileinfo perm perm))))) + (let* ((perm (string-to-number (match-string 1) 8)) + (state (match-string 2)) + (name (match-string 3)) + (file-info (vc-git-create-extra-fileinfo perm perm))) + (if (equal state "0") + (unless (gethash name (vc-git-dir-status-state->hash git-state)) + ;; `diff-index' has not produced a more precise info. + (vc-git-dir-status-update-file + git-state name 'up-to-date file-info)) + (vc-git-dir-status-update-file + git-state name 'conflict file-info))))) ('ls-files-conflict (setq next-stage 'ls-files-unknown) ;; It's enough to look for "3" to notice a conflict. --------------C27F4E1D79B8B85B6A032C6C-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 16 03:00:33 2019 Received: (at 38615) by debbugs.gnu.org; 16 Dec 2019 08:00:33 +0000 Received: from localhost ([127.0.0.1]:37715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iglIu-00029E-SU for submit@debbugs.gnu.org; Mon, 16 Dec 2019 03:00:33 -0500 Received: from mail-lj1-f173.google.com ([209.85.208.173]:43597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iglIs-000291-Kc for 38615@debbugs.gnu.org; Mon, 16 Dec 2019 03:00:31 -0500 Received: by mail-lj1-f173.google.com with SMTP id a13so5685784ljm.10 for <38615@debbugs.gnu.org>; Mon, 16 Dec 2019 00:00:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=72JVgq+x6FCjrHYs77nc14er3Jr3mWwJW0BZM0udd4k=; b=Sl6UYXUnD0JZfWDZLoDUgkBaNP1Y0w4v5dD/KOlj14jtVSd3llWgRUxS2R7Io4LYSl VvPGs/ZA+lz0pyEKlWXihC+iWmnVTICe75OlbFmXPM/a+3unVMM5FhxrVtWmAKnxFmZN dHfG+U81J2o3k8tMej7AnpWCotM9vlCQJ3Y2yytEmRTKhyaUJiO3/peipTpGu89/Z/s+ AR0f5CLaZnPnkgWM0GH7C3iUBKs/nyIGeQWkYKQP1nGj8c9LnkKYQzW+9WeTWM82kFAv 4f3T+Lv9SA4SrVMeo1fqmPga9NRjKBuoH1zqa690Sl6VR1A/fh1KuTYn2h7EeoXqYOL1 JhMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=72JVgq+x6FCjrHYs77nc14er3Jr3mWwJW0BZM0udd4k=; b=qBQ1+qLEFVKdMMKlpwCxMESw04YuHL8BN6TxCeznMthy0WMtkcc1ubDiV4a6sOLXkH gH/NWLh70OCHUrP69lrYMFsV9whwh++vKJvtSBl0OIx+bu5SyqYh4p93IssGXh56lJWm CiTscnS63AofcnxvnaYpDLPdCRfAQdA7xf/XMUyS1YRuAHj04S0A+ofZ1Pg4433+FHNC tEmvZXNajwBBVefbQtTpXJCnGc+yt8XvZDWKRJzGepeWKoQAS8T2+aBDAb2toMZLsgyg 4c2BhWYRWbQ/0kIoZscWFXaimjYwwoJNBwl5n8xxWFf7ECUirYq1ATLYKweaVjLicrvX FugA== X-Gm-Message-State: APjAAAWNsCj09wOWkjwXw2mw9ii+pHaDR3NlOAgmnLTI4oVaiapeobAk a0Ym33X+p1zf+T1bnUNfkD+ivBZY X-Google-Smtp-Source: APXvYqzUX6tP7Rwhy4heH8ZP3n4kVnHyjfQJpv2R2mhTWcMS8TVqiW4/iBhpZWbPjLthHv+4AvLp+A== X-Received: by 2002:a2e:7009:: with SMTP id l9mr18881957ljc.96.1576483224274; Mon, 16 Dec 2019 00:00:24 -0800 (PST) Received: from muffinmac.local (188-42-207-82.ip.ukrtel.net. [82.207.42.188]) by smtp.gmail.com with ESMTPSA id b17sm9845497ljd.5.2019.12.16.00.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 00:00:23 -0800 (PST) From: Andrii Kolomoiets To: Dmitry Gutov Subject: Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory References: Date: Mon, 16 Dec 2019 10:00:22 +0200 In-Reply-To: (Dmitry Gutov's message of "Mon, 16 Dec 2019 03:25:00 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38615 Cc: 38615@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > On 14.12.2019 14:41, Andrii Kolomoiets wrote: >> 0. mkdir test && cd test >> git init >> touch file >> git add file >> git commit -m "initial" >> mkdir dir >> touch dir/file1 >> 1. emacs -Q >> 2. C-x v d >> "dir/" is listed with "unregistered" status. >> 3. v >> "dir/" has "added" status. >> 4. g >> "dir/file1" is listed with "up-to-date" status. Shouldn't it have >> "added" status? >> 5. g >> Now "dir/file1" properly has "added" status. >> Also: >> - After step 3 point is moved to word "dir" on second line. >> - Press "n" before step 3 to move point to "dir/". After step 3 "dir/" >> status is not updated and remains "unregistered". > > Thanks for the repro. This problem seems to have been with us for a while. > > vc-git's dir-status-files code is a bit hard to follow, but here's a > patch you can try. I'll commit it in the next few days if nothing > comes up. Thanks, file status is "added" after step 4 now. Though point is stil moves to the word "dir" on the second line after step 3. And directory "dir" status is not updated when: 2. C-x v d 3. n 4. v Should it be different bug reports for those cases? From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 16 08:23:49 2019 Received: (at 38615) by debbugs.gnu.org; 16 Dec 2019 13:23:49 +0000 Received: from localhost ([127.0.0.1]:38072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igqLl-0004sT-0c for submit@debbugs.gnu.org; Mon, 16 Dec 2019 08:23:49 -0500 Received: from mail-ed1-f54.google.com ([209.85.208.54]:44916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igqLj-0004sG-E5 for 38615@debbugs.gnu.org; Mon, 16 Dec 2019 08:23:48 -0500 Received: by mail-ed1-f54.google.com with SMTP id bx28so1811474edb.11 for <38615@debbugs.gnu.org>; Mon, 16 Dec 2019 05:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=d2KrUSquiXuu/UYFHJO+o4/hiRbpDFOl6tjOv0AHiOA=; b=gRONc7MwLkweLqClEWbXmWXLr1F38GiARaFiAjXoEOfO4i3YpNVNMmgk6eY/YEcIfA z7joQ4EEYIknyrcHGQaQ8/maFVsUlNk2HgvxGgMd60I9atYXtXpwuv4FV3tmECrO5ehK p4V0ublWwQi/vwmb8L+Vni3B/5I3VccVoUtRns7j2NX+PKfvhY2neRT3pKNl10hrwUC5 5ygpjYvvj4fRmQJpkGzKjL1Y7VuZbDATMvP3UNbdN7VmE1kOZMeVUYn1WUYlrxSSqUk3 CgFip7F6UjNVN1OD+nnEnKLinRlp2uxQaCBXuy69jokuSdF5gsPSwLbzYk2gDdzcXZXO 3O4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=d2KrUSquiXuu/UYFHJO+o4/hiRbpDFOl6tjOv0AHiOA=; b=dmvXmCL41fw5Xf9OI9pQL94APWgsZBrRvTCLwKxhSOTs4Zz+DtttL4nJNA0OGQjcy1 qW9KhlmON7cDLRtvPuBmh99fLabBJ1gLbEFBwuRxTuU6LDmL4QHlLN0Evre6eja6EW0k XKfOu34lyAQboklk0+WOL1F3KK1kZmuxPZVs1AuT/NglxRq6xk8XTthbkzYfBTStFM8M 1hSA3Cyv2t5ENT0XIEeHFbt1v3hQE5lzwEk/BpchT6nfT4mjKZM0B2BiQl2xLtxo0Ndn nUu9FKxkMH44+sWvMvBesTmPPLUtFrTQNxmBhapv5VLmSXXewNQ9JshbLgg2q/DznEZT 3gYw== X-Gm-Message-State: APjAAAX/5DWcwsYnYjRasFjT0x048opAsBQTYZ5DxatJCP9kiB+3ofAx qNu0znESksrvQXCd31fIrEjp/o+BXkA= X-Google-Smtp-Source: APXvYqyzbynfKkvc1CG6IXmcfY4lqXIkycvQFZodzb1YK9JAzvRmJWIFk6oy2HbwWy3MRLLteEYgrQ== X-Received: by 2002:a17:906:1b07:: with SMTP id o7mr4854148ejg.131.1576502621148; Mon, 16 Dec 2019 05:23:41 -0800 (PST) Received: from [192.168.0.149] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id qk16sm1043707ejb.71.2019.12.16.05.23.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Dec 2019 05:23:40 -0800 (PST) Subject: Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory To: Andrii Kolomoiets References: From: Dmitry Gutov Message-ID: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> Date: Mon, 16 Dec 2019 15:23:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38615 Cc: 38615@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 16.12.2019 10:00, Andrii Kolomoiets wrote: > Though point is stil moves to the word "dir" on the second line after > step 3. > And directory "dir" status is not updated when: > 2. C-x v d > 3. n > 4. v > > Should it be different bug reports for those cases? Yes. These would have to be fixed in vc-dir rather than vc-git, and they would require some more investigation about the proper behavior and the places to fix. Regarding the moving of point, personally, I'm not sure which of the behaviors is more correct. The latter is caused basically by: - Git returning a directory in the file status list. - Directories not having an actual VCS status in our system. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 16 14:43:50 2019 Received: (at 38615) by debbugs.gnu.org; 16 Dec 2019 19:43:50 +0000 Received: from localhost ([127.0.0.1]:40386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igwHW-0001cs-Jp for submit@debbugs.gnu.org; Mon, 16 Dec 2019 14:43:50 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:35174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1igwHU-0001cf-0S for 38615@debbugs.gnu.org; Mon, 16 Dec 2019 14:43:49 -0500 Received: by mail-lj1-f175.google.com with SMTP id j6so8144209lja.2 for <38615@debbugs.gnu.org>; Mon, 16 Dec 2019 11:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KzAvMC+mR3ULjE+8eIWqW0M6We8alS2v4rYwSj7iKBM=; b=q2Y+9Hvlw7p/i19OosOZ/4tfAVabDND6pMxSLubp3tTTQimWNxbpalT5S/FTfCb6LM LQwivu6OZL0PIbHSzjz/MzhOn99FH5LdzselUxKwt2Wryq2C5WTEHmVBNyCB8ucVqaIt U+s5XZaaMu2fu6vH4nmDOAeWa9E1lxU5tJsnhGszRDqBkgaQmv8aRhk5XbLwDsj3WWqB YQH3uy409Z03+h3Iu1S7ndWNxJxtv2kmNDbOHmH2Yusj0Mu+oc16WCC3ZdN+Yto/oFTN Dig1/GXgyN9Tuvr8MsvZ5re+vjzUyP17YZalYNsF+NANoKcJVgJRDZI9puHCW5J7a2iL uUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KzAvMC+mR3ULjE+8eIWqW0M6We8alS2v4rYwSj7iKBM=; b=XOIEExLty35m/DifK/EXvSTR9MkPKUsu4HZfxLpLo2/iuHj/F6WKHaMikzF7lSdkai uNNGZE4iOwQCkYO2lRzvwTuh3q5KCHW/h+QCzmcKHPLL5UVBhBZWrAm3j+0I/r6Xbf5I p9OlD57cAT3gp0sBbnmTZmsG7avsuMyS+8dsOpSdSjCgYQ12EzB15c7iJIi3VMdH+W+b /Sf5VGanzTRh5CmVjYeHtH62xhDzbi4wEgu3fo1G2g7jIISt/rukwj+cUVfW78CqzcbJ DaB0wYXQWE/uIGJQhSVzB92z81q4lnGHx/6BKfJncU3YspP2nM1yZN7QzBliFGyVe5g4 KjJg== X-Gm-Message-State: APjAAAV3HrAzXh5RIeEO5GlXzr5uNoJ3a6qkvObyTiSpRHg/U+ySpCh2 P8eAjbp8M2oTXZ/cOiTwsfWW/MUl X-Google-Smtp-Source: APXvYqyx1n650WkbF92ss4pq0o+1cddCX1cOOD7jFtx0CixQlulHxKk3iCriEc2gDbl65NvO0HgPLg== X-Received: by 2002:a2e:b4e7:: with SMTP id s7mr534465ljm.58.1576525421616; Mon, 16 Dec 2019 11:43:41 -0800 (PST) Received: from muffinmac.local ([91.206.110.139]) by smtp.gmail.com with ESMTPSA id u13sm9500167lfq.19.2019.12.16.11.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 11:43:40 -0800 (PST) From: Andrii Kolomoiets To: Dmitry Gutov Subject: Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory References: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> Date: Mon, 16 Dec 2019 21:43:39 +0200 In-Reply-To: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> (Dmitry Gutov's message of "Mon, 16 Dec 2019 15:23:38 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38615 Cc: 38615@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Dmitry Gutov writes: >> Though point is stil moves to the word "dir" on the second line after >> step 3. >> And directory "dir" status is not updated when: >> 2. C-x v d >> 3. n >> 4. v >> Should it be different bug reports for those cases? > > Yes. > > These would have to be fixed in vc-dir rather than vc-git, and they > would require some more investigation about the proper behavior and > the places to fix. > > Regarding the moving of point, personally, I'm not sure which of the > behaviors is more correct. It's `vc-dir-move-to-goal-column' called after `vc-register'. I will make dedicated bug report. > The latter is caused basically by: > > - Git returning a directory in the file status list. > - Directories not having an actual VCS status in our system. How about to list files and not directories? This will allow to register untracked files under untracked directory with single `v'. Please see attached patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vc-git-ls-files-in-untracked-dir.diff diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 71307cdffd..e40dcadf56 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -615,8 +615,7 @@ vc-git-dir-status-goto-stage "ls-files" "-z" "-u" "--")) ('ls-files-unknown (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-o" "--directory" - "--no-empty-directory" "--exclude-standard" "--")) + "ls-files" "-z" "-o" "--exclude-standard" "--")) ('ls-files-ignored (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" "-i" "--directory" --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 16 18:54:07 2019 Received: (at 38615-done) by debbugs.gnu.org; 16 Dec 2019 23:54:07 +0000 Received: from localhost ([127.0.0.1]:40532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ih0Bj-0002T3-4Z for submit@debbugs.gnu.org; Mon, 16 Dec 2019 18:54:07 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:45424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ih0Bh-0002SY-Ho for 38615-done@debbugs.gnu.org; Mon, 16 Dec 2019 18:54:06 -0500 Received: by mail-wr1-f45.google.com with SMTP id j42so5156719wrj.12 for <38615-done@debbugs.gnu.org>; Mon, 16 Dec 2019 15:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PZ+BGZUxndBhibrJiKJljQJudnyrBrckC/E7QY+FD/4=; b=eKUktbhxXzARFod0cDcImrBAzv+wo4AEU7axgwDiYRKLzaXQmWzyT4s9BBo87yONcf lK7oYhnJQ+vF6W1hqbuJ3Nqza0rkADwGX+Dnck/w7JeV4WR8TPnOzMxkeMNrck5VQPgz qTLGFXk3XOjvb9aRibb+eAXu9VBN0XvvmoEN5q6GDhj7D2hATMARYFT12R+X5YT1/CFH pGJY7jDXNpPe3JpyM13pjht8KNZ5MOmzF22VU+wBXZwpCTNsVaEtIwFTAiDLE1y8Ouk+ 0rV0dfCMoos39N+QfUPtcBcXZwWTYryqamAEF/+vX7lfm/8AGgcDQmY80y++k3h6Y6Vh Jplg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PZ+BGZUxndBhibrJiKJljQJudnyrBrckC/E7QY+FD/4=; b=nrzOTJZlBnA68zn6TxnXkiBfDrFMIdav372gqohLJYdasRHT2SlaezbGDLIM1iRvbJ 52BzxjXP9tw8MqYV4zi0LJ6aom05v/v4lQrfgj4a9G4zoWph1U6QwQx4YgsKqfcsUc7l 4op3nkQS9YipU0cvVD8O/LJcddmvJvK4EWRJ52AVDR57k1JPLfVqMequMXigzGCCgQaS 4YI8b37+gmBftwwFvx2VsJVoxfS5TAjw6YG+WBFcpiI7N6l5j60zv8bPyscGojzr4Kvh CvvZEU1Xg4lJevNWduGOYcqyqrGj/WRc00yCLzNHfzBvq9QmIcWuO7XVK+cAu+Fk5uKN hmAw== X-Gm-Message-State: APjAAAXmzKNT49BRWAiNYH+VUnAQw/1B0A/YHsr4DC84z6lEo6cLmapC sqYOT/S6Db3oZVE61zDbGjceMZCz2Bg= X-Google-Smtp-Source: APXvYqx8mqE/dDZmc7MesrsV49upi9jG+8+aX/BzR3FxrGpjuK4gIDDbRcrIUnGDSt6FzathkG896Q== X-Received: by 2002:a5d:538e:: with SMTP id d14mr34046620wrv.358.1576540439140; Mon, 16 Dec 2019 15:53:59 -0800 (PST) Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id x10sm23557830wrv.60.2019.12.16.15.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Dec 2019 15:53:58 -0800 (PST) Subject: Re: bug#38615: 27.0.50; vc-git: Wrong status in vc-dir after registering directory To: Andrii Kolomoiets References: <71ee7487-8536-125d-f998-e8995801594c@yandex.ru> From: Dmitry Gutov Message-ID: <4cbe36da-71c6-8484-62a2-78630155373a@yandex.ru> Date: Tue, 17 Dec 2019 01:53:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 38615-done Cc: 38615-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 16.12.2019 21:43, Andrii Kolomoiets wrote: >> Regarding the moving of point, personally, I'm not sure which of the >> behaviors is more correct. > > It's `vc-dir-move-to-goal-column' called after `vc-register'. I will > make dedicated bug report. Thanks. >> The latter is caused basically by: >> >> - Git returning a directory in the file status list. >> - Directories not having an actual VCS status in our system. > > How about to list files and not directories? This will allow to register > untracked files under untracked directory with single `v'. Please see > attached patch. Okay, let's try this, thank you. I believe the original idea was to avoid overwhelming the user when there are a lot of unregistered files (build artefacts and the like), but that's what gitignore is for. Both patches are pushed, closing. From unknown Sun Jun 22 13:36:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 14 Jan 2020 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator