Skip to content

Commit

Permalink
Merge branch 'jc/pack'
Browse files Browse the repository at this point in the history
* jc/pack:
  pack-objects: document --revs, --unpacked and --all.
  pack-objects --unpacked=<existing pack> option.
  pack-objects: further work on internal rev-list logic.
  pack-objects: run rev-list equivalent internally.
  Separate object listing routines out of rev-list
  • Loading branch information
Junio C Hamano committed Sep 18, 2006
2 parents 2874172 + 4321134 commit 4405fb7
Show file tree
Hide file tree
Showing 12 changed files with 432 additions and 225 deletions.
21 changes: 20 additions & 1 deletion Documentation/git-pack-objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SYNOPSIS
[verse]
'git-pack-objects' [-q] [--no-reuse-delta] [--non-empty]
[--local] [--incremental] [--window=N] [--depth=N]
{--stdout | base-name} < object-list
[--revs [--unpacked | --all]*] [--stdout | base-name] < object-list


DESCRIPTION
Expand Down Expand Up @@ -56,6 +56,24 @@ base-name::
Write the pack contents (what would have been written to
.pack file) out to the standard output.

--revs::
Read the revision arguments from the standard input, instead of
individual object names. The revision arguments are processed
the same way as gitlink:git-rev-list[1] with `--objects` flag
uses its `commit` arguments to build the list of objects it
outputs. The objects on the resulting list are packed.

--unpacked::
This implies `--revs`. When processing the list of
revision arguments read from the standard input, limit
the objects packed to those that are not already packed.

--all::
This implies `--revs`. In addition to the list of
revision arguments read from the standard input, pretend
as if all refs under `$GIT_DIR/refs` are specifed to be
included.

--window and --depth::
These two options affects how the objects contained in
the pack are stored using delta compression. The
Expand Down Expand Up @@ -103,6 +121,7 @@ Documentation by Junio C Hamano

See Also
--------
gitlink:git-rev-list[1]
gitlink:git-repack[1]
gitlink:git-prune-packed[1]

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ XDIFF_LIB=xdiff/lib.a

LIB_H = \
archive.h blob.h cache.h commit.h csum-file.h delta.h \
diff.h object.h pack.h pkt-line.h quote.h refs.h sideband.h \
diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \
run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h

Expand All @@ -252,7 +252,7 @@ LIB_OBJS = \
server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \
write_or_die.o trace.o \
write_or_die.o trace.o list-objects.o \
alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
color.o wt-status.o

Expand Down
2 changes: 1 addition & 1 deletion builtin-count-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose,
hex[40] = 0;
if (get_sha1_hex(hex, sha1))
die("internal error");
if (has_sha1_pack(sha1))
if (has_sha1_pack(sha1, NULL))
(*packed_loose)++;
}
}
Expand Down
Loading

0 comments on commit 4405fb7

Please sign in to comment.