Signed-off-by: Rob Browning <
r...@defaultvalue.org>
---
Proposed for 0.33.x and main.
Documentation/
bup-config.5.md | 28 +++++++++++++++++++++++
note/
0.33.x.md | 14 ++++++++++++
test/ext/test-packsizelimit | 42 ++++++++++++++++++++++++++++++++++-
3 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 Documentation/
bup-config.5.md
create mode 100644 note/
0.33.x.md
diff --git a/Documentation/
bup-config.5.md b/Documentation/
bup-config.5.md
new file mode 100644
index 000000000..c4b585069
--- /dev/null
+++ b/Documentation/
bup-config.5.md
@@ -0,0 +1,28 @@
+% bup-config(5) Bup %BUP_VERSION%
+% Rob Browning <
r...@defaultvalue.org>
+% %BUP_DATE%
+
+# NAME
+
+bup-config - bup configuration options
+
+# DESCRIPTION
+
+The following options may be set in the relevant `git` config
+(`git-config(1)`).
+
+# OPTIONS
+
+pack.packSizeLimit
+: Respected when writing pack files (e.g. via `bup save ...`).
+ Currently read from the repository to which the pack files are
+ being written, excepting `bup on REMOTE...` which incorrectly
+ reads the value from the `REMOTE` repository.
+
+# SEE ALSO
+
+`git-config`(1)
+
+# BUP
+
+Part of the `bup`(1) suite.
diff --git a/note/
0.33.x.md b/note/
0.33.x.md
new file mode 100644
index 000000000..5c71356db
--- /dev/null
+++ b/note/
0.33.x.md
@@ -0,0 +1,14 @@
+Notable changes in main since 0.33.3 (incomplete)
+=================================================
+
+Bugs
+----
+
+* `bup-config(5)` has been added, and mentions that at the moment `bup
+ on REMOTE ...` incorrectly reads the `pack.packSizeLimit` from the
+ `REMOTE` repository.
+
+Thanks to (at least)
+====================
+
+...
diff --git a/test/ext/test-packsizelimit b/test/ext/test-packsizelimit
index f76e04596..3ccbd8016 100755
--- a/test/ext/test-packsizelimit
+++ b/test/ext/test-packsizelimit
@@ -13,13 +13,17 @@ bup() { "$top/bup" "$@"; }
WVPASS cd "$tmpdir"
-WVSTART 'pack size limit'
+
+WVSTART 'no pack size limit'
WVPASS bup init
WVPASSEQ $(WVPASS find "$BUP_DIR"/objects/pack -name "*.pack" | wc -l) 0
WVPASS bup random 50k | WVPASS bup split -n foo
WVPASSEQ 1 $(WVPASS find "$BUP_DIR"/objects/pack/*.pack | wc -l)
+
+WVSTART 'pack size limit'
+
rm -rf "$BUP_DIR"
WVPASS bup init
WVPASS git config pack.packSizeLimit 10k
@@ -27,4 +31,40 @@ WVPASSEQ $(WVPASS find "$BUP_DIR"/objects/pack -name "*.pack" | wc -l) 0
WVPASS bup random 50k | WVPASS bup split -n foo
WVPASS test $(WVPASS find "$BUP_DIR"/objects/pack/*.pack | wc -l) -gt 2
+
+bup_dir2="$tmpdir/bup2"
+
+
+WVSTART 'pack size limit (-r)'
+
+rm -rf "$BUP_DIR" "$bup_dir2"
+WVPASS bup init
+WVPASS bup -d "$bup_dir2" init
+
+# FIXME: This is wrong; destination repo should determine the limit.
+WVPASS git config pack.packSizeLimit 10k
+#WVPASS git --git-dir "$bup_dir2" config pack.packSizeLimit 10k
+
+WVPASSEQ $(WVPASS find "$BUP_DIR"/objects/pack -name "*.pack" | wc -l) 0
+WVPASSEQ $(WVPASS find "$bup_dir2"/objects/pack -name "*.pack" | wc -l) 0
+WVPASS bup random 50k | WVPASS bup split -r "$bup_dir2" -n foo
+WVPASSEQ $(WVPASS find "$BUP_DIR"/objects/pack -name "*.pack" | wc -l) 0
+WVPASS test $(WVPASS find "$bup_dir2"/objects/pack/*.pack | wc -l) -gt 2
+
+
+WVSTART 'pack size limit (on)'
+
+rm -rf "$BUP_DIR" "$bup_dir2"
+WVPASS bup init
+WVPASS bup -d "$bup_dir2" init
+WVPASS git --git-dir "$bup_dir2" config pack.packSizeLimit 10k
+WVPASSEQ $(WVPASS find "$BUP_DIR"/objects/pack -name "*.pack" | wc -l) 0
+WVPASSEQ $(WVPASS find "$bup_dir2"/objects/pack -name "*.pack" | wc -l) 0
+WVPASS bup random 50k > "$tmpdir/data"
+WVPASS bup -d "$bup_dir2" on - split -n foo "$tmpdir/data"
+WVPASS bup -d "$bup_dir2" join foo > "$tmpdir/data-joined"
+WVPASS cmp -b "$tmpdir/data" "$tmpdir/data-joined"
+WVPASSEQ $(WVPASS find "$BUP_DIR"/objects/pack -name "*.pack" | wc -l) 0
+WVPASS test $(WVPASS find "$bup_dir2"/objects/pack/*.pack | wc -l) -gt 2
+
WVPASS rm -r "$tmpdir"
--
2.43.0