[lkml]   [2005]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: more git updates..
    Useful explanation - thanks, Linus.

    Is this picture and description accurate:


    < working directory files (foo.c) >
    ^ |
    | upward ops | downward ops |
    | ---------- | ------------ |
    | checkout-cache | update-cache |
    | show-diff | v
    < current directory cache (".dircache/index") >
    ^ |
    | upward ops | downward ops |
    | ---------- | ------------ |
    | read-tree | write-tree |
    | | commit-tree |
    | v
    < git filesystem (blobs, trees, commits: .dircache/{HEAD,objects}) >


    The checkout-cache and show-diff ops read their meta-data from
    the cache, and the actual file contents from the git filesystem.
    Similary, the update-cache op writes meta-data into the cache,
    and may create new files in the git filesystem.

    The cache (but not the git filesystem) stores transient
    information (ctime, mtime, dev, ino, uid, gid, and size)
    about each working file update-cache has copied into the git
    filesystem so that checkout-cache and show-diff can detect
    changes in the contents of working files just from a stat,
    without actually rereading the file.

    In some sense, the cache holds the git filesystem inodes,
    and the git filesystem holds the data blocks. Except that:
    (1) the cache just holds the current "view" into the git
    (2) objects in the filesystem have an "inode" number (their
    <sha1> value) that is persistent whether in view or not,
    (3) objects in the filesystem are not removed just because
    nothing in the cache references them,
    (4) objects in the filesystem can reference other objects,
    that are typically also in the filesystem, but that can
    still be reliably self-identified even if found in the
    wild of say one's email inbox, and
    (5) the view in the directory cache can itself be made into
    a filesystem object - using commit-tree.


    Minor question:

    I must have an old version - I got 'git-0.03', but
    it doesn't have 'checkout-cache', and its 'read-tree'
    directly writes my working files.

    How do I get a current version? Well, one way I see,
    and that's to pick up Pasky's:

    Perhaps that's the best way?

    I won't rest till it's the best ...
    Programmer, Linux Scalability
    Paul Jackson <> 1.650.933.1373, 1.925.600.0401
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-04-11 01:21    [W:0.025 / U:28.868 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site