Skip to content

Commit 13f0a6d

Browse files
committed
Merge branch 'jc/maint-index-pack-keep' into jc/index-pack
* jc/maint-index-pack-keep: index-pack: correct --keep[=<msg>]
2 parents f02fbc4 + 0e94242 commit 13f0a6d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
17211721
die(_("packfile name '%s' does not end with '.pack'"),
17221722
pack_name);
17231723
strbuf_add(&keep_name_buf, pack_name, len);
1724-
strbuf_addstr(&keep_name_buf, ".idx");
1724+
strbuf_addstr(&keep_name_buf, ".keep");
17251725
keep_name = keep_name_buf.buf;
17261726
}
17271727
if (verify) {

t/t5300-pack-object.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@ test_expect_success \
284284
git index-pack test-3.pack &&
285285
cmp test-3.idx test-3-${packname_3}.idx &&
286286
287+
cat test-1-${packname_1}.pack >test-4.pack &&
288+
rm -f test-4.keep &&
289+
git index-pack --keep=why test-4.pack &&
290+
cmp test-1-${packname_1}.idx test-4.idx &&
291+
test -f test-4.keep &&
292+
287293
:'
288294

289295
test_expect_success 'unpacking with --strict' '

0 commit comments

Comments
 (0)