Re: Fwd: what is a snapshot?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



W dniu 2016-06-19 o 16:15, Ovatta Bianca pisze:

> I read in every comparison of git vs other version control systems,
> that git does not record differences but takes "snapshots"
> I was wondering what a "snapshot" is ? Does git store at every commit
> the entire files which have been modified even if only a few bytes
> were changed out of a large file?

There are two things: the conceptual level, and actual storage. On the
conceptual level, object representing revisions (commit) refer to
object representing top directory (tree) of a project, that is a snapshot
of a project state at given revision.

On the storage level, Git has two types of object storage. In "loose"
format (used for new objects), each object is stored as a separate
file. This is not as wasteful as you think: first, there is deduplication,
that is each version of a file is stored only once. Second, contents
(usually text) is stored compressed.

In "packed" format (nowadays Git automatically repacks from "loose"
to "packed" when it looks like it is needed) there is additional
libxdiff-like deltafication. In this format Git stores differences
(well, it also ensures that delta chain doesn't gets too long).

HTH
-- 
Jakub Narębski

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]