* Re: [PATCH 2/4] git-gc: add a --no-verify option to bypass the pre-auto-gc hook [not found] <e755e3fd6b48cd43c61ae6c0c610aaa7b5e166f0.1206929014.git.vmiklos @frugalware.org> @ 2008-04-01 5:02 ` Junio C Hamano 0 siblings, 0 replies; 2+ messages in thread From: Junio C Hamano @ 2008-04-01 5:02 UTC (permalink / raw) To: Miklos Vajna; +Cc: Linus Torvalds, Bj?rn Steinbrink, git Miklos Vajna <vmiklos@frugalware.org> writes: > diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt > index d424a4e..396da5c 100644 > --- a/Documentation/git-gc.txt > +++ b/Documentation/git-gc.txt > @@ -62,6 +62,10 @@ automatic consolidation of packs. > --quiet:: > Suppress all progress reports. > > +--no-verify:: > + This option bypasses the pre-auto-gc hook. > + See also link:hooks.html[hooks]. The purpose of "gc --auto" is not about running it interactively yourself, but to sprinkle calls to it at strategic places in your script. If this option is about disabling the hook temporarily for one-shot, it is not like it is easier to rewrite such script to add --no-verify than actually chmod -x the hook yourself. So I am puzzled what the expected use is for this option. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] git gc --auto: defer on battery
@ 2008-03-30 23:46 Linus Torvalds
2008-03-31 9:36 ` [PATCH 2/4] git-gc: add a --no-verify option to bypass the pre-auto-gc hook Miklos Vajna
0 siblings, 1 reply; 2+ messages in thread
From: Linus Torvalds @ 2008-03-30 23:46 UTC (permalink / raw)
To: Bj?rn Steinbrink; +Cc: Miklos Vajna, Junio C Hamano, git
On Mon, 31 Mar 2008, Bj?rn Steinbrink wrote:
>
> The /proc stuff is already deprecated IIRC, the new file to check on
> Linux is /sys/class/power_supply/AC/online.
I would *seriously* suggest making this soem kind of generic callback and
not Linux-specific.
How about making it more akin to a pre-auto-gc "hook" - run a script
instead of hardcoding something like this!
Linus
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/4] git-gc: add a --no-verify option to bypass the pre-auto-gc hook 2008-03-30 23:46 [PATCH] git gc --auto: defer on battery Linus Torvalds @ 2008-03-31 9:36 ` Miklos Vajna 0 siblings, 0 replies; 2+ messages in thread From: Miklos Vajna @ 2008-03-31 9:36 UTC (permalink / raw) To: Linus Torvalds; +Cc: Bj?rn Steinbrink, Junio C Hamano, git Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> --- Documentation/git-gc.txt | 4 ++++ builtin-gc.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index d424a4e..396da5c 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -62,6 +62,10 @@ automatic consolidation of packs. --quiet:: Suppress all progress reports. +--no-verify:: + This option bypasses the pre-auto-gc hook. + See also link:hooks.html[hooks]. + Configuration ------------- diff --git a/builtin-gc.c b/builtin-gc.c index acd63be..1eca6b2 100644 --- a/builtin-gc.c +++ b/builtin-gc.c @@ -27,6 +27,7 @@ static int aggressive_window = -1; static int gc_auto_threshold = 6700; static int gc_auto_pack_limit = 50; static char *prune_expire = "2.weeks.ago"; +static int no_verify; #define MAX_ADD 10 static const char *argv_pack_refs[] = {"pack-refs", "--all", "--prune", NULL}; @@ -196,7 +197,7 @@ static int need_to_gc(void) else if (!too_many_loose_objects()) return 0; - if (run_hook()) + if (!no_verify && run_hook()) return 0; return 1; } @@ -214,6 +215,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) OPT_BOOLEAN(0, "aggressive", &aggressive, "be more thorough (increased runtime)"), OPT_BOOLEAN(0, "auto", &auto_gc, "enable auto-gc mode"), OPT_BOOLEAN('q', "quiet", &quiet, "suppress progress reports"), + OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-auto-gc hook"), OPT_END() }; -- 1.5.5.rc2.4.g283c6 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-01 5:03 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <e755e3fd6b48cd43c61ae6c0c610aaa7b5e166f0.1206929014.git.vmiklos @frugalware.org> 2008-04-01 5:02 ` [PATCH 2/4] git-gc: add a --no-verify option to bypass the pre-auto-gc hook Junio C Hamano 2008-03-30 23:46 [PATCH] git gc --auto: defer on battery Linus Torvalds 2008-03-31 9:36 ` [PATCH 2/4] git-gc: add a --no-verify option to bypass the pre-auto-gc hook Miklos Vajna
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 NNTP newsgroup(s).