mirror of
https://github.com/git/git.git
synced 2024-11-23 09:56:28 +08:00
Merge branch 'maint'
* 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
This commit is contained in:
commit
75a7ea258c
@ -9,8 +9,9 @@ git-pack-objects - Create a packed archive of objects
|
||||
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
|
||||
|
||||
@ -137,7 +138,7 @@ base-name::
|
||||
|
||||
--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
|
||||
@ -146,6 +147,11 @@ base-name::
|
||||
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.
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
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"
|
||||
@ -2124,6 +2125,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
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;
|
||||
@ -2223,6 +2225,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
|
||||
progress = 2;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp("--all-progress-implied", arg)) {
|
||||
all_progress_implied = 1;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp("-q", arg)) {
|
||||
progress = 0;
|
||||
continue;
|
||||
@ -2326,6 +2332,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
|
||||
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)
|
||||
|
@ -71,7 +71,7 @@ void prune_packed_objects(int opts)
|
||||
|
||||
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),
|
||||
|
@ -40,7 +40,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
|
||||
*/
|
||||
const char *argv[] = {
|
||||
"pack-objects",
|
||||
"--all-progress",
|
||||
"--all-progress-implied",
|
||||
"--revs",
|
||||
"--stdout",
|
||||
NULL,
|
||||
|
2
bundle.c
2
bundle.c
@ -351,7 +351,7 @@ int create_bundle(struct bundle_header *header, const char *path,
|
||||
|
||||
/* 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;
|
||||
|
@ -73,6 +73,11 @@ resolve_full_httpd () {
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user