From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: How to get a list of changed files with VC? Date: Sat, 15 Jul 2017 20:41:29 +0300 Message-ID: <0571a5da-53a5-7b26-fd8e-c3981d7d154c@yandex.ru> References: <87lgntdt9f.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1500140502 21614 195.159.176.226 (15 Jul 2017 17:41:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 17:41:42 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0 To: Michael Heerdegen , Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 15 19:41:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWR4S-0005Is-Sv for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2017 19:41:37 +0200 Original-Received: from localhost ([::1]:42852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWR4Y-0005Yq-Hz for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2017 13:41:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWR4S-0005YZ-2n for emacs-devel@gnu.org; Sat, 15 Jul 2017 13:41:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWR4O-0004qW-Np for emacs-devel@gnu.org; Sat, 15 Jul 2017 13:41:36 -0400 Original-Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]:33882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWR4O-0004nN-GV for emacs-devel@gnu.org; Sat, 15 Jul 2017 13:41:32 -0400 Original-Received: by mail-wr0-x235.google.com with SMTP id 77so79364151wrb.1 for ; Sat, 15 Jul 2017 10:41:32 -0700 (PDT) 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:content-transfer-encoding; bh=zYlqbRnec+8MJ2xBLWTj/EAeEAxGP2qMyy1lyWfBld8=; b=aQJXi3ww+2F7u+d/vuVyIFUmJt0ann1NQBSHLeziH6MZd87TsRMYcb1CgMexY7sgVg wLXxEBjOk1kubjKrdUGMhB/K0vCmOQA7BqHS0HuzLRRXqt7B5UabtxSO0RBP/HBDFRab SDP5tgDkVodneP1rD1xRNCLvwLdJ2VNaPYePIgAoMsYd3HL+JeNRwZQiUDAcX8mtLn6c 5u/4z1bvD6Va1qwyC77j04Faockd95PdPOsqjppR04c5nNBNRy7hIHhXr1ybWsBlb+D3 +IHLLriOD4WBC0RKKEGIBvk1NHxLET6vnz+iOk0ir0oMjLcDMnhHw1mCHFCfW18xqrzD Omew== 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 :content-transfer-encoding; bh=zYlqbRnec+8MJ2xBLWTj/EAeEAxGP2qMyy1lyWfBld8=; b=WCfiNy50Kbwv8kSGaXDTyTir1L5jZBX4eixeKQhQJDQBITAwGFuHRpudray5MQLwwx py2eXhFz7WPspgnaVYaccWhaPKMfwSKBNJSllAr+ALnGc1VQhtr2ZDepvEaYrNoOE/sO jKT7URKnWX+elqLLitsrmyaRyu/zxaLKZH9itJFEYkhRQFLNAdHLibEgfvHkVKJOCFa9 UdIX389vNJk3uLVSmh6ARubszzlLBPPOBE0H7N1ADkjgkjUO2IJb4fFuyznTPy8/5+rb cb5NPkXMLlEmlSNAGNWMS3EUMA6rDc6EGCUPtkOZISvfnfKCUPqqwh+TKEDPa1P1+hLF epnA== X-Gm-Message-State: AIVw110UPS3BkJUretXt25BAE9V+WuzXYnoPab9oaKuIKFm99y5ARTzl nCsJ2CrBz+sjg0oX1Ig= X-Received: by 10.223.155.150 with SMTP id d22mr8029666wrc.193.1500140491154; Sat, 15 Jul 2017 10:41:31 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id l14sm6899941wrb.19.2017.07.15.10.41.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jul 2017 10:41:30 -0700 (PDT) In-Reply-To: <87lgntdt9f.fsf@drachen> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216696 Archived-At: On 7/13/17 4:23 AM, Michael Heerdegen wrote: > More specific questions about my implementation: > > 1. The implementation of the first function > `el-search--changed-files-in-repo' is currently git-specific, but I > didn't find a way to implement it with functions that VC defines to make > it work for other version control systems. Any idea? For the changed files relative to HEAD, you can call the backend command (with vc-call-backend) named dir-status-files. But there is no way to specify the reference revision. Maybe calling the VC backend diff command on the whole repo and parsing the output could work. > 2. The second function `el-search--file-changed-p' doesn't have this > problem. However, I gained it from trial and error. Does the > implementation make sense? How can I avoid binding vc-git-diff-switches > -> nil (I get an error for some files if I don't). I'll need some more details to answer this.