1. 6
  1. 4

    What is the purpose of this post, other than simply pasting the original header file? Even the comments were already in the original header file. Why wouldn’t you simply link to the original header file, if there is nothing to be added?

    For those who can read C, the original git commit (which is actually extremely simple): https://github.com/git/git/tree/e83c5163316f89bfbde7d9ab23ca2e25604af290

    1. 6

      The purpose of the post is to get people curious about looking under the hood at Git’s code (which was very interesting to me). It is also to help clarify an aspect of how Git’s code works - the header file. The original header file does have comments, but they tend to be on the technical side. I expanded on those to help (esp newer folks) better understand how it works and to provide some context for the structures that are created.

      As you mention, another approach would have been to write out my comments as points in the article itself and link back to the original version. But it helped me learn to go through and document the code in this way (esp in the context of the rest of the codebase), so I decided to make that available.

      1. 5

        My apologies, I was too quick with my judgement. You actually did add comments in the source code. Well done, they felt like they were there already.

        1. 2

          No problem, and thank you :)