1. 01 7月, 2011 1 次提交
    • J
      git skew: a tool to find how big a clock skew exists in the history · 188c35e3
      Jeff King 提交于
      > As you probably guessed from the specificity of the number, I wrote a
      > short program to actually traverse and find the worst skew. It takes
      > about 5 seconds to run (unsurprisingly, since it is doing the same full
      > traversal that we end up doing in the above numbers). So we could
      > "autoskew" by setting up the configuration on clone, and then
      > periodically updating it as part of "git gc".
      
      This patch doesn't implement auto-detection of skew, but is the program
      I used to calculate, and would provide the basis for such
      auto-detection. It would be interesting to see average skew numbers for
      popular repositories. You can run it as "git skew --all".
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      188c35e3
  2. 25 6月, 2010 1 次提交
  3. 19 6月, 2010 1 次提交
  4. 11 5月, 2010 1 次提交
  5. 02 4月, 2010 1 次提交
    • J
      make commit_tree a library function · 40d52ff7
      Jeff King 提交于
      Until now, this has been part of the commit-tree builtin.
      However, it is already used by other builtins (like commit,
      merge, and notes), and it would be useful to access it from
      library code.
      
      The check_valid helper has to come along, too, but is given
      a more library-ish name of "assert_sha1_type".
      
      Otherwise, the code is unchanged. There are still a few
      rough edges for a library function, like printing the utf8
      warning to stderr, but we can address those if and when they
      come up as inappropriate.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      40d52ff7
  6. 13 3月, 2010 1 次提交
  7. 14 2月, 2010 1 次提交
    • J
      Builtin-ify git-notes · cd067d3b
      Johan Herland 提交于
      The builtin-ification includes some minor behavioural changes to the
      command-line interface: It is no longer allowed to mix the -m and -F
      arguments, and it is not allowed to use multiple -F options.
      
      As part of the builtin-ification, we add the commit_notes() function
      to the builtin API. This function (together with the notes.h API) can
      be easily used from other builtins to manipulate the notes tree.
      
      Also includes needed changes to t3301.
      
      This patch has been improved by the following contributions:
      - Stephen Boyd: Use die() instead of fprintf(stderr, ...) followed by exit(1)
      
      Cc: Stephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJohan Herland <johan@herland.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cd067d3b
  8. 23 1月, 2010 5 次提交
  9. 22 1月, 2010 4 次提交
  10. 10 11月, 2009 1 次提交
  11. 30 8月, 2009 1 次提交
  12. 23 8月, 2009 2 次提交
    • J
      git status: not "commit --dry-run" anymore · 9e4b7ab6
      Junio C Hamano 提交于
      This removes tentative "git stat" and make it take over "git status".
      
      There are some tests that expect "git status" to exit with non-zero status
      when there is something staged.  Some tests expect "git status path..." to
      show the status for a partial commit.
      
      For these, replace "git status" with "git commit --dry-run".  For the
      ones that do not attempt a dry-run of a partial commit that check the
      output from the command, check the output from "git status" as well, as
      they should be identical.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9e4b7ab6
    • J
      git stat: the beginning of "status that is not a dry-run of commit" · 76e2f7ce
      Junio C Hamano 提交于
      Tentatively add "git stat" as a new command.
      
      This is not "preview of commit with the same arguments"; the path parameters
      are not paths to be added to the pristine index (aka "--only" option), but
      are taken as pathspecs to limit the output.  Later in 1.7.0 release, it will
      take over "git status".
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      76e2f7ce
  13. 06 8月, 2009 1 次提交
  14. 01 6月, 2009 1 次提交
    • C
      Add new "git replace" command · 54b0c1e0
      Christian Couder 提交于
      This command can only be used now to list replace refs in
      "refs/replace/" and to delete them.
      
      The option to list replace refs is "-l".
      The option to delete replace refs is "-d".
      
      The behavior should be consistent with how "git tag" and "git branch"
      are working.
      
      The code has been copied from "builtin-tag.c" by Kristian Høgsberg
      <krh@redhat.com> and Carlos Rica <jasampler@gmail.com> that was itself
      based on git-tag.sh and mktag.c by Linus Torvalds.
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      54b0c1e0
  15. 11 5月, 2009 1 次提交
  16. 05 4月, 2009 1 次提交
    • C
      bisect--helper: implement "git bisect--helper" · 1bf072e3
      Christian Couder 提交于
      This patch implements a new "git bisect--helper" builtin plumbing
      command that will be used to migrate "git-bisect.sh" to C.
      
      We start by implementing only the "--next-vars" option that will
      read bisect refs from "refs/bisect/", and then compute the next
      bisect step, and output shell variables ready to be eval'ed by
      the shell.
      
      At this step, "git bisect--helper" ignores the paths that may
      have been put in "$GIT_DIR/BISECT_NAMES". This will be fixed in a
      later patch.
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1bf072e3
  17. 11 9月, 2008 1 次提交
  18. 10 9月, 2008 1 次提交
  19. 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
  20. 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
  21. 20 8月, 2008 1 次提交
  22. 24 7月, 2008 1 次提交
  23. 08 7月, 2008 1 次提交
  24. 07 7月, 2008 1 次提交
  25. 01 7月, 2008 1 次提交
  26. 07 6月, 2008 1 次提交
  27. 26 5月, 2008 1 次提交
  28. 05 5月, 2008 1 次提交
  29. 01 3月, 2008 1 次提交
  30. 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
  31. 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
  32. 05 2月, 2008 1 次提交