1. 05 12月, 2008 1 次提交
  2. 03 12月, 2008 1 次提交
  3. 13 10月, 2008 1 次提交
  4. 24 9月, 2008 1 次提交
  5. 10 9月, 2008 2 次提交
  6. 01 9月, 2008 1 次提交
    • J
      git wrapper: DWIM mistyped commands · 8af84dad
      Johannes Schindelin 提交于
      This patch introduces a modified Damerau-Levenshtein algorithm into
      Git's code base, and uses it with the following penalties to show some
      similar commands when an unknown command was encountered:
      
      	swap = 0, insertion = 1, substitution = 2, deletion = 4
      
      A typical output would now look like this:
      
      	$ git sm
      	git: 'sm' is not a git-command. See 'git --help'.
      
      	Did you mean one of these?
      		am
      		rm
      
      The cut-off is at similarity rating 6, which was empirically determined
      to give sensible results.
      
      As a convenience, if there is only one candidate, Git continues under
      the assumption that the user mistyped it.  Example:
      
      	$ git reabse
      	WARNING: You called a Git program named 'reabse', which does
      	not exist.
      	Continuing under the assumption that you meant 'rebase'
      	[...]
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8af84dad
  7. 29 8月, 2008 1 次提交
    • N
      diff*: fix worktree setup · 4f38f6b5
      Nguyễn Thái Ngọc Duy 提交于
      This fixes "git diff", "git diff-files" and "git diff-index" to work
      correctly under worktree setup. Because diff* family works in many modes
      and not all of them require worktree, Junio made a nice summary
      (with a little modification from me):
      
       * diff-files is about comparing with work tree, so it obviously needs a
        work tree;
      
       * diff-index also does, except "diff-index --cached" or "diff --cached TREE"
      
       * no-index is about random files outside git context, so it obviously
         doesn't need any work tree;
      
       * comparing two (or more) trees doesn't;
      
       * comparing two blobs doesn't;
      
       * comparing a blob with a random file doesn't;
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4f38f6b5
  8. 26 8月, 2008 1 次提交
    • J
      Revert "Build-in "git-shell"" · 1e7abc59
      Junio C Hamano 提交于
      This reverts commit daa0cc9a.
      It was a stupid idea to do this; when run as a log-in shell,
      it is spawned with argv[0] set to "-git-shell", so the usual
      name-based dispatch would not work to begin with.
      1e7abc59
  9. 20 8月, 2008 1 次提交
  10. 26 7月, 2008 1 次提交
  11. 22 7月, 2008 1 次提交
  12. 08 7月, 2008 1 次提交
  13. 06 7月, 2008 1 次提交
    • J
      Allow per-command pager config · 4e10738a
      Jeff King 提交于
      There is great debate over whether some commands should set
      up a pager automatically. This patch allows individuals to
      set their own pager preferences for each command, overriding
      the default. For example, to disable the pager for git
      status:
      
        git config pager.status false
      
      If "--pager" or "--no-pager" is specified on the command
      line, it takes precedence over the config option.
      
      There are two caveats:
      
        - you can turn on the pager for plumbing commands.
          Combined with "core.pager = always", this will probably
          break a lot of things. Don't do it.
      
        - This only works for builtin commands. The reason is
          somewhat complex:
      
          Calling git_config before we do setup_git_directory
          has bad side effects, because it wants to know where
          the git_dir is to find ".git/config". Unfortunately,
          we cannot call setup_git_directory indiscriminately,
          because some builtins (like "init") break if we do.
      
          For builtins, this is OK, since we can just wait until
          after we call setup_git_directory. But for aliases, we
          don't know until we expand (recursively) which command
          we're doing. This should not be a huge problem for
          aliases, which can simply use "--pager" or "--no-pager"
          in the alias as appropriate.
      
          For external commands, however, we don't know we even
          have an external command until we exec it, and by then
          it is too late to check the config.
      
          An alternative approach would be to have a config mode
          where we don't bother looking at .git/config, but only
          at the user and system config files. This would make the
          behavior consistent across builtins, aliases, and
          external commands, at the cost of not allowing per-repo
          pager config for at all.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4e10738a
  14. 01 7月, 2008 1 次提交
  15. 24 6月, 2008 1 次提交
  16. 23 6月, 2008 1 次提交
  17. 10 6月, 2008 1 次提交
    • R
      Ignore .gitattributes in bare repositories · 2d35d556
      René Scharfe 提交于
      Attributes can be specified at three different places: the internal
      table of default values, the file $GIT_DIR/info/attributes and files
      named .gitattributes in the work tree.  Since bare repositories don't
      have a work tree, git should ignore any .gitattributes files there.
      
      This patch makes git do that, so the only way left for a user to specify
      attributes in a bare repository is the file info/attributes (in addition
      to changing the defaults and recompiling).
      
      In addition, git-check-attr is now allowed to run without a work tree.
      Like any user of the code in attr.c, it ignores the .gitattributes files
      when run in a bare repository.  It can still read from info/attributes.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2d35d556
  18. 07 6月, 2008 1 次提交
  19. 24 5月, 2008 1 次提交
    • J
      diff-files: do not play --no-index games · 6304c29d
      Junio C Hamano 提交于
      Being able to say "git diff A B" outside a git repository and getting a
      colourful version of "diff -u A B" may be nice, but such a cute hack
      should not give bogus results to scripts that want to give two paths,
      either or both of which happen to have been removed from the work tree,
      to "git diff-files".
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6304c29d
  20. 05 5月, 2008 1 次提交
  21. 30 4月, 2008 1 次提交
  22. 02 4月, 2008 1 次提交
    • J
      Accept git aliases outside a git repository · e85dc0a3
      Junio C Hamano 提交于
      af05d679 (Always set *nongit_ok in setup_git_directory_gently(),
      2008-03-25) had a change from the patch originally submitted that resulted
      in disabling aliases outside a git repository.
      
      It turns out that some people used "alias.fubar = diff --color-words" in
      $HOME/.gitconfig to use non-index diff (or any command that do not need
      git repository) outside git repositories, and this change broke them,
      so this resurrects the support for such usage.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e85dc0a3
  23. 27 3月, 2008 1 次提交
  24. 15 3月, 2008 1 次提交
  25. 01 3月, 2008 1 次提交
  26. 25 2月, 2008 1 次提交
  27. 24 2月, 2008 1 次提交
    • J
      Add merge-subtree back · 1736855c
      Junio C Hamano 提交于
      An earlier commit e1b3a2ca (Build-in merge-recursive) made the
      subtree merge strategy backend unavailable.  This resurrects
      it.
      
      A new test t6029 currently only tests the strategy is available,
      but it should be enhanced to check the real "subtree" case.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1736855c
  28. 17 2月, 2008 1 次提交
    • D
      Build in checkout · 782c2d65
      Daniel Barkalow 提交于
      The only differences in behavior should be:
      
       - git checkout -m with non-trivial merging won't print out
         merge-recursive messages (see the change in t7201-co.sh)
      
       - git checkout -- paths... will give a sensible error message if
         HEAD is invalid as a commit.
      
       - some intermediate states which were written to disk in the shell
         version (in particular, index states) are only kept in memory in
         this version, and therefore these can no longer be revealed by
         later write operations becoming impossible.
      
       - when we change branches, we discard MERGE_MSG, SQUASH_MSG, and
         rr-cache/MERGE_RR, like reset always has.
      
      I'm not 100% sure I got the merge recursive setup exactly right; the
      base for a non-trivial merge in the shell code doesn't seem
      theoretically justified to me, but I tried to match it anyway, and the
      tests all pass this way.
      
      Other than these items, the results should be identical to the shell
      version, so far as I can tell.
      
      [jc: squashed lock-file fix from Dscho in]
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      782c2d65
  29. 12 2月, 2008 1 次提交
  30. 10 2月, 2008 1 次提交
    • D
      Build-in merge-recursive · e1b3a2ca
      Daniel Barkalow 提交于
      This makes write_tree_from_memory(), which writes the active cache as
      a tree and returns the struct tree for it, available to other code. It
      also makes available merge_trees(), which does the internal merge of
      two trees with a known base, and merge_recursive(), which does the
      recursive internal merge of two commits with a list of common
      ancestors.
      
      The first two of these will be used by checkout -m, and the third is
      presumably useful in general, although the implementation of checkout
      -m which entirely matches the behavior of the shell version does not
      use it (since it ignores the difference of ancestry between the old
      branch and the new branch).
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      e1b3a2ca
  31. 04 12月, 2007 1 次提交
  32. 03 12月, 2007 1 次提交
  33. 23 11月, 2007 2 次提交
  34. 19 11月, 2007 1 次提交
    • S
      Make git-clean a builtin · 113f10f2
      Shawn Bohrer 提交于
      This replaces git-clean.sh with builtin-clean.c, and moves
      git-clean.sh to the examples.
      
      This also introduces a change in behavior when removing directories
      explicitly specified as a path.  For example currently:
      
      1. When dir has only untracked files, these two behave differently:
      
          $ git clean -n dir
          $ git clean -n dir/
      
      the former says "Would not remove dir/", while the latter would say
      "Would remove dir/untracked" for all paths under it, but not the
      directory itself.
      
      With -d, the former would stop refusing, however since the user
      explicitly asked to remove the directory the -d is no longer required.
      
      2. When there are more parameters:
      
          $ git clean -n dir foo
          $ git clean -n dir/ foo
      
      both cases refuse to remove dir/ unless -d is specified.  Once again
      since both cases requested to remove dir the -d is no longer required.
      
      Thanks to Johannes Schindelin for the conversion to using the
      parse-options API.
      Signed-off-by: NShawn Bohrer <shawn.bohrer@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      113f10f2
  35. 15 11月, 2007 1 次提交
  36. 07 11月, 2007 1 次提交
  37. 06 11月, 2007 2 次提交