git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jakub Narębski" <jnareb@gmail.com>
To: Ovatta Bianca <ovattabianca@gmail.com>, git@vger.kernel.org
Subject: Re: Fwd: what is a snapshot?
Date: Wed, 29 Jun 2016 21:28:52 +0200	[thread overview]
Message-ID: <57742174.9020309@gmail.com> (raw)
In-Reply-To: <CAHWPVgMWeHoD5vTiFJ1gsm2hS74LK7j4npVVbOZeR43cX3qWXw@mail.gmail.com>

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


      parent reply	other threads:[~2016-06-29 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHWPVgNrTEw9FmW6K7QucgA74QWsTKfxZGt+mGd099k+O7O+rw@mail.gmail.com>
2016-06-19 14:15 ` Fwd: what is a snapshot? Ovatta Bianca
2016-06-19 15:20   ` Philip Oakley
2016-06-24 15:36     ` Jeff King
2016-06-29 19:28   ` Jakub Narębski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57742174.9020309@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ovattabianca@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).