News for hackers. Stuff that matters.
Re:Supercharging the Git Commit Graph IV: Bloom Filters by tempay on Tuesday July 17, 2018 @04:15AM (#17548135)
I thought git didn't have a concept of directories, just blobs that have a path? If so, I presume "all commits changing a directory" is found by individually checking each file contained by the directory.
Re:Supercharging the Git Commit Graph IV: Bloom Filters by masklinn on Tuesday July 17, 2018 @05:23AM (#17548399)
Git very much has directories, it calls them "tree": a commit links to a tree, which links to a number of trees or blobs associating each with a name: https://git-scm.com/book/gr/v2/Git-Internals-Git-Objects

A blob is a file (ish, it can also be use for some other things since it's not intrinsically named), a tree is a directory.

However Git doesn't treat filesystem directories themselves as first-class e.g. you can't version an empty directory. A tree only exists in order to contain sub-items (ultimately blobs).

Re:Supercharging the Git Commit Graph IV: Bloom Filters by lozenge on Tuesday July 17, 2018 @04:45AM (#17548256)
As the article mentions, each folder is a tree object containing (referencing) subfolders and blobs (files). Run git show HEAD^{tree} to see it.

Finding the list of all filenames that were ever in a particular path is very expensive.