git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: "без имени" <mykaralw@yandex.ru>
Cc: Philip Oakley <philipoakley@iee.email>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: .git/binary
Date: Fri, 25 Oct 2019 23:35:33 +0530	[thread overview]
Message-ID: <20191025180533.ed6du6weja2wfx6c@yadavpratyush.com> (raw)
In-Reply-To: <24796381572021130@iva7-56e9317134d0.qloud-c.yandex.net>

On 25/10/19 07:32PM, без имени wrote:
> > Or were you thinking of some other meaning for "files stored in a single (current) state"?
> 
> It means that new versions of files located in `.git / binary` will completely replace old versions in history, and therefore will be in a single (current) state in history. What used to be another version of this file should be ignored (very useful for PNG, JPEG, PDF).
 
Something like this might have trouble working with checkouts of past 
commits, which is a major reason (at least for me) for using a version 
control system.

Say you have two files marked as "binary" A.png and B.png at commit X. 
Some part of your code references those files. Now let's say you make a 
new commit Y where you remove A.png. You also remove all references to 
A.png in your code since you don't need it anymore. In your suggested 
system, we drop A.png.

Now if you checkout the commit X, A.png does not exist. This means your 
code won't compile or work properly, defeating the purpose of version 
control.

You can argue that "how about we keep deleted files in history, but for 
the files that are modified, we don't keep their history, just the 
latest version?".

For that argument, consider the following: say you have a commit X which 
has A.png. A.png has the dimensions 200x200. You make a new commit Y 
where you make A.png larger, say 400x400.

Now if you checkout X, A.png is still 400x400 since we didn't track its 
history. And so, the behaviour of your software at that point might also 
change, defeating the purpose of version control.

So instead, I'd point you to git-lfs [0]. I haven't personally used the 
tool ever, but it _might_ help in your use case.

[0] https://git-lfs.github.com/

-- 
Regards,
Pratyush Yadav

  reply	other threads:[~2019-10-25 18:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  8:53 .git/binary без имени
2019-10-25 15:10 ` .git/binary Philip Oakley
2019-10-25 16:32   ` .git/binary без имени
2019-10-25 18:05     ` Pratyush Yadav [this message]
2019-10-25 18:27       ` .git/binary без имени
2019-10-25 18:40       ` .git/binary без имени
2019-10-25 20:59     ` .git/binary Philip Oakley
2019-10-25 21:33       ` .git/binary без имени

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

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

  git send-email \
    --in-reply-to=20191025180533.ed6du6weja2wfx6c@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=git@vger.kernel.org \
    --cc=mykaralw@yandex.ru \
    --cc=philipoakley@iee.email \
    /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.
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 NNTP newsgroup(s).