{"thread":{"id":"4164","subject":"[PATCH] Simplify packing public repositories","startedAt":"2006-05-16T11:46:35Z","lastAt":"2006-05-16T11:47:10Z","messageCount":2,"participants":["Timo Hirvonen","Sean"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20061","messageId":"20060516144635.010bb65f.tihirvon@gmail.com","threadId":"4164","inReplyTo":null,"subject":"[PATCH] Simplify packing public repositories","fromName":"Timo Hirvonen","fromEmail":"tihirvon@gmail.com","sentAt":"2006-05-16T11:46:35Z","receivedAt":"2006-05-16T11:46:35Z","isPatch":true,"sender":{"key":"tihirvon@gmail.com","avatar":null},"body":"Support \"git repack project.git\" syntax which is more intuitive than\nusing the GIT_DIR environment variable.\n\nSigned-off-by: Timo Hirvonen <tihirvon@gmail.com>\n\n---\n\n git-repack.sh |   27 ++++++++++++++++++++++++---\n 1 files changed, 24 insertions(+), 3 deletions(-)\n\nc09c41750023e5b502312ddaa21bf5a2371e66ac\ndiff --git a/git-repack.sh b/git-repack.sh\nindex 4fb3f26..b24cd1a 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -3,8 +3,8 @@ #\n # Copyright (c) 2005 Linus Torvalds\n #\n \n-USAGE='[-a] [-d] [-f] [-l] [-n] [-q]'\n-. git-sh-setup\n+unset CDPATH\n+USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [GIT_DIR]'\n \n no_update_info= all_into_one= remove_redundant=\n local= quiet= no_reuse_delta= extra=\n@@ -19,11 +19,32 @@ do\n \t-l)\tlocal=--local ;;\n \t--window=*) extra=\"$extra $1\" ;;\n \t--depth=*) extra=\"$extra $1\" ;;\n-\t*)\tusage ;;\n+\t-h|--h|--he|--hel|--help)\n+\t\techo \"Usage: $0 $USAGE\"\n+\t\texit\n+\t\t;;\n+\t*)\n+\t\tif test \"$#\" -gt 1\n+\t\tthen\n+\t\t\techo >&2 \"Usage: $0 $USAGE\"\n+\t\t\texit 1\n+\t\tfi\n+\t\texport GIT_DIR=\"$1\"\n+\t\t;;\n \tesac\n \tshift\n done\n \n+: ${GIT_DIR=.git}\n+: ${GIT_OBJECT_DIRECTORY=\"$GIT_DIR/objects\"}\n+\n+# Make sure we are in a valid repository of a vintage we understand.\n+GIT_DIR=\"$GIT_DIR\" git repo-config --get core.nosuch >/dev/null\n+if test $? = 128\n+then\n+    exit\n+fi\n+\n rm -f .tmp-pack-*\n PACKDIR=\"$GIT_OBJECT_DIRECTORY/pack\"\n \n-- \n1.3.3.g8701-dirty\n"},{"id":"20062","messageId":"BAYC1-PASMTP0396DD9FA6E64F5AC63BB1AEA00@CEZ.ICE","threadId":"4164","inReplyTo":"20060516144635.010bb65f.tihirvon@gmail.com","subject":"Re: [PATCH] Simplify packing public repositories","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-05-16T11:47:10Z","receivedAt":"2006-05-16T11:47:10Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Tue, 16 May 2006 14:46:35 +0300\nTimo Hirvonen <tihirvon@gmail.com> wrote:\n\n> Support \"git repack project.git\" syntax which is more intuitive than\n> using the GIT_DIR environment variable.\n> \n\nThere are a few commands that would benefit from being easier to run\nin a bare repository.  If this option was added to the \"git\" wrapper\nrather than git-repack, it would work for all of them.  But maybe\ngit could just automatically recognize when it's in a bare repository.\n\nSean\n"}]}