Subject: [PATCH 10/18] check-ref-format: use RUN_SETUP_GENTLY

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Sun, 7 Mar 2010 11:55:59 +0700

When --branch is used, check-ref-format will look into repository for
branch name. Therefore repository search is needed.

The call flow is:
 - cmd_check_ref_format
 - strbuf_check_branch_ref
 - strbuf_branchname
 - interpret_branch_name
 - branch_get
 - read_config
 - resolve_ref

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 git.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git.c b/git.c
index 326f7c7..a8660f4 100644
--- a/git.c
+++ b/git.c
@@ -304,7 +304,7 @@ static void handle_internal_command(int argc, const char **argv)
 		{ "checkout", cmd_checkout, RUN_SETUP | NEED_WORK_TREE },
 		{ "checkout-index", cmd_checkout_index,
 			RUN_SETUP | NEED_WORK_TREE},
-		{ "check-ref-format", cmd_check_ref_format },
+		{ "check-ref-format", cmd_check_ref_format, RUN_SETUP_GENTLY },
 		{ "check-attr", cmd_check_attr, RUN_SETUP },
 		{ "cherry", cmd_cherry, RUN_SETUP },
 		{ "cherry-pick", cmd_cherry_pick, RUN_SETUP | NEED_WORK_TREE },
-- 
1.7.0.195.g637a2