Re: [git-users] Re: How to make pack remote repository on every push?

2016-01-07 Thread Gergely Polonkai
Another solution could be running git-repack. This SO answer[1] has some
nice details on it.

Best,
Gergely

[1] http://stackoverflow.com/a/8638219
On 8 Jan 2016 02:29, "Steinar Bang"  wrote:

> > Gergely Polonkai :
>
> > You may want to play with gc.pruneexpire. From man git-config:
>
> >gc.pruneexpire
> >When git gc is run, it will call prune --expire 2.weeks.ago.
> >Override the grace period with this config variable. The value
> >"now" may be used to disable this grace period and always
> prune
> >unreachable objects immediately.
>
>
> This seemed to work the first time on one of my repositories (the
> longest lived one), so I thought this did the trick, but hasn't worked
> on later pushes, unfortunately...:-/
>
> To summarize:
> I have two different git repositores containing org-mode files.  One of
> these repositories use git+ssh and has a history going back 6 years with
> 708 commits, and one using https and with a history going back 8 months
> and 37 commits.
>
> I have set the values
>  gc.auto=1
>  gc.pruneexpire=now
> on both of the remote repositories and all of their clients (where
> should the values be set? On the remote or on the clients?).
>
> The gc.auto setting has been there for a while with no seeming effect,
> and adding the gc.pruneexpire setting seemed to work on a single push.
>
> (I have the possibility to add a hook on the remote, to compress on every
> push, or alternatively compress using a cron job, but I thought it would
> be more correct if I could convince git to do this on its own)
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: How to make pack remote repository on every push?

2015-11-20 Thread Gergely Polonkai
Hello,

You may want to play with gc.pruneexpire. From man git-config:

   gc.pruneexpire
>When git gc is run, it will call prune --expire 2.weeks.ago.
>Override the grace period with this config variable. The value
>"now" may be used to disable this grace period and always prune
>unreachable objects immediately.


Best,
Gergely

2015-11-19 18:41 GMT+01:00 Steinar Bang :

> > Igor Deyashkin <
> igor.deyashkin-re5jqeeqqe8avxtiumw...@public.gmane.org>:
>
> > What are you expect from git gc in your case?
>
> I didn't *expect* anyhing, but what I *hoped* for was a way for git to
> compress the repository as much as it could on each push.
>
> Ie. compress it as much as what I get when I cd into the bare repo on
> the remote and do a
>  git gc --agressive --prune=now
>
> (which saves quite a bit of space on my org file repos, everytime I've
> tried it)
>
> If I can't get this using git configuration, I can get what I want on
> the remote by creating a cronjob that packs it every night.  But that
> seems like a hack.
>
> Also it won't pack the repos of my work directories.
>
> > Seems like your remote repository havent any garbage commits. Am i not
> > right?
>
> I wasn't so much after the garbage collection, as the repacking.
>
> Thanks!
>
>
> - Steinar
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.