• 请不要在回答技术问题时复制粘贴 AI 生成的内容
jatsz
V2EX  ›  程序员

Git 第一版源代码

  •  
  •   jatsz · Oct 10, 2020 · 5914 views
    This topic created in 2226 days ago, the information mentioned may be changed or developed.

    https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290

    猛一看有种错觉:就这?我也能写。

    16 replies  •  2020-10-12 08:34:22 +08:00
    Loserzhu
    Loserzhu
    Oct 10, 2020
    1
    一种错觉,最近好多文章都在写 git 第一版源码。
    第一个是看的阿里技术发的文,然后就铺天盖地的 git 第一版。
    tao1991123
    tao1991123
    Oct 10, 2020
    2
    git 的第一行代码 怎么会使用 git 进行管理呢?
    luassuns
    luassuns
    Oct 10, 2020 via Android
    3
    @tao1991123 #2 写完第一版后,再一把 commit 就行了呀
    hutusi
    hutusi
    Oct 10, 2020
    4
    @Loserzhu 我也写了一篇:-) 阿里的文章我也看了,但实际上我写的更早一个月,只不过先发在了公司内网里 😪
    codehz
    codehz
    Oct 10, 2020
    5
    然后这玩意被刷了几百条评论
    littlewing
    littlewing
    Oct 10, 2020 via iPhone
    6
    @tao1991123 你这个问题类似于怎么用 go 写 go
    qwerthhusn
    qwerthhusn
    Oct 10, 2020
    7
    鸡与蛋
    la2la
    la2la
    Oct 10, 2020❤️1
    8
    软件更重要是的思路吧,感觉应该把 70%以上的时间放在构建思路上面,而不是实现代码。hadoop 第一版的代码也没有什么高端的操作,但是 map-reduce 的思想有几个能够提出来
    jdhao
    jdhao
    Oct 10, 2020
    9
    事后诸葛亮,如果有人能写,早写出来了,不用等到 Linus 2005 写出来。
    huoru
    huoru
    Oct 10, 2020
    10
    git 实现本来就不难,设计做的比较好。我之前就写过了: https://v2ex.com/t/674356#reply3
    huoru
    huoru
    Oct 10, 2020
    11
    @littlewing 术语叫自举。
    masker
    masker
    Oct 10, 2020 via Android
    12
    马后炮 ,事后诸葛亮挺多的
    BenX
    BenX
    Oct 10, 2020
    13
    呵呵呵,Linux kernel 0.01 也就那样哇
    shm7
    shm7
    Oct 11, 2020
    14
    @ChristopherWu 流皮。
    liangch
    liangch
    Oct 11, 2020
    15
    最早的编译器怎么来的。就是这么来的。
    zjsxwc
    zjsxwc
    Oct 12, 2020
    16
    This is a stupid (but extremely fast) directory content manager. It
    doesn't do a whole lot, but what it _does_ do is track directory
    contents efficiently.

    There are two object abstractions: the "object database", and the
    "current directory cache".

    The Object Database (SHA1_FILE_DIRECTORY)

    The object database is literally just a content-addressable collection
    of objects. All objects are named by their content, which is
    approximated by the SHA1 hash of the object itself. Objects may refer
    to other objects (by referencing their SHA1 hash), and so you can build
    up a hierarchy of objects.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1933 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 02:05 · PVG 10:05 · LAX 18:05 · JFK 21:05
    ♥ Do have faith in what you're doing.