Commit Graph

7 Commits

Author SHA1 Message Date
Vicent Martí
1d415455d9 clay: Move file_create to the helpers file 2012-01-02 10:06:24 +01:00
Carlos Martín Nieto
0c49ec2d3b Implement p_rename
Move the callers of git_futils_mv_atomic to use p_rename.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-07 20:34:27 +01:00
Brodie Rao
01ad7b3a9e *: correct and codify various file permissions
The following files now have 0444 permissions:

- loose objects
- pack indexes
- pack files
- packs downloaded by fetch
- packs downloaded by the HTTP transport

And the following files now have 0666 permissions:

- config files
- repository indexes
- reflogs
- refs

This brings libgit2 more in line with Git.

Note that git_filebuf_commit() and git_filebuf_commit_at() have both
gained a new mode parameter.

The latter change fixes an important issue where filebufs created with
GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
usage). Now we chmod() the file before renaming it into place.

Tests have been added to confirm that new commit, tag, and tree
objects are created with the right permissions. I don't have access to
Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
2011-10-14 16:07:47 -07:00
Vicent Marti
2014021b20 Backport t18 fixes to Clay 2011-09-19 05:41:25 +03:00
Vicent Marti
df297a1f65 Fix Clay compilation under Win32 2011-09-16 19:42:44 +02:00
Vicent Marti
a5f8c1bd9e Add missing prototypes 2011-09-16 05:46:18 +02:00
Vicent Marti
11385c3c4b Add sample "Status" clay tests 2011-09-16 05:13:44 +02:00