1. 21 Apr, 2015 1 commit
    • Fix index-adding functions to know when to trust filemodes. · d3282680
      The idea...sometimes, a filemode is user-specified via an
      explicit git_index_entry.  In this case, believe the user, always.
      
      Sometimes, it is instead built up by statting the file system.  In
      those cases, go with the existing logic we have to determine
      whether the file system supports all filemodes and symlinks, and
      make the best guess.
      
      On file systems which have full filemode and symlink support, this
      commit should make no difference.  On others (most notably Windows),
      this will fix problems things like:
      * git_index_add and git_index_add_frombuffer() should be believed.
      * As a consequence, git_checkout_tree should make the filemodes in
      the index match the ones in the tree.
      * And diffs with GIT_DIFF_UPDATE_INDEX don't write the wrong filemodes.
      * And merges, and probably other downstream stuff now fixed, too.
      
      This makes my previous changes to checkout.c unnecessary,
      so they are now reverted.
      
      Also, added a test for index_entry permissions from git_index_add
      and git_index_add_frombuffer, both of which failed before these changes.
      John Fultz committed
  2. 03 Jun, 2014 1 commit
  3. 22 May, 2014 1 commit
  4. 14 Nov, 2013 1 commit
  5. 08 Oct, 2013 1 commit
    • More filemode cleanups for FAT on MacOS · 14997dc5
      This cleans up some additional issues.  The main change is that
      on a filesystem that doesn't support mode bits, libgit2 will now
      create new blobs with GIT_FILEMODE_BLOB always instead of being
      at the mercy to the filesystem driver to report executable or not.
      This means that if "core.filemode" lies and claims that filemode
      is not supported, then we will ignore the executable bit from the
      filesystem.  Previously we would have allowed it.
      
      This adds an option to the new git_repository_reset_filesystem to
      recurse through submodules if desired.  There may be other types
      of APIs that would like a "recurse submodules" option, but this
      one is particularly useful.
      
      This also has a number of cleanups, etc., for related things
      including trying to give better error messages when problems come
      up from the filesystem.  For example, the FAT filesystem driver on
      MacOS appears to return errno EINVAL if you attempt to write a
      filename with invalid UTF-8 in it.  We try to capture that with a
      better error message now.
      Russell Belfer committed
  6. 04 Oct, 2013 1 commit
    • Add git_repository_reset_filesystem and fix tests · 5173ea92
      When a repository is transferred from one file system to another,
      many of the config settings that represent the properties of the
      file system may be wrong.  This adds a new public API that will
      refresh the config settings of the repository to account for the
      change of file system.  This doesn't do a full "reinitialize" and
      operates on a existing git_repository object refreshing the config
      when done.
      
      This commit then makes use of the new API in clar as each test
      repository is set up.
      
      This commit also has a number of other clar test fixes where we
      were making assumptions about the type of filesystem, either based
      on outdated config data or based on the OS instead of the FS.
      Russell Belfer committed
  7. 24 Sep, 2013 1 commit
  8. 22 Mar, 2013 1 commit
  9. 27 Jan, 2013 1 commit
  10. 12 Jan, 2013 1 commit
  11. 27 Nov, 2012 2 commits
  12. 30 Oct, 2012 1 commit
  13. 21 Aug, 2012 1 commit
  14. 19 Jun, 2012 1 commit
    • Make index add/append support core.filemode flag · da825c92
      This fixes git_index_add and git_index_append to behave more like
      core git, preserving old filemode data in the index when adding
      and/or appending with core.filemode = false.
      
      This also has placeholder support for core.symlinks and
      core.ignorecase, but those flags are not implemented (well,
      symlinks has partial support for preserving mode information in
      the same way that git does, but it isn't tested).
      Russell Belfer committed