{"thread":{"id":"5555","subject":"[PATCH 1/2] Make more commands work in subdirectory","startedAt":"2006-09-14T01:03:59Z","lastAt":"2006-09-14T01:03:59Z","messageCount":1,"participants":["Dmitry V. Levin"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"26853","messageId":"20060914010359.GA20593@nomad.office.altlinux.org","threadId":"5555","inReplyTo":null,"subject":"[PATCH 1/2] Make more commands work in subdirectory","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2006-09-14T01:03:59Z","receivedAt":"2006-09-14T01:03:59Z","isPatch":true,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"count-objects, describe, merge-tree:\n\tCall setup_git_directory() to make these commands work in subdirectory.\n\nSigned-off-by: Dmitry V. Levin <ldv@altlinux.org>\n---\n describe.c   |    2 ++\n git.c        |    2 +-\n merge-tree.c |    2 ++\n 3 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/describe.c b/describe.c\nindex 5dd8b2e..5ed052d 100644\n--- a/describe.c\n+++ b/describe.c\n@@ -161,6 +161,8 @@ int main(int argc, char **argv)\n \t\t\tusage(describe_usage);\n \t}\n \n+\tsetup_git_directory();\n+\n \tif (i == argc)\n \t\tdescribe(\"HEAD\", 1);\n \telse\ndiff --git a/git.c b/git.c\nindex 335f405..47c85e1 100644\n--- a/git.c\n+++ b/git.c\n@@ -224,7 +224,7 @@ static void handle_internal_command(int \n \t\t{ \"checkout-index\", cmd_checkout_index, RUN_SETUP },\n \t\t{ \"check-ref-format\", cmd_check_ref_format },\n \t\t{ \"commit-tree\", cmd_commit_tree, RUN_SETUP },\n-\t\t{ \"count-objects\", cmd_count_objects },\n+\t\t{ \"count-objects\", cmd_count_objects, RUN_SETUP },\n \t\t{ \"diff\", cmd_diff, RUN_SETUP },\n \t\t{ \"diff-files\", cmd_diff_files, RUN_SETUP },\n \t\t{ \"diff-index\", cmd_diff_index, RUN_SETUP },\ndiff --git a/merge-tree.c b/merge-tree.c\nindex 60df758..c154dcf 100644\n--- a/merge-tree.c\n+++ b/merge-tree.c\n@@ -340,6 +340,8 @@ int main(int argc, char **argv)\n \tif (argc < 4)\n \t\tusage(merge_tree_usage);\n \n+\tsetup_git_directory();\n+\n \tbuf1 = get_tree_descriptor(t+0, argv[1]);\n \tbuf2 = get_tree_descriptor(t+1, argv[2]);\n \tbuf3 = get_tree_descriptor(t+2, argv[3]);\n\n\n-- \nldv\n"}]}