On Sat, Dec 17, 2022 at 11:53 AM Phillip Wood <phillip.wood123@xxxxxxxxx> wrote: > > This is specifically useful in bare repositories wherein the gitattributes are > > only present in the git working tree but not available directly on the > > filesystem. > > I was thinking about this and wondering if the problem is really that > bare repositories ignore attributes because they don't have a working > copy. If that's the case then we should perhaps be looking to fix that > so that all git commands such as diff as log benefit rather than just > adding a flag to check-attr. A simple solution would be to read the > attributes from HEAD in a bare repository in the same way that we > fallback to the index if there are no attributes in the working copy for > non-bare repositories. > This is actually the direction I started this series in, but I soon realized it's also useful to have a more generic version (which is currently what we have in this patch series) which also satisfies the bare repository scenario. It seemed like a natural extension. I thought it's also useful because it lets you see how attributes changes over history.