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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <pclouds@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]