Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce the 'usertemp' filesystem type #9

Merged
merged 1 commit into from
May 25, 2015

Conversation

dscho
Copy link
Member

@dscho dscho commented May 20, 2015

In the context of Git for Windows, the MSys2 root lives inside
%PROGRAMFILES% which is typically write-protected for mere mortals' user
accounts. In particular for /tmp/, this is a problem, because many
scripts assume that writing to /tmp/ is fair game.

MSys1 used to mount /tmp/ automatically, pointing to the current user's
temporary directory.

Let's recreate that functionality in a slightly different way: we now
interpret the filesystem type "usertemp" in the /etc/fstab file. To make
/tmp/ point to the temporary directory of the current user, as per the
%TEMP% environment variable, just add this line to /etc/fstab:

none /tmp usertemp binary,posix=0,noacl,user 0 0

Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de

@dscho
Copy link
Member Author

dscho commented May 20, 2015

This Pull Request is supposed to address git-for-windows/git#143.

The feature implemented here is a bit different from the way it was in MSys1: it does not show up in the list when calling mount without arguments. Other things might be broken, too.

@dscho dscho force-pushed the tempfs branch 2 times, most recently from 051df55 to 695ef25 Compare May 25, 2015 15:15
In the context of Git for Windows, the MSys2 root lives inside
%PROGRAMFILES% which is typically write-protected for mere mortals' user
accounts. In particular for /tmp/, this is a problem, because many
scripts assume that writing to /tmp/ is fair game.

MSys1 used to mount /tmp/ automatically, pointing to the current user's
temporary directory.

Let's recreate that functionality in a slightly different way: we now
interpret the filesystem type "usertemp" in the /etc/fstab file. To make
/tmp/ point to the temporary directory of the current user, as per the
%TMP% environment variable, just add this line to /etc/fstab:

	none /tmp usertemp binary,posix=0 0 0

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request May 25, 2015
Introduce the 'usertemp' filesystem type
@dscho dscho merged commit 833e388 into git-for-windows:develop May 25, 2015
@dscho dscho deleted the tempfs branch May 25, 2015 15:20
dscho added a commit to git-for-windows/build-extra that referenced this pull request May 25, 2015
We just introduced the `usertemp` file system type to mount the
temporary directory to which the environment variable `TMP` points:

	git-for-windows/msys2-runtime#9

Let's make good use of it!

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request Jun 28, 2015
Introduce the 'usertemp' filesystem type
dscho added a commit to dscho/msys2-runtime that referenced this pull request Aug 28, 2015
Introduce the 'usertemp' filesystem type
dscho added a commit that referenced this pull request Sep 16, 2015
Introduce the 'usertemp' filesystem type
dscho added a commit to dscho/msys2-runtime that referenced this pull request Nov 25, 2015
Introduce the 'usertemp' filesystem type
dscho added a commit that referenced this pull request Nov 27, 2015
Introduce the 'usertemp' filesystem type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant