Re: Adding git hooks

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Sat, Apr 26, 2014 at 10:24:50AM -0700, Junio C Hamano wrote:
>
>> Suvorov Ivan <sv_91@xxxxxxxx> writes:
>> 
>> > I want to extend the functionality of git due to the possibility of
>> > separation of the user repository into 2 parts - one part will be
>> > stored as usual, under version control git, and the second part will
>> > be stored in another location such as an FTP-server.
>> 
>> Sounds like you are looking for git-annex, perhaps?
>
> I agree that is the right approach, but git-annex and git-media work
> _above_ the object layer, and taint the history by storing symlinks in
> git instead of the real sha1s. I'd love to see a solution that does the
> same thing, but lives at the pack/loose object layer. Basically:
>
>   1. Teach sha1-file.c to look for missing objects by hitting an
>      external script, like:
>
>         git config odb.command "curl https://example.com/%s";
>
>      and place them in an alternates-like separate object database.
>
>   2. Teach the git protocol a new extension to say "don't bother sending
>      blobs over size X". You'd have to coordinate that X with the source
>      from your odb.command.

Yes, I'd love to see something along that line in the longer term,
showing all the objects as just regular objects under the hood, with
implementation details hidden in the object layer (just like there
is no distinction between packed and loose objects from the point of
view of read_sha1_file() users), as a real solution to address
issues in larger trees.

Also see http://thread.gmane.org/gmane.comp.version-control.git/241940
where Shawn had an interesting experiment.

> You'd probably want to wrap up the odb.command in a more fancy helper.
> For example, for performance, we'd probably want to be able to query it
> for "which objects do you have", as well as "fetch this object". And it
> would be nice if it could auto-query the "X" for step 2, and manage
> pruning local objects (e.g., when they become deep in history).
>
> We'd probably also want to teach a few places in git to treat external
> objects specially. For example, they should probably be auto-treated as
> binary, so that a "log -p" does not try to fetch all of them. And
> likewise, things like "log -S" should probably ignore them by default.
>
> I have a messy sketch of step 1 that I did quite a while ago, but
> haven't proceeded further on it.
--
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]