1. 28 9月, 2006 1 次提交
  2. 27 9月, 2006 6 次提交
  3. 23 9月, 2006 3 次提交
  4. 22 9月, 2006 2 次提交
  5. 21 9月, 2006 7 次提交
    • J
      Merge branch 'lt/refs' into jc/lt-ref2-with-lt-refs · eaf12a8c
      Junio C Hamano 提交于
      * lt/refs: (58 commits)
        git-pack-refs --prune
        pack-refs: do not pack symbolic refs.
        Tell between packed, unpacked and symbolic refs.
        Add callback data to for_each_ref() family.
        symbolit-ref: fix resolve_ref conversion.
        Fix broken sha1 locking
        fsck-objects: adjust to resolve_ref() clean-up.
        gitignore: git-pack-refs is a generated file.
        wt-status: use simplified resolve_ref to find current branch
        Fix t1400-update-ref test minimally
        Enable the packed refs file format
        Make ref resolution saner
        Add support for negative refs
        Start handling references internally as a sorted in-memory list
        gitweb fix validating pg (page) parameter
        git-repack(1): document --window and --depth
        git-apply(1): document --unidiff-zero
        gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
        upload-archive: monitor child communication even more carefully.
        gitweb: export options
        ...
      eaf12a8c
    • J
      Merge branch 'lt/refs' into jc/for-each-ref-with-lt-refs · 340adb8b
      Junio C Hamano 提交于
      * lt/refs: (58 commits)
        git-pack-refs --prune
        pack-refs: do not pack symbolic refs.
        Tell between packed, unpacked and symbolic refs.
        Add callback data to for_each_ref() family.
        symbolit-ref: fix resolve_ref conversion.
        Fix broken sha1 locking
        fsck-objects: adjust to resolve_ref() clean-up.
        gitignore: git-pack-refs is a generated file.
        wt-status: use simplified resolve_ref to find current branch
        Fix t1400-update-ref test minimally
        Enable the packed refs file format
        Make ref resolution saner
        Add support for negative refs
        Start handling references internally as a sorted in-memory list
        gitweb fix validating pg (page) parameter
        git-repack(1): document --window and --depth
        git-apply(1): document --unidiff-zero
        gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
        upload-archive: monitor child communication even more carefully.
        gitweb: export options
        ...
      340adb8b
    • J
      git-pack-refs --prune · 96884601
      Junio C Hamano 提交于
      "git pack-refs --prune", after successfully packing the existing
      refs, removes the loose ref files.  It tries to protect against
      race by doing the usual lock_ref_sha1() which makes sure the
      contents of the ref has not changed since we last looked at.
      
      Also we do not bother trying to prune what was already packed, and
      we do not try pruning symbolic refs.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      96884601
    • J
      pack-refs: do not pack symbolic refs. · 13e4aa90
      Junio C Hamano 提交于
      Now we can tell which one is symbolic and which one is not, it
      is easy to do so.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      13e4aa90
    • J
      Tell between packed, unpacked and symbolic refs. · 8da19775
      Junio C Hamano 提交于
      This adds a "int *flag" parameter to resolve_ref() and makes
      for_each_ref() family to call callback function with an extra
      "int flag" parameter.  They are used to give two bits of
      information (REF_ISSYMREF and REF_ISPACKED) about the ref.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8da19775
    • J
      Add callback data to for_each_ref() family. · cb5d709f
      Junio C Hamano 提交于
      This is a long overdue fix to the API for for_each_ref() family
      of functions.  It allows the callers to specify a callback data
      pointer, so that the caller does not have to use static
      variables to communicate with the callback funciton.
      
      The updated for_each_ref() family takes a function of type
      
      	int (*fn)(const char *, const unsigned char *, void *)
      
      and a void pointer as parameters, and calls the function with
      the name of the ref and its SHA-1 with the caller-supplied void
      pointer as parameters.
      
      The commit updates two callers, builtin-name-rev.c and
      builtin-pack-refs.c as an example.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cb5d709f
    • J
      symbolit-ref: fix resolve_ref conversion. · cc4c4f0c
      Junio C Hamano 提交于
      An earlier conversion accidentally hardcoded "HEAD" to be passed to
      resolve_ref(), thereby causing git-symbolic-ref command to always
      report where the HEAD points at, ignoring the command line parameter.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cc4c4f0c
  6. 20 9月, 2006 3 次提交
    • C
      9c13359a
    • C
      9581e0fc
    • P
      Fix broken sha1 locking · 53cce84c
      Petr Baudis 提交于
      Current git#next is totally broken wrt. cloning over HTTP, generating refs
      at random directories. Of course it's caused by the static get_pathname()
      buffer. lock_ref_sha1() stores return value of mkpath()'s get_pathname()
      call, then calls lock_ref_sha1_basic() which calls git_path(ref) which
      calls get_pathname() at that point returning pointer to the same buffer.
      So now you are sprintf()ing a format string into itself, wow! The resulting
      pathnames are really cute. (If you've been paying attention, yes, the
      mere fact that a format string _could_ write over itself is very wrong
      and probably exploitable here. See the other mail I've just sent.)
      
      I've never liked how we use return values of those functions so liberally,
      the "allow some random number of get_pathname() return values to work
      concurrently" is absolutely horrible pit and we've already fallen in this
      before IIRC. I consider it an awful coding practice, you add a call
      somewhere and at some other point some distant caller of that breaks since
      it reuses the same return values. Not to mention this takes quite some time
      to debug.
      
      My gut feeling tells me that there might be more of this.  I don't have
      time to review the rest of the users of the refs.c functions though.
      Signed-off-by: NPetr Baudis <pasky@suse.cz>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      53cce84c
  7. 19 9月, 2006 1 次提交
  8. 18 9月, 2006 17 次提交