diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-03 10:29:29 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-03 10:29:29 -0700 |
commit | d4a22303abbdcfb1ccc0c04c7bd6711444312751 (patch) | |
tree | 400e583a903d42cb66f2ab61fb83b93e8668d8d5 | |
parent | Merge branch 'mm/lockfile-error-message' (diff) | |
parent | index-pack: correct --keep[=<msg>] (diff) | |
download | tgif-d4a22303abbdcfb1ccc0c04c7bd6711444312751.tar.xz |
Merge branch 'jc/maint-index-pack-keep'
"git index-pack --keep[=<msg>] pack-$name.pack" simply did not work.
* jc/maint-index-pack-keep:
index-pack: correct --keep[=<msg>]
-rw-r--r-- | builtin/index-pack.c | 2 | ||||
-rwxr-xr-x | t/t5300-pack-object.sh | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 45245199ae..2f5cf71f44 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1722,7 +1722,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) die(_("packfile name '%s' does not end with '.pack'"), pack_name); 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; } if (verify) { diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index fc2be63e02..899e52d50f 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -284,6 +284,12 @@ test_expect_success \ git index-pack test-3.pack && 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' ' |