1. 14 Oct, 2011 6 commits
    • *: correct and codify various file permissions · 01ad7b3a
      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".
      Brodie Rao committed
    • fileops/repository: create (most) directories with 0777 permissions · ce8cd006
      To further match how Git behaves, this change makes most of the
      directories libgit2 creates in a git repo have a file mode of
      0777. Specifically:
      
      - Intermediate directories created with git_futils_mkpath2file() have
        0777 permissions. This affects odb_loose, reflog, and refs.
      
      - The top level folder for bare repos is created with 0777
        permissions.
      
      - The top level folder for non-bare repos is created with 0755
        permissions.
      
      - /objects/info/, /objects/pack/, /refs/heads/, and /refs/tags/ are
        created with 0777 permissions.
      
      Additionally, the following changes have been made:
      
      - fileops functions that create intermediate directories have grown a
        new dirmode parameter. The only exception to this is filebuf's
        lock_file(), which unconditionally creates intermediate directories
        with 0777 permissions when GIT_FILEBUF_FORCE is set.
      
      - The test runner now sets the umask to 0 before running any
        tests. This ensurses all file mode checks are consistent across
        systems.
      
      - t09-tree.c now does a directory permissions check. I've avoided
        adding this check to other tests that might reuse existing
        directories from the prefabricated test repos. Because they're
        checked into the repo, they have 0755 permissions.
      
      - Other assorted directories created by tests have 0777 permissions.
      Brodie Rao committed
    • fileops/posix: replace usage of "int mode" with "mode_t mode" · 33127043
      Note: Functions exported from fileops take const mode_t, while the
      underlying POSIX wrappers take mode_t.
      Brodie Rao committed
    • Merge pull request #457 from khalsah/makefile-fix · 1776f5ab
      Update Makefile.embed with http-parser dependency
      Vicent Martí committed
  2. 13 Oct, 2011 9 commits
  3. 12 Oct, 2011 23 commits
  4. 11 Oct, 2011 2 commits