jesseduffield.lazygit/pkg/commands/models
Jesse Duffield a2a8755a7c Add commit store
I want an efficient way to get information about the commits of a repo.
So far, our Commit model contains a mix of immutable and mutable fields, and this means we need to throw out
commits whenever we refresh, because one of the mutable fields may have changed.

The commit store will store a new model, ImmutableCommit which never changes so we can just continue adding
commits to the store without worrying about invalidating any of it.

One use case for this store is the ability to determine if one commit is an ancestor of another, which will
help us colour the commits against each of our branches in the local branches view. Without an in-memory
store, we would need to make one git call per commit which would be super slow.

If this store proves useful, we could switch to using it as the source of truth for our commits, with
mutable stuff handled separately.
2023-10-02 16:25:15 +11:00
..
branch.go show commits against branches 2023-06-01 19:21:24 +10:00
commit.go Add commit store 2023-10-02 16:25:15 +11:00
commit_file.go better colouring for directories for when adding a patch 2021-04-02 11:00:15 +11:00
commit_store.go Add commit store 2023-10-02 16:25:15 +11:00
commit_store_test.go Add commit store 2023-10-02 16:25:15 +11:00
file.go fix could-not-access error 2022-11-11 12:30:14 +11:00
immutable_commit.go Add commit store 2023-10-02 16:25:15 +11:00
remote.go move models folder into commands folder 2020-09-29 20:48:49 +10:00
remote_branch.go fix: fix ambiguous refname 2022-05-13 21:05:51 +09:00
stash_entry.go fix: fix ambiguous refname 2022-05-13 21:05:51 +09:00
submodule_config.go add submodules context 2020-10-02 08:09:42 +10:00
tag.go show tag message 2023-02-20 19:01:08 +11:00