1. 12 7月, 2007 1 次提交
    • J
      branch --track: code cleanup and saner handling of local branches · 6f084a56
      Johannes Schindelin 提交于
      This patch cleans up some complicated code, and replaces it with a
      cleaner version, using code from remote.[ch], which got extended a
      little in the process.  This also enables us to fix two cases:
      
      The earlier "fix" to setup tracking only when the original ref started
      with "refs/remotes" is wrong.  You are absolutely allowed to use a
      separate layout for your tracking branches.  The correct fix, of course,
      is to set up tracking information only when there is a matching
      remote.<nick>.fetch line containing a colon.
      
      Another corner case was not handled properly.  If two remotes write to
      the original ref, just warn the user and do not set up tracking.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6f084a56
  2. 09 7月, 2007 1 次提交
    • J
      branch.autosetupmerge: allow boolean values, or "all" · 4017761f
      Johannes Schindelin 提交于
      Junio noticed that switching on autosetupmerge unilaterally started
      cluttering the config for local branches.  That is not the original
      intention of branch.autosetupmerge, which was meant purely for
      convenience when branching off of remote branches, but that semantics
      got lost somewhere.
      
      If you still want that "new" behavior, you can switch
      branch.autosetupmerge to the value "all".  Otherwise, it is interpreted
      as a boolean, which triggers setting up defaults _only_ when branching
      off of a remote branch, i.e. the originally intended behavior.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4017761f
  3. 07 7月, 2007 1 次提交
  4. 05 7月, 2007 1 次提交
  5. 03 7月, 2007 1 次提交
  6. 25 6月, 2007 1 次提交
    • J
      Add core.quotepath configuration variable. · 9378c161
      Junio C Hamano 提交于
      We always quote "unusual" byte values in a pathname using
      C-string style, to make it safer for parsing scripts that do not
      handle NUL separated records well (or just too lazy to bother).
      The absolute minimum bytes that need to be quoted for this
      purpose are TAB, LF (and other control characters), double quote
      and backslash.
      
      However, we have also always quoted the bytes in high 8-bit
      range; this was partly because we were lazy and partly because
      we were being cautious.
      
      This introduces an internal "quote_path_fully" variable, and
      core.quotepath configuration variable to control it.  When set
      to false, it does not quote bytes in high 8-bit range anymore
      but passes them intact.
      
      The variable defaults to "true" to retain the traditional
      behaviour for now.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9378c161
  7. 10 6月, 2007 1 次提交
  8. 07 6月, 2007 2 次提交
    • J
      War on whitespace · a6080a0a
      Junio C Hamano 提交于
      This uses "git-apply --whitespace=strip" to fix whitespace errors that have
      crept in to our source files over time.  There are a few files that need
      to have trailing whitespaces (most notably, test vectors).  The results
      still passes the test, and build result in Documentation/ area is unchanged.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a6080a0a
    • M
      introduce GIT_WORK_TREE to specify the work tree · 892c41b9
      Matthias Lederhofer 提交于
      setup_gdg is used as abbreviation for setup_git_directory_gently.
      
      The work tree can be specified using the environment variable
      GIT_WORK_TREE and the config option core.worktree (the environment
      variable has precendence over the config option).  Additionally
      there is a command line option --work-tree which sets the
      environment variable.
      
      setup_gdg does the following now:
      
      GIT_DIR unspecified
      repository in .git directory
          parent directory of the .git directory is used as work tree,
          GIT_WORK_TREE is ignored
      
      GIT_DIR unspecified
      repository in cwd
          GIT_DIR is set to cwd
          see the cases with GIT_DIR specified what happens next and
          also see the note below
      
      GIT_DIR specified
      GIT_WORK_TREE/core.worktree unspecified
          cwd is used as work tree
      
      GIT_DIR specified
      GIT_WORK_TREE/core.worktree specified
          the specified work tree is used
      
      Note on the case where GIT_DIR is unspecified and repository is in cwd:
          GIT_WORK_TREE is used but is_inside_git_dir is always true.
          I did it this way because setup_gdg might be called multiple
          times (e.g. when doing alias expansion) and in successive calls
          setup_gdg should do the same thing every time.
      
      Meaning of is_bare/is_inside_work_tree/is_inside_git_dir:
      
      (1) is_bare_repository
          A repository is bare if core.bare is true or core.bare is
          unspecified and the name suggests it is bare (directory not
          named .git).  The bare option disables a few protective
          checks which are useful with a working tree.  Currently
          this changes if a repository is bare:
              updates of HEAD are allowed
              git gc packs the refs
              the reflog is disabled by default
      
      (2) is_inside_work_tree
          True if the cwd is inside the associated working tree (if there
          is one), false otherwise.
      
      (3) is_inside_git_dir
          True if the cwd is inside the git directory, false otherwise.
          Before this patch is_inside_git_dir was always true for bare
          repositories.
      
      When setup_gdg finds a repository git_config(git_default_config) is
      always called.  This ensure that is_bare_repository makes use of
      core.bare and does not guess even though core.bare is specified.
      
      inside_work_tree and inside_git_dir are set if setup_gdg finds a
      repository.  The is_inside_work_tree and is_inside_git_dir functions
      will die if they are called before a successful call to setup_gdg.
      Signed-off-by: NMatthias Lederhofer <matled@gmx.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      892c41b9
  9. 03 6月, 2007 1 次提交
    • J
      Create a new manpage for the gitignore format, and reference it elsewhere · cedb8d5d
      Josh Triplett 提交于
      Only git-ls-files(1) describes the gitignore format in detail, and it does so
      with reference to git-ls-files options.  Most users don't use the plumbing
      command git-ls-files directly, and shouldn't have to look in its manpage for
      information on the gitignore format.
      
      Create a new manpage gitignore(5) (Documentation/gitignore.txt), and factor
      out the gitignore documentation into that file, changing it to refer to
      .gitignore and $GIT_DIR/info/exclude as used by porcelain commands.  Reference
      gitignore(5) from other relevant manpages and documentation.  Remove
      now-redundant information on exclude patterns from git-ls-files(1), leaving
      only information on how git-ls-files options specify exclude patterns and what
      precedence they have.
      Signed-off-by: NJosh Triplett <josh@freedesktop.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cedb8d5d
  10. 29 5月, 2007 2 次提交
  11. 24 5月, 2007 1 次提交
  12. 23 5月, 2007 1 次提交
  13. 22 5月, 2007 1 次提交
  14. 11 5月, 2007 3 次提交
    • T
      Add --aggressive option to 'git gc' · 0d7566a5
      Theodore Tso 提交于
      This option causes 'git gc' to more aggressively optimize the
      repository at the cost of taking much more wall clock and CPU time.
      
      Today this option causes git-pack-objects to use --no-use-delta
      option, and it allows the --window parameter to be set via the
      gc.aggressiveWindow configuration parameter.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0d7566a5
    • D
      Custom compression levels for objects and packs · 960ccca6
      Dana How 提交于
      Add config variables pack.compression and core.loosecompression ,
      and switch --compression=level to pack-objects.
      
      Loose objects will be compressed using core.loosecompression if set,
      else core.compression if set, else Z_BEST_SPEED.
      Packed objects will be compressed using --compression=level if seen,
      else pack.compression if set, else core.compression if set,
      else Z_DEFAULT_COMPRESSION.  This is the "pack compression level".
      
      Loose objects added to a pack undeltified will be recompressed
      to the pack compression level if it is unequal to the current
      loose compression level by the preceding rules,  or if the loose
      object was written while core.legacyheaders = true.  Newly
      deltified loose objects are always compressed to the current
      pack compression level.
      
      Previously packed objects added to a pack are recompressed
      to the current pack compression level exactly when their
      deltification status changes,  since the previous pack data
      cannot be reused.
      
      In either case,  the --no-reuse-object switch from the first
      patch below will always force recompression to the current pack
      compression level,  instead of assuming the pack compression level
      hasn't changed and pack data can be reused when possible.
      
      This applies on top of the following patches from Nicolas Pitre:
      [PATCH] allow for undeltified objects not to be reused
      [PATCH] make "repack -f" imply "pack-objects --no-reuse-object"
      Signed-off-by: NDana L. How <danahow@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      960ccca6
    • N
      deprecate the new loose object header format · 726f852b
      Nicolas Pitre 提交于
      Now that we encourage and actively preserve objects in a packed form
      more agressively than we did at the time the new loose object format and
      core.legacyheaders were introduced, that extra loose object format
      doesn't appear to be worth it anymore.
      
      Because the packing of loose objects has to go through the delta match
      loop anyway, and since most of them should end up being deltified in
      most cases, there is really little advantage to have this parallel loose
      object format as the CPU savings it might provide is rather lost in the
      noise in the end.
      
      This patch gets rid of core.legacyheaders, preserve the legacy format as
      the only writable loose object format and deprecate the other one to
      keep things simpler.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      726f852b
  15. 09 5月, 2007 2 次提交
  16. 04 5月, 2007 1 次提交
  17. 29 4月, 2007 1 次提交
  18. 24 4月, 2007 1 次提交
  19. 20 4月, 2007 1 次提交
  20. 14 4月, 2007 5 次提交
  21. 19 3月, 2007 2 次提交
    • S
      Limit the size of the new delta_base_cache · 18bdec11
      Shawn O. Pearce 提交于
      The new configuration variable core.deltaBaseCacheLimit allows the
      user to control how much memory they are willing to give to Git for
      caching base objects of deltas.  This is not normally meant to be
      a user tweakable knob; the "out of the box" settings are meant to
      be suitable for almost all workloads.
      
      We default to 16 MiB under the assumption that the cache is not
      meant to consume all of the user's available memory, and that the
      cache's main purpose was to cache trees, for faster path limiters
      during revision traversal.  Since trees tend to be relatively small
      objects, this relatively small limit should still allow a large
      number of objects.
      
      On the other hand we don't want the cache to start storing 200
      different versions of a 200 MiB blob, as this could easily blow
      the entire address space of a 32 bit process.
      
      We evict OBJ_BLOB from the cache first (credit goes to Junio) as
      we want to favor OBJ_TREE within the cache.  These are the objects
      that have the highest inflate() startup penalty, as they tend to
      be small and thus don't have that much of a chance to ammortize
      that penalty over the entire data.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      18bdec11
    • J
      mergetool: Add support for vimdiff. · 9cec6539
      James Bowes 提交于
      Signed-off-by: NJames Bowes <jbowes@dangerouslyinc.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      9cec6539
  22. 16 3月, 2007 1 次提交
    • P
      git-fetch, git-branch: Support local --track via a special remote '.' · 9debc324
      Paolo Bonzini 提交于
      This patch adds support for a dummy remote '.' to avoid having
      to declare a fake remote like
      
              [remote "local"]
                      url = .
                      fetch = refs/heads/*:refs/heads/*
      
      Such a builtin remote simplifies the operation of "git-fetch",
      which will populate FETCH_HEAD but will not pretend that two
      repositories are in use, will not create a thin pack, and will
      not perform any useless remapping of names.  The speed
      improvement is around 20%, and it should improve more if
      "git-fetch" is converted to a builtin.
      
      To this end, git-parse-remote is grown with a new kind of
      remote, 'builtin'.  In git-fetch.sh, we treat the builtin remote
      specially in that it needs no pack/store operations.  In fact,
      doing git-fetch on a builtin remote will simply populate
      FETCH_HEAD appropriately.
      
      The patch also improves of the --track/--no-track support,
      extending it so that branch.<name>.remote items referring '.'
      can be created.  Finally, it fixes a typo in git-checkout.sh.
      Signed-off-by: NPaolo Bonzini  <bonzini@gnu.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9debc324
  23. 14 3月, 2007 1 次提交
  24. 04 3月, 2007 1 次提交
  25. 03 3月, 2007 1 次提交
    • J
      Add core.symlinks to mark filesystems that do not support symbolic links. · 78a8d641
      Johannes Sixt 提交于
      Some file systems that can host git repositories and their working copies
      do not support symbolic links. But then if the repository contains a symbolic
      link, it is impossible to check out the working copy.
      
      This patch enables partial support of symbolic links so that it is possible
      to check out a working copy on such a file system.  A new flag
      core.symlinks (which is true by default) can be set to false to indicate
      that the filesystem does not support symbolic links. In this case, symbolic
      links that exist in the trees are checked out as small plain files, and
      checking in modifications of these files preserve the symlink property in
      the database (as long as an entry exists in the index).
      
      Of course, this does not magically make symbolic links work on such defective
      file systems; hence, this solution does not help if the working copy relies
      on that an entry is a real symbolic link.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      78a8d641
  26. 26 2月, 2007 1 次提交
  27. 24 2月, 2007 1 次提交
  28. 22 2月, 2007 1 次提交
  29. 21 2月, 2007 1 次提交
    • T
      Allow git-remote to update named groups of remotes · 1918278e
      Theodore Ts'o 提交于
      In response to a feature request from Shawn Pearce, this patch allows
      a user to update a named group of remotes by using "git remote update
      <group>", where the group is defined in the config file by
      remotes.<group>.  The default if the named group is not specified is
      now fetched group remotes.default, instead of remote.fetch, which is
      what had been previously used.
      
      In addition, if remotes.default is not defined, all remotes defined in
      the config file will be used, as before, but there is now also
      possible to request that a particular repository to be skipped by
      default by using the boolean configuration parameter
      remote.<name>.skipDefaultUpdate.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1918278e
  30. 20 2月, 2007 1 次提交