Skip to contentSkip to conversation

Rebase max-pack-size?

DISCUSSION Dana How 2 participants 4 messages Jun 15, 2016 Documentation

lore
Share & tools
lore

Dana How

author
#0 lore raw
Quoted 5 lines · Junio C Hamano
Quoted 4 lines · Dana How

Since max-pack-size has appeared, and disappeard, in "pu" twice and never made it into "next", I'm guessing I should rebase/merge it on top of the other recent pack-objects work. I may get to this tonight; perhaps I'll send the patchset in one email with multiple attachments?

Quoted 7 lines

I am still holding onto the series on its own topic branch, but merging it to 'pu' and resolving conflicts seem pointless while I am (and hopefully the rest of the list ought to be ;-) primarily concentrating on last-minute bugfixes in preparation for v1.5.2.

A rebase to be queued in 'next' would be good, though.

Yes, the conflicts were extensive.
The rebased patches are attached.
Let me know if you want them re-sent inline and/or separately.

Thanks

Dana

Quoted 1 line

From 781820f147bcb12dae576734585b27f42faca3ea Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 11:28:19 -0700
Subject: [PATCH] Alter sha1close() 3rd argument to request flush only

update=0 suppressed writing the final SHA-1 but was not used. Now final=0 suppresses SHA-1 finalization, SHA-1 writing, and closing -- in other words, only flush the buffer.

---
 csum-file.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
csum-file.c +5 -3
index 7088f6e..5109342 100644
@@ -29,18 +29,20 @@ static void sha1flush(struct sha1file *f, unsigned int count)
 	}
 }
 
-int sha1close(struct sha1file *f, unsigned char *result, int update)
+int sha1close(struct sha1file *f, unsigned char *result, int final)
 {
 	unsigned offset = f->offset;
 	if (offset) {
 		SHA1_Update(&f->ctx, f->buffer, offset);
 		sha1flush(f, offset);
+		f->offset = 0;
 	}
+	if (!final)
+		return 0;	/* only want to flush (no checksum write, no close) */
 	SHA1_Final(f->buffer, &f->ctx);
 	if (result)
 		hashcpy(result, f->buffer);
-	if (update)
-		sha1flush(f, 20);
+	sha1flush(f, 20);
 	if (close(f->fd))
 		die("%s: sha1 file error on close (%s)", f->name, strerror(errno));
 	free(f);
Signature · 1 line
1.5.2.rc3.726.g279d
Quoted 1 line

From 0c75fd66aa6a758e245d85b9304e85a38e977f94 Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 11:34:56 -0700
Subject: [PATCH 1/4] git-repack --max-pack-size: new file statics and code restructuring

Add "pack_size_limit", the limit specified by --max-pack-size, "written_list", the list of objects written to the current pack, and "nr_written", the number of objects in written_list. Put "base_name" at file scope again and add forward declarations. Move write_index_file() call from cnd_pack_objects() to write_pack_file() since only the latter will know how many times to call write_index_file().

---
 builtin-pack-objects.c |   68 +++++++++++++++++++++++++----------------------
 1 files changed, 36 insertions(+), 32 deletions(-)
builtin-pack-objects.c +36 -32

107 lines not on this page · raw message

Signature · 1 line
1.5.2.rc3.726.g279d
Quoted 1 line

From 40ac2f294ec68cae27f8a9262db4cab84f1d2257 Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 12:06:18 -0700
Subject: [PATCH 2/4] git-repack --max-pack-size: write_{object,one}() respect pack limit

With --max-pack-size, generate the appropriate write limit for each object and check against it before each group of writes. Update delta usability rules to handle base being in a previously- written pack. Inline sha1write_compress() so we know the exact size of the written data when it needs to be compressed. Detect and return write "failure".

---
 builtin-pack-objects.c |  131 ++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 104 insertions(+), 27 deletions(-)
builtin-pack-objects.c +104 -27

216 lines not on this page · raw message

Signature · 1 line
1.5.2.rc3.726.g279d
Quoted 1 line

From 9ec3af1f52f41d0737b6271fded5e94527eb0466 Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 12:09:16 -0700
Subject: [PATCH 3/4] git-repack --max-pack-size: split packs as asked by write_{object,one}()

Rewrite write_pack_file() to break to a new packfile whenever write_object/write_one request it, and correct the header's object count in the previous packfile. Change write_index_file() to write an index
for just the objects in the most recent packfile.

---
 builtin-pack-objects.c |  120 ++++++++++++++++++++++++++++-------------------
 1 files changed, 71 insertions(+), 49 deletions(-)
builtin-pack-objects.c +71 -49

177 lines not on this page · raw message

Signature · 1 line
1.5.2.rc3.726.g279d
Quoted 1 line

From 279d1f9e0e7265c6ccf8759bbe8c5539bf3089fa Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 12:47:09 -0700
Subject: [PATCH 4/4] git-repack --max-pack-size: add option parsing to enable feature

Add --max-pack-size parsing and usage messages. Upgrade git-repack.sh to handle multiple packfile names, and build packfiles in GIT_OBJECT_DIRECTORY not GIT_DIR. Update documentation.

---
 Documentation/git-pack-objects.txt |    5 +++++
 Documentation/git-repack.txt       |    5 +++++
 builtin-pack-objects.c             |    9 ++++++++-
 git-repack.sh                      |   14 ++++++++------
 4 files changed, 26 insertions(+), 7 deletions(-)
Documentation/git-pack-objects.txt +5 -0
index 2531238..cfe127a 100644
@@ -85,6 +85,11 @@ base-name::
 	times to get to the necessary object.
 	The default value for --window is 10 and --depth is 50.
 
+--max-pack-size=<n>::
+	Maximum size of each output packfile, expressed in MiB.
+	If specified,  multiple packfiles may be created.
+	The default is unlimited.
+
 --incremental::
 	This flag causes an object already in a pack ignored
 	even if it appears in the standard input.
Documentation/git-repack.txt +5 -0
index cc3b0b2..2847c9b 100644
@@ -65,6 +65,11 @@ OPTIONS
 	to be applied that many times to get to the necessary object.
 	The default value for --window is 10 and --depth is 50.
 
+--max-pack-size=<n>::
+	Maximum size of each output packfile, expressed in MiB.
+	If specified,  multiple packfiles may be created.
+	The default is unlimited.
+
 
 Configuration
 -------------
builtin-pack-objects.c +8 -1
index ce9eb2d..930b57a 100644
@@ -15,7 +15,7 @@
 #include "progress.h"
 
 static const char pack_usage[] = "\
-git-pack-objects [{ -q | --progress | --all-progress }] \n\
+git-pack-objects [{ -q | --progress | --all-progress }] [--max-pack-size=N] \n\
 	[--local] [--incremental] [--window=N] [--depth=N] \n\
 	[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset] \n\
 	[--non-empty] [--revs [--unpacked | --all]*] [--reflog] \n\
@@ -1713,6 +1713,13 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
 			pack_compression_level = level;
 			continue;
 		}
+		if (!prefixcmp(arg, "--max-pack-size=")) {
+			char *end;
+			pack_size_limit = strtoul(arg+16, &end, 0) * 1024 * 1024;
+			if (!arg[16] || *end)
+				usage(pack_usage);
+			continue;
+		}
 		if (!prefixcmp(arg, "--window=")) {
 			char *end;
 			window = strtoul(arg+9, &end, 0);
git-repack.sh +8 -6
index 8bf66a4..4ea6e5b 100755
@@ -3,7 +3,7 @@
 # Copyright (c) 2005 Linus Torvalds
 #
 
-USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]'
+USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--max-pack-size=N] [--window=N] [--depth=N]'
 SUBDIRECTORY_OK='Yes'
 . git-sh-setup
 
@@ -18,6 +18,7 @@ do
 	-q)	quiet=-q ;;
 	-f)	no_reuse=--no-reuse-object ;;
 	-l)	local=--local ;;
+	--max-pack-size=*) extra="$extra $1" ;;
 	--window=*) extra="$extra $1" ;;
 	--depth=*) extra="$extra $1" ;;
 	*)	usage ;;
@@ -35,7 +36,7 @@ true)
 esac
 
 PACKDIR="$GIT_OBJECT_DIRECTORY/pack"
-PACKTMP="$GIT_DIR/.tmp-$$-pack"
+PACKTMP="$GIT_OBJECT_DIRECTORY/.tmp-$$-pack"
 rm -f "$PACKTMP"-*
 trap 'rm -f "$PACKTMP"-*' 0 1 2 3 15
 
@@ -62,11 +63,12 @@ case ",$all_into_one," in
 esac
 
 args="$args $local $quiet $no_reuse$extra"
-name=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
+names=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
 	exit 1
-if [ -z "$name" ]; then
+if [ -z "$names" ]; then
 	echo Nothing new to pack.
-else
+fi
+for name in $names ; do
 	chmod a-w "$PACKTMP-$name.pack"
 	chmod a-w "$PACKTMP-$name.idx"
 	if test "$quiet" != '-q'; then
@@ -92,7 +94,7 @@ else
 		exit 1
 	}
 	rm -f "$PACKDIR/old-pack-$name.pack" "$PACKDIR/old-pack-$name.idx"
-fi
+done
 
 if test "$remove_redundant" = t
 then
Signature · 1 line
1.5.2.rc3.726.g279d
#1 lore raw
Quoted 1 line · Dana How

Let me know if you want them re-sent inline and/or separately.

Recently Linus was very unhappy on the kernel list when somebody forwarded bunch of patches in a single message, saying we do reviews one patch per message (and we do not do attachments).

I haven't been very strict about that kind of formality, as I haven't felt the need too much so far. Let's see how well we can do this with this message, which has 5 patches.

----------------------------------------------------------------

Quoted 10 lines
Quoted 1 line

From 781820f147bcb12dae576734585b27f42faca3ea Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 11:28:19 -0700
Subject: [PATCH] Alter sha1close() 3rd argument to request flush only

update=0 suppressed writing the final SHA-1 but was not used. Now final=0 suppresses SHA-1 finalization, SHA-1 writing, and closing -- in other words, only flush the buffer.

What it does is understandable but it somehow feels funny that "sha1close(file, hashresult, 0)" does _not_ close it (and does not hash either for obvious reasons ;-). I would say we should let it pass this round, but might want to separate the first part out into a separate "update hash and flush" function if we get more callers.

----------------------------------------------------------------

Quoted 13 lines
Quoted 1 line

From 0c75fd66aa6a758e245d85b9304e85a38e977f94 Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 11:34:56 -0700
Subject: [PATCH 1/4] git-repack --max-pack-size: new file statics and code restructuring

Add "pack_size_limit", the limit specified by --max-pack-size, "written_list", the list of objects written to the current pack, and "nr_written", the number of objects in written_list. Put "base_name" at file scope again and add forward declarations. Move write_index_file() call from cnd_pack_objects() to write_pack_file() since only the latter will know how many times to call write_index_file().

Quoted 1 line

I would have split this part a bit differently.

This is mostly about restructuring the code so that write_index_file() is called from write_pack_file(), which by itself is a very good change (but then we might have been better off passing basename as a parameter).

You are not using written_list nor limit yet but are introducing them in this step, which feels not quite right. I usually compile stuff with -Werror, and if I ever have to bisect the series, this would bomb out for these unused variables. Not nice.

----------------------------------------------------------------

Quoted 12 lines
Quoted 1 line

From 40ac2f294ec68cae27f8a9262db4cab84f1d2257 Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 12:06:18 -0700
Subject: [PATCH 2/4] git-repack --max-pack-size: write_{object,one}() respect pack limit

With --max-pack-size, generate the appropriate write limit for each object and check against it before each group of writes. Update delta usability rules to handle base being in a previously- written pack. Inline sha1write_compress() so we know the exact size of the written data when it needs to be compressed. Detect and return write "failure".

Quoted 4 lines
---
 builtin-pack-objects.c |  131 ++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 104 insertions(+), 27 deletions(-)

Again, this is split somewhat wrongly, as you do not have a way to set max size from the caller, but more importantly, even though write_one and write_object knows to obey the limit (perhaps somebody bisecting this series later may set the limit under the debugger, to work around the lack of option parser), write_pack_file() does not notice zero return from write_one(); I would have added a check there to do:

die("sorry, limit reached and we do not have code to split the pack yet.")

which obviously can be updated in the next patch.

----------------------------------------------------------------

Quoted 33 lines
Quoted 1 line

From 9ec3af1f52f41d0737b6271fded5e94527eb0466 Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 12:09:16 -0700
Subject: [PATCH 3/4] git-repack --max-pack-size: split packs as asked by write_{object,one}()

Rewrite write_pack_file() to break to a new packfile whenever write_object/write_one request it, and correct the header's object count in the previous packfile. Change write_index_file() to write an index
for just the objects in the most recent packfile.

---
 builtin-pack-objects.c |  120 ++++++++++++++++++++++++++++-------------------
 1 files changed, 71 insertions(+), 49 deletions(-)
builtin-pack-objects.c +8 -0
index 3023aac..ce9eb2d 100644
...
@@ -652,7 +663,26 @@ static void write_pack_file(void)
 				die("unable to rename temporary index file: %s",
 				    strerror(errno));
 			puts(sha1_to_hex(object_list_sha1));
+		}
+
+		/* mark written objects as written to previous pack */
+		for (j = 0; j < nr_written; j++) {
+			written_list[j]->offset = (off_t)-1;
+		}
+		nr_remaining -= nr_written;
+	} while (nr_remaining && i < nr_objects);

builtin-pack-objects.c static void write_pack_file(void) · line 683

Quoted 10 lines
builtin-pack-objects.c +9 -0
+
+	free(written_list);
+	if (do_progress)
+		stop_progress(&progress_state);
+	if (written != nr_result)
+		die("wrote %u objects while expecting %u", written, nr_result);
+	for (j = 0; i < nr_objects; i++) {
+		struct object_entry *e = objects + i;
+		j += !e->offset && !e->preferred_base;
 	}

I am a bit confused by this loop. Don't you have to start with i=0 for this check to be meaningful?

builtin-pack-objects.c static void write_pack_file(void) · line 686

Quoted 3 lines
builtin-pack-objects.c +2 -0
+	if (j)
+		die("wrote %u objects as expected but %u unwritten", written, j);
 }

----------------------------------------------------------------

Quoted 26 lines
Quoted 1 line

From 279d1f9e0e7265c6ccf8759bbe8c5539bf3089fa Mon Sep 17 00:00:00 2001

From: Dana L. How <[email protected]>
Date: Sun, 13 May 2007 12:47:09 -0700
Subject: [PATCH 4/4] git-repack --max-pack-size: add option parsing to enable feature

Add --max-pack-size parsing and usage messages. Upgrade git-repack.sh to handle multiple packfile names, and build packfiles in GIT_OBJECT_DIRECTORY not GIT_DIR. Update documentation.

---
 Documentation/git-pack-objects.txt |    5 +++++
 Documentation/git-repack.txt       |    5 +++++
 builtin-pack-objects.c             |    9 ++++++++-
 git-repack.sh                      |   14 ++++++++------
 4 files changed, 26 insertions(+), 7 deletions(-)
builtin-pack-objects.c +0 -0
index ce9eb2d..930b57a 100644
...
@@ -1713,6 +1713,13 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
 			pack_compression_level = level;
 			continue;
 		}

builtin-pack-objects.c int cmd_pack_objects(int argc, const char **argv, const char *prefix) · line 1725

Quoted 10 lines
builtin-pack-objects.c +7 -0
+		if (!prefixcmp(arg, "--max-pack-size=")) {
+			char *end;
+			pack_size_limit = strtoul(arg+16, &end, 0) * 1024 * 1024;
+			if (!arg[16] || *end)
+				usage(pack_usage);
+			continue;
+		}
 		if (!prefixcmp(arg, "--window=")) {
 			char *end;
 			window = strtoul(arg+9, &end, 0);

Hmmm. I was almost going to suggest to have this spelled in bytes, with suffixes like k/m/g. However, because wanting to limit a pack under 1.4MB does not make much sense these days, and because having to spell "up to 2GB" as 2047 is not too much trouble, I think this is Ok.

Shouldn't we have a safety to error out when --stdout and --max-pack-size are both given? Currently it silently ignores the limit, doesn't it?

Quoted 6 lines
git-repack.sh +0 -0
index 8bf66a4..4ea6e5b 100755
...

git-repack.sh true) · line 42

Quoted 8 lines
git-repack.sh +1 -1
@@ -35,7 +36,7 @@ true)
 esac
 
 PACKDIR="$GIT_OBJECT_DIRECTORY/pack"
-PACKTMP="$GIT_DIR/.tmp-$$-pack"
+PACKTMP="$GIT_OBJECT_DIRECTORY/.tmp-$$-pack"
 rm -f "$PACKTMP"-*
 trap 'rm -f "$PACKTMP"-*' 0 1 2 3 15
 

Although this is a good change, this hunk does not belong to this.

----------------------------------------------------------------

Overall everything looks good, except some minor details noted above. Separation of the commits into logical steps does not need to be fixed up (they are already in 'next'), but follow-up patches might be needed.

And I have to agree with Linus; responding this way was more cumbersome than it should have been.

author
#2 lore raw
Quoted 8 lines · Junio C Hamano

Dana How <[email protected]> writes:
----------------------------------------------------------------

Quoted 5 lines

Subject: [PATCH] Alter sha1close() 3rd argument to request flush only

update=0 suppressed writing the final SHA-1 but was not used. Now final=0 suppresses SHA-1 finalization, SHA-1 writing, and closing -- in other words, only flush the buffer.

Quoted 6 lines

What it does is understandable but it somehow feels funny that "sha1close(file, hashresult, 0)" does _not_ close it (and does not hash either for obvious reasons ;-). I would say we should let it pass this round, but might want to separate the first part out into a separate "update hash and flush" function if we get more callers.

OK, see the list at the end.

Quoted 11 lines

----------------------------------------------------------------

Quoted 9 lines

Subject: [PATCH 1/4] git-repack --max-pack-size: new file statics and code restructuring

Add "pack_size_limit", the limit specified by --max-pack-size, "written_list", the list of objects written to the current pack, and "nr_written", the number of objects in written_list. Put "base_name" at file scope again and add forward declarations. Move write_index_file() call from cnd_pack_objects() to write_pack_file() since only the latter will know how many times to call write_index_file().

Quoted 6 lines

I would have split this part a bit differently.

This is mostly about restructuring the code so that write_index_file() is called from write_pack_file(), which by itself is a very good change (but then we might have been better off passing basename as a parameter).

That would have worked too. I made base_name file scope b/c that's how it was before NP's immediatley previous patches.

Quoted 4 lines

You are not using written_list nor limit yet but are introducing them in this step, which feels not quite right. I usually compile stuff with -Werror, and if I ever have to bisect the series, this would bomb out for these unused variables. Not nice.

Very good point -- I did not think of that.
I will make sure in the future
each patch in a patchset has no warnings.

Quoted 18 lines

----------------------------------------------------------------

Quoted 8 lines

Subject: [PATCH 2/4] git-repack --max-pack-size: write_{object,one}() respect pack limit

With --max-pack-size, generate the appropriate write limit for each object and check against it before each group of writes. Update delta usability rules to handle base being in a previously- written pack. Inline sha1write_compress() so we know the exact size of the written data when it needs to be compressed. Detect and return write "failure".

Again, this is split somewhat wrongly, as you do not have a way to set max size from the caller, but more importantly, even though write_one and write_object knows to obey the limit (perhaps somebody bisecting this series later may set the limit under the debugger, to work around the lack of option parser), write_pack_file() does not notice zero return from write_one(); I would have added a check there to do:

Quoted 3 lines

die("sorry, limit reached and we do not have code to split the pack yet.")

which obviously can be updated in the next patch.

This makes sense to me. In a previous version of the patchset, I had some temporary code like you say (just some extra arguments, not any checking or die() calls) which was immediately changed/replaced in the next patch.
Shawn or Nicolas didn't like that,
so I migrated to the split I used here.

I didn't really intend bisecting this patchset to do anything useful *with respect to max-pack-size functionality*, but bisecting it would be useful to detect if these patches had broken something else. But I can rethink that in the future.

Quoted 9 lines

----------------------------------------------------------------

Quoted 8 lines

Subject: [PATCH 3/4] git-repack --max-pack-size: split packs as asked by write_{object,one}()

Rewrite write_pack_file() to break to a new packfile whenever write_object/write_one request it, and correct the header's object count in the previous packfile. Change write_index_file() to write an index
for just the objects in the most recent packfile.

Quoted 14 lines

builtin-pack-objects.c static void write_pack_file(void) · line 670

Quoted 12 lines
builtin-pack-objects.c +8 -0
@@ -652,7 +663,26 @@ static void write_pack_file(void)
+     } while (nr_remaining && i < nr_objects);
+
+     for (j = 0; i < nr_objects; i++) {
+             struct object_entry *e = objects + i;
+             j += !e->offset && !e->preferred_base;
+     }
+     if (j)
+             die("wrote %u objects as expected but %u unwritten", written, j);

I am a bit confused by this loop. Don't you have to start with i=0 for this check to be meaningful?

The previous do-while loop whose last line is shown could end with i < nr_objects due to nr_remaining becoming
0. This means the objects [i ... nr_objects) have not been inspected. They should all be either already written or non-writable, which is what the two terms in the && expression are testing. See list at end.

Quoted 17 lines

----------------------------------------------------------------

Quoted 16 lines

Subject: [PATCH 4/4] git-repack --max-pack-size: add option parsing to enable feature

Add --max-pack-size parsing and usage messages. Upgrade git-repack.sh to handle multiple packfile names, and build packfiles in GIT_OBJECT_DIRECTORY not GIT_DIR. Update documentation.

builtin-pack-objects.c +5 -0
@@ -1713,6 +1713,13 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
+             if (!prefixcmp(arg, "--max-pack-size=")) {
+                     char *end;
+                     pack_size_limit = strtoul(arg+16, &end, 0) * 1024 * 1024;
+                     if (!arg[16] || *end)
+                             usage(pack_usage);
Quoted 8 lines

builtin-pack-objects.c int cmd_pack_objects(int argc, const char **argv, const char *prefix) · line 1722

Quoted 2 lines
builtin-pack-objects.c +2 -0
+                     continue;
+             }

Hmmm. I was almost going to suggest to have this spelled in bytes, with suffixes like k/m/g. However, because wanting to limit a pack under 1.4MB does not make much sense these days, and because having to spell "up to 2GB" as 2047 is not too much trouble, I think this is Ok.

I thought about suffixes too but I chose this way
b/c that's how git fast-import does it.

Quoted 3 lines

Shouldn't we have a safety to error out when --stdout and --max-pack-size are both given? Currently it silently ignores the limit, doesn't it?

Yes & yes. Previously there was disagreement on this point. One preference was to disallow the combination, another was that it was useful and should be supported. So I left the code in a state where a small follow-on patch could make the decision. The current behavior is not to disallow the combination, and it is well-defined (you get a sequence of packs on stdout, concatenated, whose headers indicate how many objects there are in the current pack and all following).

I do not think --stdout && --max-pack-size is currently useful, and a follow-on patch should complain. See list at end.

Quoted 9 lines

git-repack.sh true) · line 36

Quoted 6 lines
git-repack.sh +1 -1
@@ -35,7 +36,7 @@ true)
-PACKTMP="$GIT_DIR/.tmp-$$-pack"
+PACKTMP="$GIT_OBJECT_DIRECTORY/.tmp-$$-pack"

Although this is a good change, this hunk does not belong to this.

OK.
If you decide not to keep this change here for historical clarity, I can add it back later.

Quoted 4 lines

Overall everything looks good, except some minor details noted above. Separation of the commits into logical steps does not need to be fixed up (they are already in 'next'), but follow-up patches might be needed.

OK, I will not edit and re-submit these patches.
But I will submit two follow-on patches:

Patch 1:
* Pull "sha1flush()" or similar out of sha1close() inside csum-file.c. This will require some edits to callers.

Patch 2:
* Add a comment to "confusing loop" to explain what it's checking.
* Complain about --stdout && --max-pack-size combination.

This will have to happen tomorrow.

Quoted 2 lines

And I have to agree with Linus; responding this way was more cumbersome than it should have been.

Understood.

Thanks,

Signature · 1 line
Dana L. How  [email protected]  +1 650 804 5991 cell
#3 lore raw
Quoted 8 lines · Dana How

Patch 1:
* Pull "sha1flush()" or similar out of sha1close() inside csum-file.c. This will require some edits to callers.

Patch 2:
* Add a comment to "confusing loop" to explain what it's checking.
* Complain about --stdout && --max-pack-size combination.

Quoted 7 lines

This will have to happen tomorrow.

Quoted 2 lines

And I have to agree with Linus; responding this way was more cumbersome than it should have been.

Understood.

Thanks,

Although I mentioned it, as we have only one caller that does not want to close the file, we probably do not need the first patch right now.

Also thanks for the clarification on the (nr_result != nr_objects) stuff -- it should have been obvious, as I was the guilty party who originally introduced that condition (i.e. "thin" packs).