index-pack: complain when --stdin is used outside of a repo
authorJeff King <redacted>
Fri, 16 Dec 2016 02:30:59 +0000 (21:30 -0500)
committerJunio C Hamano <redacted>
Fri, 16 Dec 2016 17:29:43 +0000 (09:29 -0800)
commit7176a31444ce5ed683dbd75d2e1e2f89018d0100
treec761e0c35d397e67bcfe7fa14b891ad998fb0e5e
parentde95302a4c0c6c733fb734b5a3d3d54dd54ec674
index-pack: complain when --stdin is used outside of a repo

The index-pack builtin is marked as RUN_SETUP_GENTLY,
because it's perfectly fine to index a pack in the
filesystem outside of any repository. However, --stdin mode
will write the result to the object database, which does not
make sense outside of a repository. Doing so creates a bogus
".git" directory with nothing in it except the newly-created
pack and its index.

Instead, let's flag this as an error and abort.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/index-pack.c
t/t5300-pack-object.sh
git clone https://git.99rst.org/PROJECT