Merge branch 'jc/maint-index-pack-keep' into jc/index-pack
* jc/maint-index-pack-keep: index-pack: correct --keep[=<msg>]maint
commit
13f0a6ddb9
|
|
@ -1721,7 +1721,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
|
||||||
die(_("packfile name '%s' does not end with '.pack'"),
|
die(_("packfile name '%s' does not end with '.pack'"),
|
||||||
pack_name);
|
pack_name);
|
||||||
strbuf_add(&keep_name_buf, pack_name, len);
|
strbuf_add(&keep_name_buf, pack_name, len);
|
||||||
strbuf_addstr(&keep_name_buf, ".idx");
|
strbuf_addstr(&keep_name_buf, ".keep");
|
||||||
keep_name = keep_name_buf.buf;
|
keep_name = keep_name_buf.buf;
|
||||||
}
|
}
|
||||||
if (verify) {
|
if (verify) {
|
||||||
|
|
|
||||||
|
|
@ -284,6 +284,12 @@ test_expect_success \
|
||||||
git index-pack test-3.pack &&
|
git index-pack test-3.pack &&
|
||||||
cmp test-3.idx test-3-${packname_3}.idx &&
|
cmp test-3.idx test-3-${packname_3}.idx &&
|
||||||
|
|
||||||
|
cat test-1-${packname_1}.pack >test-4.pack &&
|
||||||
|
rm -f test-4.keep &&
|
||||||
|
git index-pack --keep=why test-4.pack &&
|
||||||
|
cmp test-1-${packname_1}.idx test-4.idx &&
|
||||||
|
test -f test-4.keep &&
|
||||||
|
|
||||||
:'
|
:'
|
||||||
|
|
||||||
test_expect_success 'unpacking with --strict' '
|
test_expect_success 'unpacking with --strict' '
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue