1. 15 7月, 2014 12 次提交
  2. 06 6月, 2014 1 次提交
  3. 04 6月, 2014 1 次提交
    • R
      refs.c: change read_ref_at to use the reflog iterators · 4207ed28
      Ronnie Sahlberg 提交于
      read_ref_at has its own parsing of the reflog file for no really good reason
      so lets change this to use the existing reflog iterators. This removes one
      instance where we manually unmarshall the reflog file format.
      
      Remove the now redundant ref_msg function.
      
      Log messages for errors are changed slightly. We no longer print the file
      name for the reflog, instead we refer to it as 'Log for ref <refname>'.
      This might be a minor useability regression, but I don't really think so, since
      experienced users would know where the log is anyway and inexperienced users
      would not know what to do about/how to repair 'Log ... has gap ...' anyway.
      
      Adapt the t1400 test to handle the change in log messages.
      Signed-off-by: NRonnie Sahlberg <sahlberg@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4207ed28
  4. 28 5月, 2014 2 次提交
    • J
      remote prune: optimize "dangling symref" check/warning · e6bea66d
      Jens Lindström 提交于
      When 'git remote prune' was used to delete many refs in a repository
      with many refs, a lot of time was spent checking for (now) dangling
      symbolic refs pointing to the deleted ref, since warn_dangling_symref()
      was once per deleted ref to check all other refs in the repository.
      
      Avoid this using the new warn_dangling_symrefs() function which
      makes one pass over all refs and checks for all the deleted refs in
      one go, after they have all been deleted.
      Signed-off-by: NJens Lindström <jl@opera.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e6bea66d
    • J
      remote: repack packed-refs once when deleting multiple refs · c9e768bb
      Jens Lindström 提交于
      When 'git remote rm' or 'git remote prune' were used in a repository
      with many refs, and needed to delete many remote-tracking refs, a lot
      of time was spent deleting those refs since for each deleted ref,
      repack_without_refs() was called to rewrite packed-refs without just
      that deleted ref.
      
      To avoid this, call repack_without_refs() first to repack without all
      the refs that will be deleted, before calling delete_ref() to delete
      each one completely.  The call to repack_without_ref() in delete_ref()
      then becomes a no-op, since packed-refs already won't contain any of
      the deleted refs.
      Signed-off-by: NJens Lindström <jl@opera.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c9e768bb
  5. 09 5月, 2014 1 次提交
    • R
      refs.c: add new functions reflog_exists and delete_reflog · 4da58835
      Ronnie Sahlberg 提交于
      Add two new functions, reflog_exists and delete_reflog, to hide the internal
      reflog implementation (that they are files under .git/logs/...) from callers.
      Update checkout.c to use these functions in update_refs_for_switch instead of
      building pathnames and calling out to file access functions. Update reflog.c
      to use these to check if the reflog exists. Now there are still many places
      in reflog.c where we are still leaking the reflog storage implementation but
      this at least reduces the number of such dependencies by one. Finally
      change two places in refs.c itself to use the new function to check if a ref
      exists or not isntead of build-path-and-stat(). Now, this is strictly not all
      that important since these are in parts of refs that are implementing the
      actual file storage backend but on the other hand it will not hurt either.
      Signed-off-by: NRonnie Sahlberg <sahlberg@google.com>
      Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4da58835
  6. 08 4月, 2014 10 次提交
  7. 07 3月, 2014 1 次提交
  8. 21 2月, 2014 1 次提交
  9. 22 1月, 2014 6 次提交
  10. 15 1月, 2014 1 次提交
  11. 10 1月, 2014 3 次提交
  12. 06 12月, 2013 1 次提交
    • C
      replace {pre,suf}fixcmp() with {starts,ends}_with() · 59556548
      Christian Couder 提交于
      Leaving only the function definitions and declarations so that any
      new topic in flight can still make use of the old functions, replace
      existing uses of the prefixcmp() and suffixcmp() with new API
      functions.
      
      The change can be recreated by mechanically applying this:
      
          $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
            grep -v strbuf\\.c |
            xargs perl -pi -e '
              s|!prefixcmp\(|starts_with\(|g;
              s|prefixcmp\(|!starts_with\(|g;
              s|!suffixcmp\(|ends_with\(|g;
              s|suffixcmp\(|!ends_with\(|g;
            '
      
      on the result of preparatory changes in this series.
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      59556548