1. 11 Jul, 2012 9 commits
    • Add flag to write gitlink on setting repo workdir · 991a56c7
      This added a flag to the `git_repository_set_workdir()` function
      that enables generation of a `.git` gitlink file that links the
      new workdir to the parent repository.  Essentially, the flag tells
      the function to write out the changes to disk to permanently set
      the workdir of the repository to the new path.
      
      If you pass this flag as true, then setting the workdir to something
      other than the default workdir (i.e. the parent of the .git repo
      directory), will create a plain file named ".git" with the standard
      gitlink contents "gitdir: <repo-path>", and also update the
      "core.worktree" and "core.bare" config values.
      
      Setting the workdir to the default repo workdir will clear the
      core.worktree flag (but still permanently set core.bare to false).
      
      BTW, the libgit2 API does not currently provide a function for
      clearing the workdir and converting a non-bare repo into a bare one.
      Russell Belfer committed
    • Adding git_config_foreach_match() iteration fn · b3ff1dab
      Adding a new config iteration function that let's you iterate
      over just the config entries that match a particular regular
      expression.  The old foreach becomes a simple use of this with
      an empty pattern.
      
      This also fixes an apparent bug in the existing `git_config_foreach`
      where returning a non-zero value from the iteration callback was
      not correctly aborting the iteration and the returned value was
      not being propogated back to the caller of foreach.
      
      Added to tests to cover all these changes.
      Russell Belfer committed
    • Adding unicode space to match crlf patterns · c3a875c9
      Adding 0x85 to `git__isspace` since we also look for that in filter.c
      as a whitespace character.
      Russell Belfer committed
    • Add path utilities to resolve relative paths · b0fe1129
      This makes it easy to take a buffer containing a path with relative
      references (i.e. .. or . path segments) and resolve all of those
      into a clean path.  This can be applied to URLs as well as file
      paths which can be useful.
      
      As part of this, I made the drive-letter detection apply on all
      platforms, not just windows.  If you give a path that looks like
      "c:/..." on any platform, it seems like we might as well detect
      that as a rooted path.  I suppose if you create a directory named
      "x:" on another platform and want to use that as the beginning
      of a relative path under the root directory of your repo, this
      could cause a problem, but then it seems like you're asking for
      trouble.
      Russell Belfer committed
    • Add a couple of useful git_buf utilities · 039fc406
      * `git_buf_rfind` (with tests and tests for `git_buf_rfind_next`)
      * `git_buf_puts_escaped` and `git_buf_puts_escaped_regex` (with tests)
        to copy strings into a buffer while injecting an escape sequence
        (e.g. '\') in front of particular characters.
      Russell Belfer committed
    • Merge pull request #804 from schu/examples-readme · b173cda5
      examples: add README
      Russell Belfer committed
    • Merge pull request #793 from libgit2/tree-entry-by-path · 4d3a7b78
      Bring back `entry_bypath`
      Russell Belfer committed
  2. 10 Jul, 2012 4 commits
  3. 09 Jul, 2012 1 commit
  4. 05 Jul, 2012 1 commit
  5. 03 Jul, 2012 4 commits
  6. 02 Jul, 2012 2 commits
  7. 29 Jun, 2012 7 commits
  8. 28 Jun, 2012 9 commits
  9. 26 Jun, 2012 2 commits
  10. 25 Jun, 2012 1 commit