author | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 Nov 2009 05:54:39 +0000 (21:54 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 Nov 2009 05:54:39 +0000 (21:54 -0800) |
* maint:
pack-objects: split implications of --all-progress from progress activation
instaweb: restart server if already running
prune-packed: only show progress when stderr is a tty
Conflicts:
builtin-pack-objects.c
pack-objects: split implications of --all-progress from progress activation
instaweb: restart server if already running
prune-packed: only show progress when stderr is a tty
Conflicts:
builtin-pack-objects.c
index 2e4992970e84a1789cb97d35969976d12e5a30e1..f54d433d36b50184bd83f217c310935d1bbb541f 100644 (file)
SYNOPSIS
--------
[verse]
-'git pack-objects' [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty]
- [--local] [--incremental] [--window=N] [--depth=N] [--all-progress]
+'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied]
+ [--no-reuse-delta] [--delta-base-offset] [--non-empty]
+ [--local] [--incremental] [--window=N] [--depth=N]
[--revs [--unpacked | --all]*] [--stdout | base-name]
[--keep-true-parents] < object-list
--all-progress::
When --stdout is specified then progress report is
- displayed during the object count and deltification phases
+ displayed during the object count and compression phases
but inhibited during the write-out phase. The reason is
that in some cases the output stream is directly linked
to another command which may wish to display progress
report for the write-out phase as well even if --stdout is
used.
+--all-progress-implied::
+ This is used to imply --all-progress whenever progress display
+ is activated. Unlike --all-progress this flag doesn't actually
+ force any progress display by itself.
+
-q::
This flag makes the command not to report its progress
on the standard error stream.
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 4c91e944c21df3d5e02535115cdd6098ee49d86d..4429d53a1e82b81f0a82e34bf2d6ae463aeeadee 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
static const char pack_usage[] =
"git pack-objects [{ -q | --progress | --all-progress }]\n"
+ " [--all-progress-implied]\n"
" [--max-pack-size=N] [--local] [--incremental]\n"
" [--window=N] [--window-memory=N] [--depth=N]\n"
" [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]\n"
{
int use_internal_rev_list = 0;
int thin = 0;
+ int all_progress_implied = 0;
uint32_t i;
const char **rp_av;
int rp_ac_alloc = 64;
progress = 2;
continue;
}
+ if (!strcmp("--all-progress-implied", arg)) {
+ all_progress_implied = 1;
+ continue;
+ }
if (!strcmp("-q", arg)) {
progress = 0;
continue;
if (keep_unreachable && unpack_unreachable)
die("--keep-unreachable and --unpack-unreachable are incompatible.");
+ if (progress && all_progress_implied)
+ progress = 2;
+
prepare_packed_git();
if (progress)
diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c
index be99eb0ac4162411d63d10003fa80e12206b8cc6..f9463deec2f5a5875ee9870e67c990a2fea942db 100644 (file)
--- a/builtin-prune-packed.c
+++ b/builtin-prune-packed.c
int cmd_prune_packed(int argc, const char **argv, const char *prefix)
{
- int opts = VERBOSE;
+ int opts = isatty(2) ? VERBOSE : 0;
const struct option prune_packed_options[] = {
OPT_BIT('n', "dry-run", &opts, "dry run", DRY_RUN),
OPT_NEGBIT('q', "quiet", &opts, "be quiet", VERBOSE),
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index d26997bcfe28f113e3de63b43ecadb812dbd027e..8fffdbf20058e9970af4b5e4a14349ecb4ff455c 100644 (file)
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
*/
const char *argv[] = {
"pack-objects",
- "--all-progress",
+ "--all-progress-implied",
"--revs",
"--stdout",
NULL,
diff --git a/bundle.c b/bundle.c
index df95e151e2e82b48e4f15f2180838bf2d178f923..717a712e9a6c125a684cd4ee39ce5cbfaecef91d 100644 (file)
--- a/bundle.c
+++ b/bundle.c
/* write pack */
argv_pack[0] = "pack-objects";
- argv_pack[1] = "--all-progress";
+ argv_pack[1] = "--all-progress-implied";
argv_pack[2] = "--stdout";
argv_pack[3] = "--thin";
argv_pack[4] = NULL;
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 622a5f0eb25e3420c085d51fd85944ab1286147e..ffc2ab62bca8a93b42d74f6b276b1daa8a846f6f 100755 (executable)
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
}
start_httpd () {
+ if test -f "$fqgitdir/pid"; then
+ say "Instance already running. Restarting..."
+ stop_httpd
+ fi
+
# here $httpd should have a meaningful value
resolve_full_httpd