{"thread":{"id":"156","subject":"[PATCH 2/3] init-db.c: normalize env var handling.","startedAt":"2005-04-20T04:28:39Z","lastAt":"2005-04-20T04:59:43Z","messageCount":4,"participants":["Zach Welch","Linus Torvalds"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"931","messageId":"mailbox-1242-1113971319-971926@spoon","threadId":"156","inReplyTo":null,"subject":"[PATCH 2/3] init-db.c: normalize env var handling.","fromName":"Zach Welch","fromEmail":"zw@superlucidity.net","sentAt":"2005-04-20T04:28:39Z","receivedAt":"2005-04-20T04:28:39Z","isPatch":true,"sender":{"key":"zw@superlucidity.net","avatar":null},"body":"This patch applies on top of:\n        [PATCH 1/3] init-db.c: cleanup comments\n\n init-db.c |   11 +++--------\n 1 files changed, 3 insertions(+), 8 deletions(-)\n\nSigned-Off-By: Zach Welch <zw@superlucidity.net>\n\nNormalize init-db environment variable handling, allowing the creation\nof object directories with something other than DEFAULT_DB_ENVIRONMENT.\n\n--- a/init-db.c\n+++ b/init-db.c\n@@ -22,15 +22,10 @@ int main(int argc, char **argv)\n \t}\n \n \tsha1_dir = getenv(DB_ENVIRONMENT);\n-\tif (sha1_dir) {\n-\t\tstruct stat st;\n-\t\tif (!stat(sha1_dir, &st) && S_ISDIR(st.st_mode))\n-\t\t\treturn 0;\n-\t\tfprintf(stderr, \"DB_ENVIRONMENT set to bad directory %s: \", sha1_dir);\n+\tif (!sha1_dir) {\n+\t\tsha1_dir = DEFAULT_DB_ENVIRONMENT;\n+\t\tfprintf(stderr, \"defaulting to local storage area\\n\");\n \t}\n-\n-\tsha1_dir = DEFAULT_DB_ENVIRONMENT;\n-\tfprintf(stderr, \"defaulting to private storage area\\n\");\n \tlen = strlen(sha1_dir);\n \tif (mkdir(sha1_dir, 0755) < 0) {\n \t\tif (errno != EEXIST) {\n"},{"id":"938","messageId":"Pine.LNX.4.58.0504192142040.6467@ppc970.osdl.org","threadId":"156","inReplyTo":"mailbox-1242-1113971319-971926@spoon","subject":"Re: [PATCH 2/3] init-db.c: normalize env var handling.","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-04-20T04:45:36Z","receivedAt":"2005-04-20T04:45:36Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 19 Apr 2005, Zach Welch wrote:\n>\n> This patch applies on top of:\n>         [PATCH 1/3] init-db.c: cleanup comments\n> \n>  init-db.c |   11 +++--------\n>  1 files changed, 3 insertions(+), 8 deletions(-)\n> \n> Signed-Off-By: Zach Welch <zw@superlucidity.net>\n> \n> Normalize init-db environment variable handling, allowing the creation\n> of object directories with something other than DEFAULT_DB_ENVIRONMENT.\n> \n> --- a/init-db.c\n> +++ b/init-db.c\n\nFor future reference, this is in the wrong order.\n\nYou should have \"checkin comment\" first, then \"signed-off-by\", then a line \nwith three dashes, and then \"administrative trivia\".\n\nIe I'd much rather see the email look like\n\n\tNormalize init-db environment variable handling, allowing the creation\n\tof object directories with something other than DEFAULT_DB_ENVIRONMENT.\n\t\n\tSigned-Off-By: Zach Welch <zw@superlucidity.net>\n\t---\n\tThis patch applies on top of:\n\t        [PATCH 1/3] init-db.c: cleanup comments\n\t\n\t init-db.c |   11 +++--------\n\t 1 files changed, 3 insertions(+), 8 deletions(-)\n\t\n\t.. actual patch goes here ..\n\nsince otherwise I'll just have to edit it that way. I like seeing the \nadministrative stuff (diffstat etc), but I don't want to have it in the \ncommit message, and that's exactly what the \"---\" marker is for - my tools \nwill automatically cut it off as if it was a signature (or the beginning \nof the patch).\n\n\t\tLinus\n"},{"id":"939","messageId":"4265E0BB.4040700@superlucidity.net","threadId":"156","inReplyTo":"Pine.LNX.4.58.0504192142040.6467@ppc970.osdl.org","subject":"Re: [PATCH 2/3] init-db.c: normalize env var handling.","fromName":"Zach Welch","fromEmail":"zw@superlucidity.net","sentAt":"2005-04-20T04:55:23Z","receivedAt":"2005-04-20T04:55:23Z","isPatch":true,"sender":{"key":"zw@superlucidity.net","avatar":null},"body":"Linus Torvalds wrote:\n> For future reference, this is in the wrong order.\n\nI feel even more abashed for my earlier scripting faux pas. Would you\nlike me to resend them to you off-list?\n\nCheers,\n\nZach\n\n\n"},{"id":"940","messageId":"Pine.LNX.4.58.0504192159000.6467@ppc970.osdl.org","threadId":"156","inReplyTo":"4265E0BB.4040700@superlucidity.net","subject":"Re: [PATCH 2/3] init-db.c: normalize env var handling.","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-04-20T04:59:43Z","receivedAt":"2005-04-20T04:59:43Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 19 Apr 2005, Zach Welch wrote:\n> \n> I feel even more abashed for my earlier scripting faux pas. Would you\n> like me to resend them to you off-list?\n\nNo, I edited them and applied them (the first series, I'll have to think \nabout the second one).\n\nIt's only when there are tens of patches that it gets really old really \nquickly to edit things by hand. Three I can handle ;)\n\n\t\tLinus\n"}]}