From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#42145: vc-git file order mismatch between vc-dir and vc-diff Date: Thu, 2 Jul 2020 01:44:15 +0300 Message-ID: <82542bee-ec10-86b6-39bb-8d4fa0c68770@yandex.ru> References: <87bll048br.fsf@mail.linkov.net> <871rluewrf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35027"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: 42145@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 02 00:45:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqlTf-00090u-D4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 00:45:15 +0200 Original-Received: from localhost ([::1]:50148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqlTe-00058I-7G for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 18:45:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqlTS-00057K-Bw for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 18:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqlTR-0005Y4-Vs for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 18:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqlTR-0000Ip-Ri for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 18:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 22:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42145 X-GNU-PR-Package: emacs Original-Received: via spool by 42145-submit@debbugs.gnu.org id=B42145.15936434701106 (code B ref 42145); Wed, 01 Jul 2020 22:45:01 +0000 Original-Received: (at 42145) by debbugs.gnu.org; 1 Jul 2020 22:44:30 +0000 Original-Received: from localhost ([127.0.0.1]:53922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqlSw-0000Hl-3Z for submit@debbugs.gnu.org; Wed, 01 Jul 2020 18:44:30 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:39046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqlSq-0000HV-P6 for 42145@debbugs.gnu.org; Wed, 01 Jul 2020 18:44:28 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id q5so25746201wru.6 for <42145@debbugs.gnu.org>; Wed, 01 Jul 2020 15:44:24 -0700 (PDT) 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=78JwTGOecYEXVO6aIL40YVeEXb+Ct39n5ScEJIYUYHU=; b=O1JiOz0xi57XsyDHKvP5wsG/v12KBQfk9qlLnWiFOpON6DRrw6TUd6EgLbEwVAUR+T 1PpQOh/5irCCYaH3TgKChTDCW2wJmJa3BOc06T1J7eIxtbIi3OANkOPKr2STmmpUYbjl twAXH8xg3zHsixLx6EjPktwmL75EKUY/FlrPzepIvKvmLe7WoqzwjLV3vJibO8g/JTYI zkaUilRajOmdFLsNP8Rpo/KgKRnBA6eGJnuHrW5u2qISvycz4dbgH93YjyTzAgAFsWlJ pkOBRHwyyA7yaOJDhZ2IpYgLBX82MlkgVTFY7ScCp4WHhMgpdHQ8I8mqjY5sYl36/Yjx 3oZQ== 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=78JwTGOecYEXVO6aIL40YVeEXb+Ct39n5ScEJIYUYHU=; b=N+KBFrXTSOhE23jySj9qYGh22NTX4DG9B+NWOWOaXX7twjEQ7J+754DCId5RPoIGcK JgFjoP+oXjNfl9Yu8SrOcZjr4yy7TC5rOywzFMPhkyLswDqcXcb3vZCH9a67Ax/Piu+Y DC9pxwOBZZaM7Bgg6MBqEF0Hst9lJS7iNF0MLRt3Rqbpnt81Xr/CqVGLgDYNqHEpfcEv 2sMXRcZnbDpVNUX+7zLeZDqkHiaMGle6f5sSXA1Izhg4d3m1xjZuFMfjqCbeD+zmf2zt 6xgUO66JMytNrkHbs9dCP+Ku69icHnepsFFHK+161AKs27CsuwtS0xZixMx9fS+r1DsA VaWQ== X-Gm-Message-State: AOAM530vPQT5BS3vadIHQuTyyNZ0+O2TIFGMAv206h7hZXKcjif4cVNc o9LUgzpOaxJYm/e8ftv9XUN8rxCb X-Google-Smtp-Source: ABdhPJyd/hNcAXqikjrebM7eTdekNmplyqax8oif/lplCvp4RaIs3oJRYCQSzOTcWJTt2THD01GlmQ== X-Received: by 2002:a05:6000:1c8:: with SMTP id t8mr30696122wrx.73.1593643458421; Wed, 01 Jul 2020 15:44:18 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id 138sm2985641wmb.1.2020.07.01.15.44.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2020 15:44:17 -0700 (PDT) In-Reply-To: <871rluewrf.fsf@mail.linkov.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182624 Archived-At: On 02.07.2020 00:44, Juri Linkov wrote: >> 'git diff' has a '-O' argument, which accepts . Maybe >> it'll help, but I kind of doubt that. Ideas welcome. > Maybe it's possible to write a diff-mode function to sort file hunks > in > vc-diff output buffer? Maybe by just giving the right file-beginning > regexp to sort-subr? Which sort-subr? Overall, it sounds possible. But I would be careful about making the display of long diffs slower. >> The idea is, you open a diff, maybe split some of the hunks, kill the ones >> you don't need (diff-mode supports all these operations), and then commit >> the remaining ones, from multiple files, if needed. Seems like a good >> replacement for 'git add -p' for Emacs power users. > But I wonder how it could handle binary files where git-diff output says just > "Binary files differ". Perhaps it wouldn't. Or perhaps it would check them in wholesale, without choosing individual pieces inside.