git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* .git/binary
@ 2019-10-25  8:53 без имени
  2019-10-25 15:10 ` .git/binary Philip Oakley
  0 siblings, 1 reply; 8+ messages in thread
From: без имени @ 2019-10-25  8:53 UTC (permalink / raw)
  To: git

Is it possible to add a `.git/binary` configuration file like` .gitignore` to the `git` system with a list of files stored in a single (current) state.

-- 
zvezdochiot


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25  8:53 .git/binary без имени
@ 2019-10-25 15:10 ` Philip Oakley
  2019-10-25 16:32   ` .git/binary без имени
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Oakley @ 2019-10-25 15:10 UTC (permalink / raw)
  To: без имени, git

Hi zvezdochiot,
On 25/10/2019 09:53, без имени wrote:
> Is it possible to add a `.git/binary` configuration file like` .gitignore` to the `git` system with a list of files stored in a single (current) state.
>
Have you looked at the `git help attributes`?
In particular the example

*.jpg		-text

Where the '-text' says no end of lines for conversion (i.e. binary!)


Or were you thinking of some other meaning for "files stored in a single (current) state"?

-- 
Philip


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25 15:10 ` .git/binary Philip Oakley
@ 2019-10-25 16:32   ` без имени
  2019-10-25 18:05     ` .git/binary Pratyush Yadav
  2019-10-25 20:59     ` .git/binary Philip Oakley
  0 siblings, 2 replies; 8+ messages in thread
From: без имени @ 2019-10-25 16:32 UTC (permalink / raw)
  To: Philip Oakley, git@vger.kernel.org

> 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).

-- 
Территория без имени


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25 16:32   ` .git/binary без имени
@ 2019-10-25 18:05     ` Pratyush Yadav
  2019-10-25 18:27       ` .git/binary без имени
  2019-10-25 18:40       ` .git/binary без имени
  2019-10-25 20:59     ` .git/binary Philip Oakley
  1 sibling, 2 replies; 8+ messages in thread
From: Pratyush Yadav @ 2019-10-25 18:05 UTC (permalink / raw)
  To: без имени
  Cc: Philip Oakley, git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25 18:05     ` .git/binary Pratyush Yadav
@ 2019-10-25 18:27       ` без имени
  2019-10-25 18:40       ` .git/binary без имени
  1 sibling, 0 replies; 8+ messages in thread
From: без имени @ 2019-10-25 18:27 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Philip Oakley, git@vger.kernel.org

> Something like this might have trouble working with checkouts of past
> commits

This is a conscious step that is taken exactly there and only where there is a need for it. For example, `doc/*.png, doc/*.jpg, doc/*.pdf`.

-- 
zvezdochiot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25 18:05     ` .git/binary Pratyush Yadav
  2019-10-25 18:27       ` .git/binary без имени
@ 2019-10-25 18:40       ` без имени
  1 sibling, 0 replies; 8+ messages in thread
From: без имени @ 2019-10-25 18:40 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Philip Oakley, git@vger.kernel.org

> 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.

Good. If such a mechanism seems too problematic for you, then suggest another mechanism for resetting the history of a specific file. Alternatives are even more problematic. If the file placed in the list I proposed will go into the git history only as a link without checking and calculating the amounts, then isolating the file included in the history will change all the amounts.

-- 
zvezdochiot


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25 16:32   ` .git/binary без имени
  2019-10-25 18:05     ` .git/binary Pratyush Yadav
@ 2019-10-25 20:59     ` Philip Oakley
  2019-10-25 21:33       ` .git/binary без имени
  1 sibling, 1 reply; 8+ messages in thread
From: Philip Oakley @ 2019-10-25 20:59 UTC (permalink / raw)
  To: без имени,
	git@vger.kernel.org

On 25/10/2019 17:32, без имени 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).
>
"completely replace old versions in history" : but why?
- Is it a space (size on disc, or memory) problem/limitation
- A confidentiality problem?
- A 'must use latest procedure' (always checkout latest instructions) 
problem?
- A synchronisation problem (no adequate diff) needing single line of 
development? (there was a discussion at Git Merge in February about this 
for modified Audio-Visual (AV) files in Games development

“Git for games: current problems and solutions” presentation by John
Austin at Git Merge 2019:
   https://www.youtube.com/watch?v=K3zOhU3NdWA&list=PL0lo9MOBetEFqBue4vNcTEnkBjgIQU1Q3&index=8&t=0s

- Something else?


The main advantage of Git is that it distributes control from some central 'manager' to the individual and does that by taking snapshots and exchanging verification stamps, so the idea of deleting history feels somehow 'wrong', hence the need to understand

-- 
Philip


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: .git/binary
  2019-10-25 20:59     ` .git/binary Philip Oakley
@ 2019-10-25 21:33       ` без имени
  0 siblings, 0 replies; 8+ messages in thread
From: без имени @ 2019-10-25 21:33 UTC (permalink / raw)
  To: Philip Oakley, git@vger.kernel.org

> The main advantage of Git is that it distributes control from some central 'manager' to the individual and does that by taking snapshots and exchanging verification stamps, so the idea of deleting history feels somehow 'wrong', hence the need to understand

I perfectly understand that by removing information about the file and its changes from the history, I will “delete” it completely. Git needs changes to work. That means you will need an additional utility file, for example, `.gitshadow`, containing the sum of the files in the list. And this service file will already be reflected in the history. Moreover, it must be to process in a special way.
What is this "all" for?
Too much that is in `git` is completely useless to anyone. This mechanism (if it is implemented) will not be needed by everyone, but those who need it will be very gracious for freeing useless the mountains of  trash.

-- 
zvezdochiot


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-25 21:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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     ` .git/binary Pratyush Yadav
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 без имени

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).