git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Yaroslav Halchenko <yoh@onerussian.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: --batch or some --paths-file  for very long lists of paths
Date: Thu, 4 Aug 2022 18:59:00 -0400	[thread overview]
Message-ID: <YuxPNFtTBmkZkiCW@lena.dartmouth.edu> (raw)

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 [<options>] <tree-ish> [<path>...]

so it is <path> not the <pathspec> like (why in stderr this time?)

	$> git commit -h 2>&1 | head -n1
	usage: git commit [<options>] [--] <pathspec>...

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        


             reply	other threads:[~2022-08-04 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 22:59 Yaroslav Halchenko [this message]
2022-08-08 13:12 ` --batch or some --paths-file for very long lists of paths Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YuxPNFtTBmkZkiCW@lena.dartmouth.edu \
    --to=yoh@onerussian.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).