From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id AB4EA1F54E for ; Thu, 4 Aug 2022 23:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239745AbiHDXAV (ORCPT ); Thu, 4 Aug 2022 19:00:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233923AbiHDW75 (ORCPT ); Thu, 4 Aug 2022 18:59:57 -0400 Received: from smtp.onerussian.com (washoe.dartmouth.edu [129.170.30.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E04020A for ; Thu, 4 Aug 2022 15:59:03 -0700 (PDT) Received: from c-76-24-253-1.hsd1.nh.comcast.net ([76.24.253.1] helo=localhost) by smtp.onerussian.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1oJjnx-0001IV-0Q for git@vger.kernel.org; Thu, 04 Aug 2022 18:59:01 -0400 Date: Thu, 4 Aug 2022 18:59:00 -0400 From: Yaroslav Halchenko To: "git@vger.kernel.org" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-SA-Exim-Connect-IP: 76.24.253.1 X-SA-Exim-Rcpt-To: git@vger.kernel.org X-SA-Exim-Mail-From: yoh@onerussian.com Subject: --batch or some --paths-file for very long lists of paths X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on smtp.onerussian.com) Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Dear Git Gurus, In DataLad (https://datalad.org) we are doing "our own" analysis of what specific files (not entire directories) should git and git-annex operate on. Obviously, in large repositories (and we have with >100k files) that might require invoking git add or git diff etc with a long list of paths specified in the command line. For that we often split invocation into multiple and even resort to git commit --amend to combine multiple commits then into a single one. But I wondered if may be there is already some trick to make such commands as status, diff, add, commit to operate on arbitrarily long list of paths passed to that git command somehow. Note that gitglossary (at least in 2.35.1 git on debian) says that Pathspecs are used on the command line of "git ls-files", "git ls-tree", "git add", "git grep", "git diff", "git checkout", and many other commands ... but $> git ls-tree -h | head -n1 usage: git ls-tree [] [...] so it is not the like (why in stderr this time?) $> git commit -h 2>&1 | head -n1 usage: git commit [] [--] ... So if in both cases it is pathspec, may be pathspec could support some other magical keyword like :(filelist)/tmp/mylonglistofpaths ? Thanks in advance for your time and thoughts, -- Yaroslav O. Halchenko Center for Open Neuroscience http://centerforopenneuroscience.org Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 WWW: http://www.linkedin.com/in/yarik