1. 12 10月, 2005 1 次提交
  2. 11 10月, 2005 2 次提交
    • J
      Use the same move_temp_to_file in git-http-fetch. · b721e01f
      Junio C Hamano 提交于
      The http commit walker cannot use the same temporary file
      creation code because it needs to use predictable temporary
      filename for partial fetch continuation purposes, but the code
      to move the temporary file to the final location should be
      usable from the ordinary object creation codepath.
      
      Export move_temp_to_file from sha1_file.c and use it, while
      losing the custom relink_or_rename function from http-fetch.c.
      
      Also the temporary object file creation part needs to make sure
      the leading path exists, in preparation of the really lazy
      fan-out directory creation.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b721e01f
    • L
      Add ".git/config" file parser · 17712991
      Linus Torvalds 提交于
      This is a first cut at a very simple parser for a git config file.
      
      The format of the file is a simple ini-file like thing, with simple
      variable/value pairs. You can (and should) make the variables have a
      simple single-level scope, ie a valid file looks something like this:
      
      	#
      	# This is the config file, and
      	# a '#' or ';' character indicates
      	# a comment
      	#
      
      	; core variables
      	[core]
      		; Don't trust file modes
      		filemode = false
      
      	; Our diff algorithm
      	[diff]
      		external = "/usr/local/bin/gnu-diff -u"
      		renames = true
      
      which parses into three variables: "core.filemode" is associated with the
      string "false", and "diff.external" gets the appropriate quoted value.
      
      Right now we only react to one variable: "core.filemode" is a boolean that
      decides if we should care about the 0100 (user-execute) bit of the stat
      information. Even that is just a parsing demonstration - this doesn't
      actually implement that st_mode compare logic itself.
      
      Different programs can react to different config options, although they
      should always fall back to calling "git_default_config()" on any config
      option name that they don't recognize.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      17712991
  3. 09 10月, 2005 1 次提交
  4. 07 10月, 2005 1 次提交
    • J
      Show original and resulting blob object info in diff output. · ec1fcc16
      Junio C Hamano 提交于
      This adds more cruft to diff --git header to record the blob SHA1 and
      the mode the patch/diff is intended to be applied against, to help the
      receiving end fall back on a three-way merge.  The new header looks
      like this:
      
          diff --git a/apply.c b/apply.c
          index 7be5041..8366082 100644
          --- a/apply.c
          +++ b/apply.c
          @@ -14,6 +14,7 @@
           //    files that are being modified, but doesn't apply the patch
           //  --stat does just a diffstat, and doesn't actually apply
          +//  --show-index-info shows the old and new index info for...
          ...
      
      Upon receiving such a patch, if the patch did not apply cleanly to the
      target tree, the recipient can try to find the matching old objects in
      her object database and create a temporary tree, apply the patch to
      that temporary tree, and attempt a 3-way merge between the patched
      temporary tree and the target tree using the original temporary tree
      as the common ancestor.
      
      The patch lifts the code to compute the hash for an on-filesystem
      object from update-index.c and makes it available to the diff output
      routine.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ec1fcc16
  5. 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
  6. 01 10月, 2005 1 次提交
  7. 27 9月, 2005 1 次提交
  8. 25 9月, 2005 1 次提交
  9. 21 9月, 2005 2 次提交
    • L
      [PATCH] Return proper error valud from "parse_date()" · 2a39064c
      Linus Torvalds 提交于
      Right now we don't return any error value at all from parse_date(), and if
      we can't parse it, we just silently leave the result buffer unchanged.
      
      That's fine for the current user, which will always default to the current
      date, but it's a crappy interface, and we might well be better off with an
      error message rather than just the default date.
      
      So let's change the thing to return a negative value if an error occurs,
      and the length of the result otherwise (snprintf behaviour: if the buffer
      is too small, it returns how big it _would_ have been).
      
      [ I started looking at this in case we could support date-based revision
        names. Looks ugly. Would have to parse relative dates.. ]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2a39064c
    • J
      Show modified files in git-ls-files · b0391890
      Junio C Hamano 提交于
      Add -m/--modified to show files that have been modified wrt. the index.
      
      [jc: The original came from Brian Gerst on Sep 1st but it only checked
      if the paths were cache dirty without actually checking the files were
      modified.  I also added the usage string and a new test.]
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b0391890
  10. 13 9月, 2005 1 次提交
  11. 10 9月, 2005 1 次提交
  12. 05 9月, 2005 1 次提交
  13. 30 8月, 2005 1 次提交
    • J
      Revert "Replace zero-length array decls with []." · 2c04662d
      Junio C Hamano 提交于
      This reverts 6c5f9baa commit, whose
      change breaks gcc-2.95.
      
      Not that I ignore portability to compilers that are properly C99, but
      keeping compilation with GCC working is more important, at least for
      now.  We would probably end up declaring with "name[1]" and teach the
      allocator to subtract one if we really aimed for portability, but that
      is left for later rounds.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2c04662d
  14. 25 8月, 2005 1 次提交
  15. 24 8月, 2005 2 次提交
  16. 19 8月, 2005 2 次提交
  17. 18 8月, 2005 1 次提交
  18. 17 8月, 2005 2 次提交
  19. 15 8月, 2005 1 次提交
    • J
      Alternate object pool mechanism updates. · d5a63b99
      Junio C Hamano 提交于
      It was a mistake to use GIT_ALTERNATE_OBJECT_DIRECTORIES
      environment variable to specify what alternate object pools to
      look for missing objects when working with an object database.
      It is not a property of the process running the git commands,
      but a property of the object database that is partial and needs
      other object pools to complete the set of objects it lacks.
      
      This patch allows you to have $GIT_OBJECT_DIRECTORY/info/alternates
      whose contents is in exactly the same format as the environment
      variable, to let an object database name alternate object pools
      it depends on.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d5a63b99
  20. 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
  21. 07 8月, 2005 1 次提交
    • J
      Redo the templates generation and installation. · d3af621b
      Junio C Hamano 提交于
      Per discussion with people interested in binary packaging,
      change the default template location from /etc/git-core to
      /usr/share/git-core hierarchy.  If a user wants to run git
      before installing for whatever reason, in addition to adding
      $src to the PATH environment variable, git-init-db can be run
      with --template=$src/templates/blt/ parameter.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d3af621b
  22. 06 8月, 2005 1 次提交
  23. 04 8月, 2005 2 次提交
    • J
      Renaming push. · f88395ac
      Junio C Hamano 提交于
      This allows git-send-pack to push local refs to a destination
      repository under different names.
      
      Here is the name mapping rules for refs.
      
      * If there is no ref mapping on the command line:
      
       - if '--all' is specified, it is equivalent to specifying
         <local> ":" <local> for all the existing local refs on the
         command line
       - otherwise, it is equivalent to specifying <ref> ":" <ref> for
         all the refs that exist on both sides.
      
      * <name> is just a shorthand for <name> ":" <name>
      
      * <src> ":" <dst>
      
        push ref that matches <src> to ref that matches <dst>.
      
        - It is an error if <src> does not match exactly one of local
          refs.
      
        - It is an error if <dst> matches more than one remote refs.
      
        - If <dst> does not match any remote refs, either
      
          - it has to start with "refs/"; <dst> is used as the
            destination literally in this case.
      
          - <src> == <dst> and the ref that matched the <src> must not
            exist in the set of remote refs; the ref matched <src>
            locally is used as the name of the destination.
      
      For example,
      
        - "git-send-pack --all <remote>" works exactly as before;
      
        - "git-send-pack <remote> master:upstream" pushes local master
          to remote ref that matches "upstream".  If there is no such
          ref, it is an error.
      
        - "git-send-pack <remote> master:refs/heads/upstream" pushes
          local master to remote refs/heads/upstream, even when
          refs/heads/upstream does not exist.
      
        - "git-send-pack <remote> master" into an empty remote
          repository pushes the local ref/heads/master to the remote
          ref/heads/master.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f88395ac
    • J
      Install sample hooks · 8d5afef0
      Junio C Hamano 提交于
      A template mechanism to populate newly initialized repository
      with default set of files is introduced.  Use it to ship example
      hooks that can be used for update and post update checks, as
      Josef Weidendorfer suggests.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8d5afef0
  24. 03 8月, 2005 1 次提交
    • B
      [PATCH] Parallelize pulling by ssh · 70b9829e
      barkalow@iabervon.org 提交于
      This causes ssh-pull to request objects in prefetch() and read then in
      fetch(), such that it reduces the unpipelined round-trip time.
      
      This also makes sha1_write_from_fd() support having a buffer of data
      which it accidentally read from the fd after the object; this was
      formerly not a problem, because it would always get a short read at
      the end of an object, because the next object had not been
      requested. This is no longer true.
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      70b9829e
  25. 01 8月, 2005 2 次提交
  26. 24 7月, 2005 1 次提交
    • J
      [PATCH] Add update-server-info. · 8f3f9b09
      Junio C Hamano 提交于
      The git-update-server-info command prepares informational files
      to help clients discover the contents of a repository, and pull
      from it via a dumb transport protocols.  Currently, the
      following files are produced.
      
       - The $repo/info/refs file lists the name of heads and tags
         available in the $repo/refs/ directory, along with their
         SHA1.  This can be used by git-ls-remote command running on
         the client side.
      
       - The $repo/info/rev-cache file describes the commit ancestry
         reachable from references in the $repo/refs/ directory.  This
         file is in an append-only binary format to make the server
         side friendly to rsync mirroring scheme, and can be read by
         git-show-rev-cache command.
      
       - The $repo/objects/info/pack file lists the name of the packs
         available, the interdependencies among them, and the head
         commits and tags contained in them.  Along with the other two
         files, this is designed to help clients to make smart pull
         decisions.
      
      The git-receive-pack command is changed to invoke it at the end,
      so just after a push to a public repository finishes via "git
      push", the server info is automatically updated.
      
      In addition, building of the rev-cache file can be done by a
      standalone git-build-rev-cache command separately.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8f3f9b09
  27. 17 7月, 2005 1 次提交
  28. 16 7月, 2005 1 次提交
  29. 15 7月, 2005 3 次提交