threads / discuss / 36079

gc/repack has no option to lose grafted parents

Subject: gc/repack has no option to lose grafted parents

## tl;dr

4 messages between Mar 6, 2014 and Mar 7, 2014.

replies: 3people: 3as markdown or json

Martin Langhoff· Mar 6, 2014, 23:07 UTC · lore

Back in http://git.661346.n2.nabble.com/PATCH-0-2-Make-git-gc-more-robust-with-regard-to-grafts-td3310281.html we got gc/repack to be safer for users who might be shooting themselves in the foot.

Would a patch be welcome to add --discard-grafted-objects ? or --keep-real-parents=idontthinkso ?

cheers,
m
-- 
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff
Junio C Hamano· Mar 6, 2014, 23:26 UTC · re: Martin Langhoff · lore

Re: gc/repack has no option to lose grafted parents

Martin Langhoff <martin.langhoff@gmail.com> writes:
Show 8 quoted lines
> Back in http://git.661346.n2.nabble.com/PATCH-0-2-Make-git-gc-more-robust-with-regard-to-grafts-td3310281.html
> we got gc/repack to be safer for users who might be shooting
> themselves in the foot.
>
> Would a patch be welcome to add --discard-grafted-objects ? or
> --keep-real-parents=idontthinkso ?
>
> cheers,

Given that we in general frown upon long-term use of grafts (or "replace" for that matter), I am not sure if we want to go in that direction.

Just a knee-jerk reaction, though.
Martin Langhoff· Mar 6, 2014, 23:36 UTC · re: Junio C Hamano · lore

Re: gc/repack has no option to lose grafted parents

On Thu, Mar 6, 2014 at 6:26 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> Given that we in general frown upon long-term use of grafts (or
> "replace" for that matter), I am not sure if we want to go in that
> direction.
>
> Just a knee-jerk reaction, though.
Fair enough.

If I state my actual goals -- discarding old, uninteresting history, in a "rolling" fashion? (periodically using a script that says "forget anything older than one month") -- is there a better way?

The repository is not standalone, it receives pushes from hundreds of clients, and gets pulled from a couple of clients. All clients are "in sync", in that will be pulling every hour (vs a "time window" of one month).

At this stage, and with careful management (ie: custom gc scripts) git makes for an excellent async log/report transfer tool. We specially appreciate that it has "deep buffer".

cheers,
m
-- 
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff
Duy Nguyen· Mar 7, 2014, 00:47 UTC · re: Martin Langhoff · lore

Re: gc/repack has no option to lose grafted parents

On Fri, Mar 7, 2014 at 6:36 AM, Martin Langhoff <martin.langhoff@gmail.com> wrote:

Show 12 quoted lines
> On Thu, Mar 6, 2014 at 6:26 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Given that we in general frown upon long-term use of grafts (or
>> "replace" for that matter), I am not sure if we want to go in that
>> direction.
>>
>> Just a knee-jerk reaction, though.
>
> Fair enough.
>
> If I state my actual goals -- discarding old, uninteresting history,
> in a "rolling" fashion? (periodically using a script that says "forget
> anything older than one month") -- is there a better way?

Convert it to a shallow repository? Either you clone it and do "fetch --depth=XXX && prune", or you manipulate $GIT_DIR/shallow directly then prune (no worse than editing grafts, I think).

-- 
Duy

← back to recent threads