{"thread":{"id":"12424","subject":"[PATCH v2 00/10] More on worktree fixes","startedAt":"2008-03-02T10:33:00Z","lastAt":"2008-03-03T00:28:09Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":10},"messages":[{"id":"70616","messageId":"20080302103300.GA8867@laptop","threadId":"12424","inReplyTo":null,"subject":"[PATCH v2 00/10] More on worktree fixes","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2008-03-02T10:33:00Z","receivedAt":"2008-03-02T10:33:00Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"This series cleans up setup.c and makes git handle worktree better.\nThe series deprecates my patch \"Move worktree setup out of...\"\n\nChanges from the last version: Junio's concerns are addressed, tests\nare also added.\n\nMain points:\n\n - get_git_dir() is now always absolute path.\n\n - setup_git_directory_gently() will no longer do\n   any worktree setup. If you want worktree with\n   setup_git_directory_gently(), call setup_work_tree().\n\n - setup_git_directory() will still setup worktree if found. The\n   behavior is a bit more consistent as it will setup worktree no\n   matter where it comes from. GIT_WORK_TREE, core.worktree or\n   autodetection are treated the same.\n\n - Document setup api along the way.\n\n\"make test\" was run on each patch. Hopefully the series won't break\nanything. Tests will come later, my brain has been overheated.\n\nRemaining problems I'm aware of:\n\n - prefix when running a command from outside worktree (currently NULL)\n - cmd_update_index() needs setup_work_tree()\n\nNguyễn Thái Ngọc Duy (10):\n      \"git read-tree -m\" and the like require worktree\n      Make sure setup_git_directory is called before accessing repository\n      Make get_git_dir() and 'git rev-parse --git-dir' absolute path\n      Make setup_work_tree() return new prefix\n      http-push: Avoid calling setup_git_directory() twice\n      Completely move out worktree setup from setup_git_directory_gently()\n      builtin-archive: mark unused prefix \"unused_prefix\"\n      Make setup_git_directory() auto-setup worktree if found\n      Documentation: update api-builtin and api-setup\n      Additional tests to capture worktree special cases\n\n Documentation/technical/api-builtin.txt |   10 +++\n Documentation/technical/api-setup.txt   |   91 ++++++++++++++++++++++--\n builtin-apply.c                         |    7 ++-\n builtin-archive.c                       |    6 +-\n builtin-blame.c                         |    4 +-\n builtin-bundle.c                        |    9 +--\n builtin-config.c                        |   15 ++---\n builtin-diff-files.c                    |   13 ++--\n builtin-diff.c                          |   13 ++--\n builtin-ls-files.c                      |   10 ++--\n builtin-read-tree.c                     |    3 +\n builtin-rev-parse.c                     |   23 ++----\n builtin-rm.c                            |    5 +-\n builtin-upload-archive.c                |    4 +-\n cache.h                                 |    4 +-\n environment.c                           |    1 +\n fast-import.c                           |    1 +\n git.c                                   |    8 +--\n hash-object.c                           |   14 +---\n http-push.c                             |    4 +-\n index-pack.c                            |    2 +\n setup.c                                 |  114 +++++++++++-------------------\n t/t1300-repo-config.sh                  |    2 +-\n t/t1400-update-ref.sh                   |    4 +-\n t/t1501-worktree.sh                     |   57 +++++++++++++++-\n t/t9300-fast-import.sh                  |    2 +-\n 26 files changed, 261 insertions(+), 165 deletions(-)\n"},{"id":"70716","messageId":"7vejasmz1i.fsf@gitster.siamese.dyndns.org","threadId":"12424","inReplyTo":"20080302103300.GA8867@laptop","subject":"Re: [PATCH v2 00/10] More on worktree fixes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-03T00:28:09Z","receivedAt":"2008-03-03T00:28:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Will replace what has been queued in 'pu', but I had to apply the same\nfix-up as I did to the previous round when I queued the previous round.\n\nInterdiff below...\n\ndiff --git a/builtin-bundle.c b/builtin-bundle.c\nindex 2a7687e..eebbd6b 100644\n--- a/builtin-bundle.c\n+++ b/builtin-bundle.c\n@@ -17,7 +17,6 @@ int cmd_bundle(int argc, const char **argv, const char *unused_prefix)\n \tint nongit = 0;\n \tconst char *cmd, *bundle_file;\n \tint bundle_fd = -1;\n-\tchar buffer[PATH_MAX];\n \n \tif (argc < 3)\n \t\tusage(bundle_usage);\ndiff --git a/setup.c b/setup.c\nindex f0de42f..e225597 100644\n--- a/setup.c\n+++ b/setup.c\n@@ -318,9 +318,6 @@ void setup_git_directory_gently(int *nongit_ok)\n \t\tif (PATH_MAX - 40 < strlen(gitdirenv))\n \t\t\tdie(\"'$%s' too big\", GIT_DIR_ENVIRONMENT);\n \t\tif (is_git_directory(gitdirenv)) {\n-\t\t\tstatic char buffer[1024 + 1];\n-\t\t\tconst char *retval;\n"}]}