News for hackers. Stuff that matters.
Re:Gitless a simple VCS built on top of Git by hedora on Saturday June 17, 2023 @11:48AM (#36371226)
The porcelain parts of git are terribly complex (though improving; especially if you just apply the config changes it suggests during normal operation).

However, the core data model is simple (it is a content addressable store, where each commit contains pointers, forming a directed graph; the pointers are unforgeable, so the graph is acyclic).

Re:Gitless a simple VCS built on top of Git by Certhas on Saturday June 17, 2023 @12:04PM (#36371431)
This meme needs to die. That is one tiny component of the data git touches when working with it.

There are many sources of interacting states, some internal to git, some not:

  the local tree of commits
  remote trees of commits
  a possible origin relationship between the two
  branch labels on each local and remote with possible relationships between them
  the HEAD label
  stash
  index/staging area
  the actual working directory
  .gitignore
A simple question like which files are being tracked is actually a complex result of several different places in the above. Untracking a file is consequently extremely non-obvious.
Re:Gitless a simple VCS built on top of Git by nemetroid on Saturday June 17, 2023 @12:46PM (#36371901)
Each commit in Git contains a file tree. So a single commit is what’s needed to answer the question ”what files does this commit track?”, which is the only question about file tracking that makes sense to ask in Git.

Describing Git’s behaviour in terms of other version control systems’ semantics (e.g. Subversion or Mercurial) is not necessarily easy, but that’s not what’s being claimed.

Re:Gitless a simple VCS built on top of Git by Certhas on Saturday June 17, 2023 @03:12PM (#36373487)
That's incorrect. Git considers files tracked if they are in the last commit or staged. As far as I am aware it considers files untracked if they are not tracked and not ignored (though git clean -x suggests that it considers such files untracked and simply ignores them for most purposes, which also makes sense). So un/tracked depends on last commit, staging area and .gitignore.

> Remember that each file in your working directory can be in one of two states: tracked or untracked. Tracked files are files that were in the last snapshot, as well as any newly staged files; they can be unmodified, modified, or staged. In short, tracked files are files that Git knows about.

> Untracked files are everything else — any files in your working directory that were not in your last snapshot and are not in your staging area.

https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-...

Re:Gitless a simple VCS built on top of Git by williamdclt on Saturday June 17, 2023 @01:28PM (#36372307)
And a monad is just a monoid in the category of endofunctors