From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#39452: [PATCH] vc-git-state fails for filenames with wildcards Date: Wed, 12 Feb 2020 10:24:28 -0500 Message-ID: <85lfp7ygk3.fsf@gmail.com> References: <83h802g77h.fsf@gnu.org> <8f427281-510c-30c3-995f-364e22d9c1e2@yandex.ru> <85y2texxso.fsf@gmail.com> <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="45608"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) Cc: 39452@debbugs.gnu.org, Wolfgang.Scherer@gmx.de To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 12 16:25:19 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 1j1tt7-000Bj0-84 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Feb 2020 16:25:17 +0100 Original-Received: from localhost ([::1]:39338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1tt6-0005Wg-6C for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Feb 2020 10:25:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54302) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1tst-0005WP-JT for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2020 10:25:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1tss-0005UD-EW for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2020 10:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1tss-0005U0-BI for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2020 10:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1tss-00033u-6a for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2020 10:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Feb 2020 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39452-submit@debbugs.gnu.org id=B39452.158152107811737 (code B ref 39452); Wed, 12 Feb 2020 15:25:02 +0000 Original-Received: (at 39452) by debbugs.gnu.org; 12 Feb 2020 15:24:38 +0000 Original-Received: from localhost ([127.0.0.1]:58945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1tsT-00033F-O2 for submit@debbugs.gnu.org; Wed, 12 Feb 2020 10:24:37 -0500 Original-Received: from mail-qt1-f194.google.com ([209.85.160.194]:43562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1tsQ-000332-RH for 39452@debbugs.gnu.org; Wed, 12 Feb 2020 10:24:36 -0500 Original-Received: by mail-qt1-f194.google.com with SMTP id d18so1828370qtj.10 for <39452@debbugs.gnu.org>; Wed, 12 Feb 2020 07:24:34 -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=V6Tnypzqvz/Ga9wtW44Y9+fsDAdf+VkZknBDY9g6bM8=; b=UdxN3i4WkeRcIIgmBcNSrL4wkbnnUkW7JC+6ber/OaZKuKCUv4/7tMJ1BkFfhd7fW3 7y7z/baNdHd9IUqh4YKV1+95VBvnpn0LoXO8+Kf77zsN2wsoUzZ/32Z0RKRSoQhPXNMR 6v3X/+0JDrpmFRNu/f4SbJsSpiaOXXuLWCHCUpx3Uqewcm4laMg1WkDINHTO7dNHJdW5 Htql/olaOWlaujM7Tk4wD2eK0vnorOlBkYeXr/iqwsTJpBhx4L3q+5YcDaQ08FS41zf2 vzt3cukIP0C5JSE4mfBKVhOsacol4WaBZEWp2grk45x7gK591hx9JOoIWfE/9Vb/M9d7 L9mA== 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=V6Tnypzqvz/Ga9wtW44Y9+fsDAdf+VkZknBDY9g6bM8=; b=dCs08HasbzTCiWuMueegtidV2Y16OmLpLZt5Faw2a5a27x0FocPXaWWRJGsGKFNvhe J21zKxJZG3IgRQGi4TWyXe6i/lwEA0ZXBNp26JGTySZbHIyW0l6HLwh0aR4e+ycmRjj6 b0ZAN1mKbvxizUHezZAlt8anri9I6m9SVxRW5JVicRitgtFCsbM2l8PBTS5clNy0j3j6 DU9UXzZ0kjYolhWSE4JOX8Fdu/FYsgcnII/wTCvl7DLDYAaZUl+FmwO2oHXZ6JE6r2cp S+C/Lo2wdLbAsRGwYkOp/74ZyuSU/ABFKauf7nv+qs8TFzu6OkZdFA46NWRRNv8AzUxs J3Iw== X-Gm-Message-State: APjAAAUmSQmncay0GS/GagGUzqnH0c/PSEbZ3lwDpXkGAMsJJA7nH4Rk X1RVyvhoqSE6eJ420q5/wb0= X-Google-Smtp-Source: APXvYqw8BdS0+s9un5xB5LFhfPHzvkDIQnX8RW/w9Cvkd1FWc5DWqe3wDljhGPA6BaQyugwZ0SNLIA== X-Received: by 2002:ac8:4914:: with SMTP id e20mr7428166qtq.199.1581521069183; Wed, 12 Feb 2020 07:24:29 -0800 (PST) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id y21sm329540qto.15.2020.02.12.07.24.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2020 07:24:28 -0800 (PST) In-Reply-To: <52f47a82-b93e-d9c2-ee94-752b289d4b96@yandex.ru> (Dmitry Gutov's message of "Wed, 12 Feb 2020 01:01:20 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:175967 Archived-At: Dmitry Gutov writes: > On 07.02.2020 16:43, Noam Postavsky wrote: >> Dmitry Gutov writes: >> >>> It's not so simple. FILE already goes through call-process. But Git >>> expects a pathspec, not just a file name. So if it's a glob, it is >>> expanded. >> >> You can pass --literal-pathspecs to tell git not to expand. Magit does >> this. But there is a downside due to the way git implements it, which >> is by setting an environment variable: it affects all subprocesses git >> calls, including git-hook scripts which tends to trip people up. > > I wonder how bad the latter problem is. After all, even if it > happens, it *can* be worked around in the same scripts. Yes, it's common enough to have a FAQ for it. https://magit.vc/manual/magit/My-Git-hooks-work-on-the-command_002dline-but-not-inside-Magit.html