1. 21 12月, 2006 1 次提交
  2. 06 12月, 2006 2 次提交
  3. 22 11月, 2006 1 次提交
    • J
      Store peeled refs in packed-refs (take 2). · f4204ab9
      Junio C Hamano 提交于
      This fixes the previous implementation which failed to optimize
      repositories with tons of lightweight tags.  The updated
      packed-refs format begins with "# packed-refs with:" line that
      lists the kind of extended data the file records.  Currently,
      there is only one such extension defined, "peeled".  This stores
      the "peeled tag" on a line that immediately follows a line for a
      tag object itself in the format "^<sha-1>".
      
      The header line itself and any extended data are ignored by
      older implementation, so packed-refs file generated with this
      version can still be used by older git.  packed-refs made by
      older git can of course be used with this version.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f4204ab9
  4. 20 11月, 2006 1 次提交
  5. 06 10月, 2006 1 次提交
  6. 27 9月, 2006 1 次提交
  7. 21 9月, 2006 2 次提交
    • 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
  8. 18 9月, 2006 1 次提交
    • L
      Enable the packed refs file format · 434cd0cd
      Linus Torvalds 提交于
      This actually "turns on" the packed ref file format, now that the
      infrastructure to do so sanely exists (ie notably the change to make the
      reference reading logic take refnames rather than pathnames to the loose
      objects that no longer necessarily even exist).
      
      In particular, when the ref lookup hits a refname that has no loose file
      associated with it, it falls back on the packed-ref information. Also, the
      ref-locking code, while still using a loose file for the locking itself
      (and _creating_ a loose file for the new ref) no longer requires that the
      old ref be in such an unpacked state.
      
      Finally, this does a minimal hack to git-checkout.sh to rather than check
      the ref-file directly, do a "git-rev-parse" on the "heads/$refname".
      That's not really wonderful - we should rather really have a special
      routine to verify the names as proper branch head names, but it is a
      workable solution for now.
      
      With this, I can literally do something like
      
      	git pack-refs
      	find .git/refs -type f -print0 | xargs -0 rm -f --
      
      and the end result is a largely working repository (ie I've done two
      commits - which creates _one_ unpacked ref file - done things like run
      "gitk" and "git log" etc, and it all looks ok).
      
      There are probably things missing, but I'm hoping that the missing things
      are now of the "small and obvious" kind, and that somebody else might want
      to start looking at this too. Hint hint ;)
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      434cd0cd
  9. 07 6月, 2006 2 次提交
    • J
      ref-log: style fixes. · e5f38ec3
      Junio C Hamano 提交于
      A few style fixes to get the code in line with the rest.
      
       - asterisk to make a type a pointer to something goes in front
         of the variable, not at the end of the base type.
         E.g. a pointer to an integer is "int *ip", not "int* ip".
      
       - open parenthesis for function parameter list, unlike
         syntactic constructs, comes immediately after the function
         name.  E.g. "if (foo) bar();" not "if(foo) bar ();".
      
       - "else" does not come on the same line as the closing brace of
         corresponding "if".
      
      The style is mostly a matter of personal taste, and people may
      disagree, but consistency is important.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e5f38ec3
    • J
      refs.c: convert it to use lockfile interface. · c33d5174
      Junio C Hamano 提交于
      This updates the ref locking code to use creat-rename locking
      code we use for the index file, so that it can borrow the code
      to clean things up upon signals and program termination.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      c33d5174
  10. 20 5月, 2006 1 次提交
  11. 18 5月, 2006 3 次提交
    • S
      Support 'master@2 hours ago' syntax · d556fae2
      Shawn Pearce 提交于
      Extended sha1 expressions may now include date specifications
      which indicate a point in time within the local repository's
      history.  If the ref indicated to the left of '@' has a log in
      $GIT_DIR/logs/<ref> then the value of the ref at the time indicated
      by the specification is obtained from the ref's log.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d556fae2
    • S
      Log ref updates to logs/refs/<ref> · 6de08ae6
      Shawn Pearce 提交于
      If config parameter core.logAllRefUpdates is true or the log
      file already exists then append a line to ".git/logs/refs/<ref>"
      whenever git-update-ref <ref> is executed.  Each log line contains
      the following information:
      
        oldsha1 <SP> newsha1 <SP> committer <LF>
      
      where committer is the current user, date, time and timezone in
      the standard GIT ident format.  If the caller is unable to append
      to the log file then git-update-ref will fail without updating <ref>.
      
      An optional message may be included in the log line with the -m flag.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6de08ae6
    • S
      Improve abstraction of ref lock/write. · 4bd18c43
      Shawn Pearce 提交于
      Created 'struct ref_lock' to contain the data necessary to perform
      a ref update.  This change improves writing a ref as the file names
      are generated only once (rather than twice) and supports following
      symrefs (up to the maximum depth).  Further the ref_lock structure
      provides room to extend the update API with ref logging.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4bd18c43
  12. 15 5月, 2006 1 次提交
  13. 06 7月, 2005 1 次提交
  14. 04 7月, 2005 1 次提交
  15. 03 7月, 2005 1 次提交
  16. 07 6月, 2005 1 次提交