While examining the documentation for git attributes I came across 
something intrigueing:

https://git-scm.com/docs/gitattributes

Defining a custom hunk-header 

The following built in patterns are available:

pascal suitable for source code in the Pascal/Delphi language. 

Defining an external diff driver

Here is also an example of somebody who set this up:

https://github.com/alexkaratarakis/gitattributes/blob/master/Pascal.gitattributes


What are the adventages of using custom chunk headers ? and custom diff 
drivers ?

One of my main interests in this is that it might be helpfull for 
implementing "splitting/merging" of files.

My current idea is to create a utility which merges splitted files back 
into a big one.
Then merge changes from original source back into big one.
Then use a second utility to split the big one back into splitted files.

The second utility needs to scan the big file for "headers". The first 
utility should insert these "headers".
Plus some links would need to be defined for example:
BigOne -> SmallA
BigOne -> SmallB
BigOne -> SmallC

So that both merge and split know how to do their work.

Perhaps git already has some of the features necessary to make this work.

Perhaps git already has a full feature that can work like this ?

If not then perhaps these chunk headers can help ? and perhaps git has some 
links inside of it ?

Is it possible to tell git that one big file is linked/splitted into 
multiple files with "plumbing commands" ?

I have not looked/studied at the git source codes but perhaps I will 
sometime in future.

Any hyperlink to git sources is also welcome in case it's hard to find with 
google or something :) Haven't tried yet.

I did try to find information about git diff drivers, not much out 
there...  same for git custom chunk headers... 

So some more information/help/tutorial/explanation about this and why it's 
usefull or what the adventages would be would be great !

Also any disadventages would also be interestng !

Bye for now,
  Skybuck.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/7e2d53ba-0172-4075-97c3-7e6bb5eece42n%40googlegroups.com.

Reply via email to