From: Alex Riesen <hidden> Date: 2016-06-15 22:42:15
Not every system (will not one microsoft windows system) have /var/tmp,
whereas using GIT_DIR for random temporary files is more or less established.
Signed-off-by: Alex Riesen <redacted>
From: "H. Peter Anvin" <hpa@zytor.com> Date: 2016-06-15 22:42:15
Alex Riesen wrote:
Not every system (will not one microsoft windows system) have /var/tmp,
whereas using GIT_DIR for random temporary files is more or less established.
Depends on what you're doing. Only if you're writing to the repository.
Windows will usually have $TMP and/or $TEMP, a lot of Unix apps honour
$TMP_DIR.
-hpa
Not every system (will not one microsoft windows system) have /var/tmp,
whereas using GIT_DIR for random temporary files is more or less established.
Note that in this case it might be appropriate, but in general you should
be careful. You may want to access a git directory without actually having
write permissions to it.
Of course, for "git reset" that's not an issue (since it needs write
permissions anyway), but just in general.. git programs mostly use pipes
to communicate, and temporary files are pretty rare, so we hopefully don't
have that issue much, but let's make sure that things that just look at a
repository can work even with a read-only repo.
Linus
From: Alex Riesen <hidden> Date: 2016-06-15 22:42:15
On 1/5/06, H. Peter Anvin [off-list ref] wrote:
quoted
Not every system (will not one microsoft windows system) have /var/tmp,
whereas using GIT_DIR for random temporary files is more or less established.
Depends on what you're doing. Only if you're writing to the repository.
Windows will usually have $TMP and/or $TEMP, a lot of Unix apps honour
$TMP_DIR.
Well, it never had TMP/TEMP by default for me (though I'd expect from people
installing git to set the thing properly), and it is usually undefined
everywhere else.
From: Jon Nelson <hidden> Date: 2016-06-15 22:42:15
On Thu, 5 Jan 2006, Linus Torvalds wrote:
On Thu, 5 Jan 2006, Alex Riesen wrote:
quoted
Not every system (will not one microsoft windows system) have /var/tmp,
whereas using GIT_DIR for random temporary files is more or less established.
Note that in this case it might be appropriate, but in general you should
be careful. You may want to access a git directory without actually having
write permissions to it.
Of course, for "git reset" that's not an issue (since it needs write
permissions anyway), but just in general.. git programs mostly use pipes
to communicate, and temporary files are pretty rare, so we hopefully don't
have that issue much, but let's make sure that things that just look at a
repository can work even with a read-only repo.
Do you still need write access to $GIT_DIR if $GIT_INDEX_FILE is set to
some place outside of $GIT_DIR?
--
Jon Nelson [off-list ref]
From: "H. Peter Anvin" <hpa@zytor.com> Date: 2016-06-15 22:42:15
Alex Riesen wrote:
On 1/5/06, H. Peter Anvin [off-list ref] wrote:
quoted
quoted
Not every system (will not one microsoft windows system) have /var/tmp,
whereas using GIT_DIR for random temporary files is more or less established.
Depends on what you're doing. Only if you're writing to the repository.
Windows will usually have $TMP and/or $TEMP, a lot of Unix apps honour
$TMP_DIR.
Well, it never had TMP/TEMP by default for me (though I'd expect from people
installing git to set the thing properly), and it is usually undefined
everywhere else.
Well, for me it's set to
TEMP=C:\Documents and Settings\user\Local Settings\Temp
(except it's all in 8.3-mangled form)... and I sure as Hades didn't set
it. This in on XP SP2. "Local Settings" is a hidden directory which
seems to have stuff like the Internet Exploder cache in it.
-hpa
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:42:15
Hi,
On Fri, 6 Jan 2006, Alex Riesen wrote:
Jon Nelson, Thu, Jan 05, 2006 17:49:36 +0100:
quoted
Do you still need write access to $GIT_DIR if $GIT_INDEX_FILE is set to
some place outside of $GIT_DIR?
yes, $GIT_DIR/refs/heads/ref-pointed-by-HEAD is updated by git-reset.
In a strict sense, this means write access to $GIT_DIR/refs/heads/. In a
shared setup, I have repositories where all developers are allowed to
write to that folder, but only the repo maintainer (yours truly) is
allowed to write to $GIT_DIR (which effectively means: nobody can write
an index).
Maybe the safe method would be to introduce $GIT_TMP_DIR, with "/tmp/"
being the default?
Ciao,
Dscho