From: Taylor Blau Date: Sun, 09 Apr 2023 01:23:26 GMT Subject: Re: [Question] Can git cat-file have a type filtering option? Message-ID: In-Reply-To: On Fri, Apr 07, 2023 at 10:24:22PM +0800, ZheNing Hu wrote: > However, `git cat-file` already has a `--filters` option, which is > used to "show content as transformed by filters". I'm not sure if > there is a better word to implement the functionality of filtering by > type? For example, `--type-filter`? There is the `--filter='object:type=blob'` that should do what you're looking for. In other words, if you wanted to dump the contents of all blobs in your repository, this should do the trick: $ git rev-list --all --objects --filter='object:type=blob' | git cat-file --batch[=] Thanks, Taylor