1. 20 5月, 2006 1 次提交
    • S
      General ref log reading improvements. · e5229042
      Shawn Pearce 提交于
      Corrected the log starting time displayed in the error message
      (as it was always showing the epoch due to a bad input to strtoul).
      
      Improved the log parser so we only scan backwards towards the
      '\n' from the end of the prior log; during this scan the last '>'
      is remembered to improve performance (rather than scanning forward
      to it).
      
      If the log record matched is the last log record in the file only
      use its new sha1 value if the date matches exactly; otherwise we
      leave the passed in sha1 alone as it already contains the current
      value of the ref.  This way lookups of dates later than the log
      end to stick with the current ref value in case the ref was updated
      without logging.
      
      If it looks like someone changed the ref without logging it and we
      are going to return the sha1 which should have been valid during
      the missing period then warn the user that there might be log data
      missing and thus their query result may not be accurate.  The check
      isn't perfect as its just based on comparing the old and new sha1
      values between the two log records but its better than not checking
      at all.
      
      Implemented test cases based on git-rev-parse for most of the
      boundary conditions.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e5229042
  2. 18 5月, 2006 5 次提交
  3. 15 5月, 2006 1 次提交
  4. 06 5月, 2006 1 次提交
  5. 03 5月, 2006 1 次提交
  6. 10 3月, 2006 1 次提交
  7. 01 3月, 2006 1 次提交
  8. 23 2月, 2006 1 次提交
  9. 20 1月, 2006 1 次提交
  10. 18 12月, 2005 2 次提交
  11. 17 12月, 2005 1 次提交
  12. 16 12月, 2005 2 次提交
  13. 08 12月, 2005 1 次提交
  14. 20 11月, 2005 1 次提交
    • J
      Do not DWIM in userpath library under strict mode. · 0870ca7f
      Junio C Hamano 提交于
      This should force git-daemon administrator's job a bit harder
      because the exact paths need to be given in the whitelist, but
      at the same time makes the auditing easier.
      
      This moves validate_symref() from refs.c to path.c, because we
      need to link path.c with git-daemon for its "enter_repo()", but
      we do not want to link the daemon with the rest of git libraries
      and its requirements.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0870ca7f
  15. 17 11月, 2005 1 次提交
  16. 16 11月, 2005 1 次提交
  17. 26 10月, 2005 1 次提交
  18. 16 10月, 2005 2 次提交
    • J
      git-check-ref-format: reject funny ref names. · 652d5dc6
      Junio C Hamano 提交于
      Update check_ref_format() function to reject ref names that:
      
       * has a path component that begins with a ".", or
       * has a double dots "..", or
       * has ASCII control character, "~", "^", ":" or SP, anywhere, or
       * ends with a "/".
      
      Use it in 'git-checkout -b', 'git-branch', and 'git-tag' to make sure
      that newly created refs are well-formed.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      652d5dc6
    • J
      git-check-ref-format: reject funny ref names. · 03feddd6
      Junio C Hamano 提交于
      Update check_ref_format() function to reject ref names that:
      
       * has a path component that begins with a ".", or
       * has a double dots "..", or
       * has ASCII control character, "~", "^", ":" or SP, anywhere, or
       * ends with a "/".
      
      Use it in 'git-checkout -b', 'git-branch', and 'git-tag' to make sure
      that newly created refs are well-formed.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      03feddd6
  19. 15 10月, 2005 1 次提交
  20. 06 10月, 2005 1 次提交
  21. 02 10月, 2005 3 次提交
    • J
      Add git-symbolic-ref · 8098a178
      Junio C Hamano 提交于
      This adds the counterpart of git-update-ref that lets you read
      and create "symbolic refs".  By default it uses a symbolic link
      to represent ".git/HEAD -> refs/heads/master", but it can be compiled
      to use the textfile symbolic ref.
      
      The places that did 'readlink .git/HEAD' and 'ln -s refs/heads/blah
      .git/HEAD' have been converted to use new git-symbolic-ref command, so
      that they can deal with either implementation.
      Signed-off-by: NJunio C Hamano <junio@twinsun.com>
      8098a178
    • J
      Use resolve_ref() to implement read_ref(). · a876ed83
      Junio C Hamano 提交于
      Symbolic refs are understood by resolve_ref(), so existing read_ref()
      users will automatically understand them as well.
      Signed-off-by: NJunio C Hamano <junio@twinsun.com>
      a876ed83
    • L
      [PATCH] Allow reading "symbolic refs" that point to other refs · ca8db142
      Linus Torvalds 提交于
      This extends the ref reading to understand a "symbolic ref": a ref file
      that starts with "ref: " and points to another ref file, and thus
      introduces the notion of ref aliases.
      
      This is in preparation of allowing HEAD to eventually not be a symlink,
      but one of these symbolic refs instead.
      
      [jc: Linus originally required the prefix to be "ref: " five bytes
       and nothing else, but I changed it to allow and strip any number of
       leading whitespaces to match what update-ref.c does.]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ca8db142
  22. 17 8月, 2005 1 次提交
    • M
      [PATCH] Make do_each_ref() follow symlinks. · a7e66ae3
      Matt Draisey 提交于
      Because there is no reason not to, and this makes things a bit
      safer when running "git prune".
      
      [jc: I do not necessarily agree with the reasoning of the
      original author that it is a good way to keep "git prune" from
      stomping on objects to have a symlink that points at .git/refs
      of the repository A in the .git/refs of the repository B when
      repository A borrows object database from repository B.  For one
      thing, the object database that everybody borrows objects from
      may not even have its own .git/refs hierarchy.  Come to think of
      it, maybe we should disallow symlink inside .git/refs hierarchy;
      we update the files there by creat/rename pair, so having
      symlinks would not work anyway when you do anything that would
      update them.]
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      a7e66ae3
  23. 10 8月, 2005 1 次提交
    • T
      [PATCH] -Werror fixes · 4ec99bf0
      Timo Sirainen 提交于
      GCC's format __attribute__ is good for checking errors, especially
      with -Wformat=2 parameter. This fixes most of the reported problems
      against 2005-08-09 snapshot.
      4ec99bf0
  24. 09 7月, 2005 1 次提交
    • L
      Make "for_each_ref()" always use the "canonical" refname. · 99a0a6e0
      Linus Torvalds 提交于
      It always uses a git-relative pathname, ie "refs/heads/master" instead of
      ".git/refs/heads/master" or whatever your GIT_DIR might be.
      
      This way when we send refs back-and-forth between repositories, there's
      never any question about GIT_DIR on either side.
      99a0a6e0
  25. 06 7月, 2005 2 次提交
  26. 05 7月, 2005 1 次提交
  27. 04 7月, 2005 1 次提交
  28. 03 7月, 2005 1 次提交
  29. 07 6月, 2005 1 次提交