1. 17 Feb, 2016 1 commit
    • index: allow read of index w/ illegal entries · 318b825e
      Allow `git_index_read` to handle reading existing indexes with
      illegal entries.  Allow the low-level `git_index_add` to add
      properly formed `git_index_entry`s even if they contain paths
      that would be illegal for the current filesystem (eg, `AUX`).
      Continue to disallow `git_index_add_bypath` from adding entries
      that are illegal universally illegal (eg, `.git`, `foo/../bar`).
      Edward Thomson committed
  2. 11 Feb, 2016 1 commit
  3. 09 Feb, 2016 1 commit
  4. 23 Nov, 2015 1 commit
    • checkout: only consider nsecs when built that way · 25e84f95
      When examining the working directory and determining whether it's
      up-to-date, only consider the nanoseconds in the index entry when
      built with `GIT_USE_NSEC`.  This prevents us from believing that
      the working directory is always dirty when the index was originally
      written with a git client that uinderstands nsecs (like git 2.x).
      Edward Thomson committed
  5. 28 Oct, 2015 1 commit
  6. 05 Oct, 2015 1 commit
  7. 17 Sep, 2015 1 commit
    • git_futils_mkdir_*: make a relative-to-base mkdir · ac2fba0e
      Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
      assumes that we own everything beneath the base, as if it were
      being called with a base of the repository or working directory,
      and is tailored towards checkout and ensuring that there is no
      bogosity beneath the base that must be cleaned up.
      
      This is (at best) slow and (at worst) unsafe in the larger context
      of a filesystem where we do not own things and cannot do things like
      unlink symlinks that are in our way.
      Edward Thomson committed
  8. 16 Sep, 2015 1 commit
    • checkout: overwrite files with differing modes · eea7c850
      When a file exists on disk and we're checking out a file that differs
      in executableness, remove the old file.  This allows us to recreate the
      new file with p_open, which will take the new mode into account and
      handle setting the umask properly.
      
      Remove any notion of chmod'ing existing files, since it is now handled
      by the aforementioned removal and was incorrect, as it did not take
      umask into account.
      Edward Thomson committed
  9. 30 Aug, 2015 1 commit
  10. 28 Aug, 2015 1 commit
  11. 12 Jul, 2015 1 commit
  12. 25 Jun, 2015 1 commit
  13. 22 Jun, 2015 3 commits
    • submodule: add an ignore option to status · c6f489c9
      This lets us specify in the status call which ignore rules we want to
      use (optionally falling back to whatever the submodule has in its
      configuration).
      
      This removes one of the reasons for having `_set_ignore()` set the value
      in-memory. We re-use the `IGNORE_RESET` value for this as it is no
      longer relevant but has a similar purpose to `IGNORE_FALLBACK`.
      
      Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of
      initializers and move that to fall back to the configuration as well.
      Carlos Martín Nieto committed
    • submodule: don't let status change an existing instance · 64bbd47a
      As submodules are becomes more like values, we should not let a status
      check to update its properties. Instead of taking a submodule, have
      status take a repo and submodule name.
      Carlos Martín Nieto committed
    • submodule: remove the per-repo cache · dfda2f68
      Having this cache and giving them out goes against our multithreading
      guarantees and it makes it impossible to use submodules in a
      multi-threaded environment, as any thread can ask for a refresh which
      may reallocate some string in the submodule struct which we've accessed
      in a different one via a getter.
      
      This makes the submodules behave more like remotes, where each object is
      created upon request and not shared except explicitly by the user. This
      means that some tests won't pass yet, as they assume they can affect the
      submodule objects in the cache and that will affect later operations.
      Carlos Martín Nieto committed
  14. 20 Jun, 2015 1 commit
  15. 16 Jun, 2015 1 commit
  16. 29 May, 2015 1 commit
    • Rename GIT_EMERGECONFLICT to GIT_ECONFLICT · 885b94aa
      We do not error on "merge conflicts"; on the contrary, merge conflicts
      are a normal part of merging.  We only error on "checkout conflicts",
      where a change exists in the index or the working directory that would
      otherwise be overwritten by performing the checkout.
      
      This *may* happen during merge (after the production of the new index
      that we're going to checkout) but it could happen during any checkout.
      Edward Thomson committed
  17. 11 May, 2015 1 commit
  18. 04 May, 2015 3 commits
  19. 28 Apr, 2015 1 commit
    • Fix some build warnings · 69f0032b
      In checkout.c and filter.c we were casting a sub struct
      to a parent struct which breaks the strict aliasing rules
      in C. However we can use .parent or .base to access the
      parent struct to avoid the build warnings.
      
      In remote.c the local variable error was not initialized
      or updated in some cases. For unintialized error a build
      warning will be generated. So always keep error variable
      up-to-date.
      Leo Yang committed
  20. 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
  21. 16 Apr, 2015 1 commit
  22. 06 Apr, 2015 1 commit
    • Fix git_checkout_tree() to do index filemodes correctly on Windows. · 67db2bde
      git_checkout_tree() has some fallback behaviors for file systems
      which don't have full support of filemodes.  Generally works fine,
      but if a given file had a change of type from a 0644 to 0755 (i.e.,
      you add executable permissions), the fallback behavior incorrectly
      triggers when writing hte updated index.
      
      This would cause a git_checkout_tree() command, even with the
      GIT_CHECKOUT_FORCE option set, to leave a dirty index on Windows.
      
      Also added checks to an existing test to catch this case.
      John Fultz committed
  23. 23 Mar, 2015 1 commit
  24. 03 Mar, 2015 1 commit
    • config: borrow refcounted references · 9a97f49e
      This changes the get_entry() method to return a refcounted version of
      the config entry, which you have to free when you're done.
      
      This allows us to avoid freeing the memory in which the entry is stored
      on a refresh, which may happen at any time for a live config.
      
      For this reason, get_string() has been forbidden on live configs and a
      new function get_string_buf() has been added, which stores the string in
      a git_buf which the user then owns.
      
      The functions which parse the string value takea advantage of the
      borrowing to parse safely and then release the entry.
      Carlos Martín Nieto committed
  25. 27 Feb, 2015 2 commits
  26. 19 Feb, 2015 3 commits
  27. 18 Feb, 2015 2 commits
  28. 17 Feb, 2015 2 commits
  29. 15 Feb, 2015 1 commit
  30. 14 Feb, 2015 1 commit
  31. 04 Feb, 2015 1 commit