Merge branch 'master' into next

* master:
  GIT 1.4.3-rc1
  git-pickaxe: allow "-L <something>,+N"
  git-pack-objects progress flag documentation and cleanup
  remove an unneeded test
This commit is contained in:
Junio C Hamano
2006-11-07 16:36:22 -08:00
5 changed files with 47 additions and 12 deletions

View File

@@ -99,6 +99,23 @@ base-name::
Only create a packed archive if it would contain at
least one object.
--progress::
Progress status is reported on the standard error stream
by default when it is attached to a terminal, unless -q
is specified. This flag forces progress status even if
the standard error stream is not directed to a terminal.
--all-progress::
When --stdout is specified then progress report is
displayed during the object count and deltification 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
status of its own as it processes incoming pack data.
This flag is like --progress except that it forces progress
report for the write-out phase as well even if --stdout is
used.
-q::
This flag makes the command not to report its progress
on the standard error stream.

View File

@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=v1.4.3.GIT
DEF_VER=v1.4.4-rc1.GIT
LF='
'

View File

@@ -15,7 +15,12 @@
#include <sys/time.h>
#include <signal.h>
static const char pack_usage[] = "git-pack-objects [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] [--all-progress] [--revs [--unpacked | --all]*] [--stdout | base-name] <ref-list | <object-list]";
static const char pack_usage[] = "\
git-pack-objects [{ -q | --progress | --all-progress }] \n\
[--local] [--incremental] [--window=N] [--depth=N] \n\
[--no-reuse-delta] [--delta-base-offset] [--non-empty] \n\
[--revs [--unpacked | --all]*] [--stdout | base-name] \n\
[<ref-list | <object-list]";
struct object_entry {
unsigned char sha1[20];
@@ -1520,14 +1525,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
local = 1;
continue;
}
if (!strcmp("--progress", arg)) {
progress = 1;
continue;
}
if (!strcmp("--all-progress", arg)) {
progress = 2;
continue;
}
if (!strcmp("--incremental", arg)) {
incremental = 1;
continue;
@@ -1550,6 +1547,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
progress = 1;
continue;
}
if (!strcmp("--all-progress", arg)) {
progress = 2;
continue;
}
if (!strcmp("-q", arg)) {
progress = 0;
continue;

View File

@@ -1545,6 +1545,25 @@ static const char *parse_loc(const char *spec,
regex_t regexp;
regmatch_t match[1];
/* Allow "-L <something>,+20" to mean starting at <something>
* for 20 lines, or "-L <something>,-5" for 5 lines ending at
* <something>.
*/
if (1 < begin && (spec[0] == '+' || spec[0] == '-')) {
num = strtol(spec + 1, &term, 10);
if (term != spec + 1) {
if (spec[0] == '-')
num = 0 - num;
if (0 < num)
*ret = begin + num - 2;
else if (!num)
*ret = begin;
else
*ret = begin + num;
return term;
}
return spec;
}
num = strtol(spec, &term, 10);
if (term != spec) {
*ret = num;

View File

@@ -102,8 +102,6 @@ static void wt_status_print_updated_cb(struct diff_queue_struct *q,
struct wt_status *s = data;
int shown_header = 0;
int i;
if (q->nr) {
}
for (i = 0; i < q->nr; i++) {
if (q->queue[i]->status == 'U')
continue;