{"thread":{"id":"2977","subject":"use GIT_DIR instead of /var/tmp","startedAt":"2006-01-05T11:52:07Z","lastAt":"2006-01-06T10:00:48Z","messageCount":8,"participants":["Alex Riesen","H. Peter Anvin","Linus Torvalds","Jon Nelson","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14179","messageId":"81b0412b0601050352n386505bfjd40e515809e3c862@mail.gmail.com","threadId":"2977","inReplyTo":null,"subject":"use GIT_DIR instead of /var/tmp","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-01-05T11:52:07Z","receivedAt":"2006-01-05T11:52:07Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Not every system (will not one microsoft windows system) have /var/tmp,\nwhereas using GIT_DIR for random temporary files is more or less established.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n\n\nSubject: [PATCH] use GIT_DIR instead of /var/tmp\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n\n\n---\n\n git-reset.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n9ba3fa786e3de644a9395f99e69cede912f64571\ndiff --git a/git-reset.sh b/git-reset.sh\nindex eb44ee8..6c9e58a 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -3,7 +3,7 @@\n USAGE='[--mixed | --soft | --hard]  [<commit-ish>]'\n . git-sh-setup\n \n-tmp=/var/tmp/reset.$$\n+tmp=${GIT_DIR}/reset.$$\n trap 'rm -f $tmp-*' 0 1 2 3 15\n \n reset_type=--mixed\n-- \n1.0.GIT\n"},{"id":"14188","messageId":"43BD4B73.7010000@zytor.com","threadId":"2977","inReplyTo":"81b0412b0601050352n386505bfjd40e515809e3c862@mail.gmail.com","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-05T16:38:11Z","receivedAt":"2006-01-05T16:38:11Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Alex Riesen wrote:\n> Not every system (will not one microsoft windows system) have /var/tmp,\n> whereas using GIT_DIR for random temporary files is more or less established.\n\nDepends on what you're doing.  Only if you're writing to the repository.\n\nWindows will usually have $TMP and/or $TEMP, a lot of Unix apps honour \n$TMP_DIR.\n\n\t-hpa\n"},{"id":"14190","messageId":"Pine.LNX.4.64.0601050840010.3169@g5.osdl.org","threadId":"2977","inReplyTo":"81b0412b0601050352n386505bfjd40e515809e3c862@mail.gmail.com","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-01-05T16:42:33Z","receivedAt":"2006-01-05T16:42:33Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 5 Jan 2006, Alex Riesen wrote:\n>\n> Not every system (will not one microsoft windows system) have /var/tmp,\n> whereas using GIT_DIR for random temporary files is more or less established.\n\nNote that in this case it might be appropriate, but in general you should \nbe careful. You may want to access a git directory without actually having \nwrite permissions to it. \n\nOf course, for \"git reset\" that's not an issue (since it needs write \npermissions anyway), but just in general.. git programs mostly use pipes \nto communicate, and temporary files are pretty rare, so we hopefully don't \nhave that issue much, but let's make sure that things that just look at a \nrepository can work even with a read-only repo.\n\n\t\tLinus\n"},{"id":"14192","messageId":"81b0412b0601050847h1dcd5e81sd5eef3f03df6d1de@mail.gmail.com","threadId":"2977","inReplyTo":"43BD4B73.7010000@zytor.com","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-01-05T16:47:06Z","receivedAt":"2006-01-05T16:47:06Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 1/5/06, H. Peter Anvin <hpa@zytor.com> wrote:\n> > Not every system (will not one microsoft windows system) have /var/tmp,\n> > whereas using GIT_DIR for random temporary files is more or less established.\n>\n> Depends on what you're doing.  Only if you're writing to the repository.\n>\n> Windows will usually have $TMP and/or $TEMP, a lot of Unix apps honour\n> $TMP_DIR.\n\nWell, it never had TMP/TEMP by default for me (though I'd expect from people\ninstalling git to set the thing properly), and it is usually undefined\neverywhere else.\n"},{"id":"14193","messageId":"Pine.LNX.4.63.0601051048490.667@gheavc.wnzcbav.cig","threadId":"2977","inReplyTo":"Pine.LNX.4.64.0601050840010.3169@g5.osdl.org","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"Jon Nelson","fromEmail":"jnelson-git@jamponi.net","sentAt":"2006-01-05T16:49:36Z","receivedAt":"2006-01-05T16:49:36Z","isPatch":false,"sender":{"key":"jnelson-git@jamponi.net","avatar":null},"body":"On Thu, 5 Jan 2006, Linus Torvalds wrote:\n\n> \n> \n> On Thu, 5 Jan 2006, Alex Riesen wrote:\n> >\n> > Not every system (will not one microsoft windows system) have /var/tmp,\n> > whereas using GIT_DIR for random temporary files is more or less established.\n> \n> Note that in this case it might be appropriate, but in general you should \n> be careful. You may want to access a git directory without actually having \n> write permissions to it. \n> \n> Of course, for \"git reset\" that's not an issue (since it needs write \n> permissions anyway), but just in general.. git programs mostly use pipes \n> to communicate, and temporary files are pretty rare, so we hopefully don't \n> have that issue much, but let's make sure that things that just look at a \n> repository can work even with a read-only repo.\n\nDo you still need write access to $GIT_DIR if $GIT_INDEX_FILE is set to \nsome place outside of $GIT_DIR?\n\n--\nJon Nelson <jnelson-git@jamponi.net>\n"},{"id":"14194","messageId":"43BD526F.2040300@zytor.com","threadId":"2977","inReplyTo":"81b0412b0601050847h1dcd5e81sd5eef3f03df6d1de@mail.gmail.com","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-05T17:07:59Z","receivedAt":"2006-01-05T17:07:59Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Alex Riesen wrote:\n> On 1/5/06, H. Peter Anvin <hpa@zytor.com> wrote:\n> \n>>>Not every system (will not one microsoft windows system) have /var/tmp,\n>>>whereas using GIT_DIR for random temporary files is more or less established.\n>>\n>>Depends on what you're doing.  Only if you're writing to the repository.\n>>\n>>Windows will usually have $TMP and/or $TEMP, a lot of Unix apps honour\n>>$TMP_DIR.\n> \n> \n> Well, it never had TMP/TEMP by default for me (though I'd expect from people\n> installing git to set the thing properly), and it is usually undefined\n> everywhere else.\n\nWell, for me it's set to\n\nTEMP=C:\\Documents and Settings\\user\\Local Settings\\Temp\n\n(except it's all in 8.3-mangled form)... and I sure as Hades didn't set \nit.  This in on XP SP2.  \"Local Settings\" is a hidden directory which \nseems to have stuff like the Internet Exploder cache in it.\n\n\t-hpa\n"},{"id":"14198","messageId":"20060106093213.GA4268@steel.home","threadId":"2977","inReplyTo":"Pine.LNX.4.63.0601051048490.667@gheavc.wnzcbav.cig","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-01-06T09:32:13Z","receivedAt":"2006-01-06T09:32:13Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Jon Nelson, Thu, Jan 05, 2006 17:49:36 +0100:\n> Do you still need write access to $GIT_DIR if $GIT_INDEX_FILE is set to \n> some place outside of $GIT_DIR?\n\nyes, $GIT_DIR/refs/heads/ref-pointed-by-HEAD is updated by git-reset.\n"},{"id":"14199","messageId":"Pine.LNX.4.63.0601061057470.19735@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2977","inReplyTo":"20060106093213.GA4268@steel.home","subject":"Re: use GIT_DIR instead of /var/tmp","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-01-06T10:00:48Z","receivedAt":"2006-01-06T10:00:48Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 6 Jan 2006, Alex Riesen wrote:\n\n> Jon Nelson, Thu, Jan 05, 2006 17:49:36 +0100:\n> > Do you still need write access to $GIT_DIR if $GIT_INDEX_FILE is set to \n> > some place outside of $GIT_DIR?\n> \n> yes, $GIT_DIR/refs/heads/ref-pointed-by-HEAD is updated by git-reset.\n\nIn a strict sense, this means write access to $GIT_DIR/refs/heads/. In a \nshared setup, I have repositories where all developers are allowed to \nwrite to that folder, but only the repo maintainer (yours truly) is \nallowed to write to $GIT_DIR (which effectively means: nobody can write \nan index).\n\nMaybe the safe method would be to introduce $GIT_TMP_DIR, with \"/tmp/\" \nbeing the default?\n\nCiao,\nDscho\n"}]}