1. 16 11月, 2010 1 次提交
  2. 28 8月, 2010 1 次提交
  3. 26 8月, 2010 1 次提交
    • L
      Fix 'git log' early pager startup error case · 1fda91b5
      Linus Torvalds 提交于
      We start the pager too early for several git commands, which results in
      the errors sometimes going to the pager rather than show up as errors.
      
      This is often hidden by the fact that we pass in '-X' to less by default,
      which causes 'less' to exit for small output, but if you do
      
        export LESS=-S
      
      you can then clearly see the problem by doing
      
        git log --prretty
      
      which shows the error message ("fatal: unrecognized argument: --prretty")
      being sent to the pager.
      
      This happens for pretty much all git commands that use USE_PAGER, and then
      check arguments separately. But "git diff" does it too early too (even
      though it does an explicit setup_pager() call)
      
      This only fixes it for the trivial "git log" family case.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1fda91b5
  4. 28 6月, 2010 1 次提交
  5. 25 6月, 2010 1 次提交
  6. 17 6月, 2010 1 次提交
    • S
      format-patch: Add a signature option (--signature) · 6622d9c7
      Stephen Boyd 提交于
      By default, git uses the version string as the signature for all
      patches output by format-patch. Many employers (mine included)
      require the use of a signature on all outgoing mails. In a
      format-patch | send-email workflow there isn't an easy way to modify
      the signature without breaking the pipe and manually replacing the
      version string with the signature required. Instead of doing all that
      work, add an option (--signature) and a config variable
      (format.signature) to replace the default git version signature when
      formatting patches.
      
      This does modify the original behavior of format-patch a bit. First
      off the version string is now placed in the cover letter by default.
      Secondly, once the configuration variable format.signature is added
      to the .config file there is no way to revert back to the default
      git version signature. Instead, specifying the --no-signature option
      will remove the signature from the patches entirely.
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6622d9c7
  7. 14 4月, 2010 1 次提交
  8. 22 3月, 2010 1 次提交
  9. 23 2月, 2010 1 次提交
    • L
      Move 'builtin-*' into a 'builtin/' subdirectory · 81b50f3c
      Linus Torvalds 提交于
      This shrinks the top-level directory a bit, and makes it much more
      pleasant to use auto-completion on the thing. Instead of
      
      	[torvalds@nehalem git]$ em buil<tab>
      	Display all 180 possibilities? (y or n)
      	[torvalds@nehalem git]$ em builtin-sh
      	builtin-shortlog.c     builtin-show-branch.c  builtin-show-ref.c
      	builtin-shortlog.o     builtin-show-branch.o  builtin-show-ref.o
      	[torvalds@nehalem git]$ em builtin-shor<tab>
      	builtin-shortlog.c  builtin-shortlog.o
      	[torvalds@nehalem git]$ em builtin-shortlog.c
      
      you get
      
      	[torvalds@nehalem git]$ em buil<tab>		[type]
      	builtin/   builtin.h
      	[torvalds@nehalem git]$ em builtin		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/sh<tab>	[type]
      	shortlog.c     shortlog.o     show-branch.c  show-branch.o  show-ref.c     show-ref.o
      	[torvalds@nehalem git]$ em builtin/sho		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/shor<tab>	[type]
      	shortlog.c  shortlog.o
      	[torvalds@nehalem git]$ em builtin/shortlog.c
      
      which doesn't seem all that different, but not having that annoying
      break in "Display all 180 possibilities?" is quite a relief.
      
      NOTE! If you do this in a clean tree (no object files etc), or using an
      editor that has auto-completion rules that ignores '*.o' files, you
      won't see that annoying 'Display all 180 possibilities?' message - it
      will just show the choices instead.  I think bash has some cut-off
      around 100 choices or something.
      
      So the reason I see this is that I'm using an odd editory, and thus
      don't have the rules to cut down on auto-completion.  But you can
      simulate that by using 'ls' instead, or something similar.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      81b50f3c
  10. 18 2月, 2010 2 次提交
    • J
      log.decorate: usability fixes · 8a3d203b
      Junio C Hamano 提交于
      The configuration is meant to suppliment --decorate command line option
      that can be used as a boolean to turn the feature on, so it is natural
      to expect
      
      	[log]
      		decorate
      		decorate = yes
      
      to work.  The original commit would segfault with the first one, and
      would not understand the second one.
      
      Once a user has this configuration in ~/.gitconfig, there needs to be a
      way to override it from the command line.  Add --no-decorate option to
      log family and also allow --decorate=no to mean the same thing.  Since
      we allow setting log.decorate to 'true', the command line also should
      accept --decorate=yes and behave accordingly.
      
      New tests in t4202 are designed to exercise the interaction between the
      configuration variable and the command line option that overrides it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8a3d203b
    • S
      Add `log.decorate' configuration variable. · eb734454
      Steven Drake 提交于
      This alows the 'git-log --decorate' to be enabled by default so that normal
      log outout contains ant ref names of commits that are shown.
      Signed-off-by: NSteven Drake <sdrake@xnet.co.nz>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      eb734454
  11. 04 2月, 2010 1 次提交
    • J
      Typofixes outside documentation area · 9517e6b8
      Junio C Hamano 提交于
          begining -> beginning
          canonicalizations -> canonicalization
          comand -> command
          dewrapping -> unwrapping
          dirtyness -> dirtiness
          DISCLAMER -> DISCLAIMER
          explicitely -> explicitly
          feeded -> fed
          impiled -> implied
          madatory -> mandatory
          mimick -> mimic
          preceeding -> preceding
          reqeuest -> request
          substition -> substitution
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9517e6b8
  12. 21 1月, 2010 1 次提交
    • J
      Fix "log" family not to be too agressive about showing notes · 66b2ed09
      Junio C Hamano 提交于
      Giving "Notes" information in the default output format of "log" and
      "show" is a sensible progress (the user has asked for it by having the
      notes), but for some commands (e.g. "format-patch") spewing notes into the
      formatted commit log message without being asked is too aggressive.
      
      Enable notes output only for "log", "show", "whatchanged" by default and
      only when the user didn't ask any specific --pretty/--format from the
      command line; users can explicitly override this default with --show-notes
      and --no-notes option.
      
      Parts of tests are taken from Jeff King's fix.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      66b2ed09
  13. 27 11月, 2009 1 次提交
  14. 11 11月, 2009 3 次提交
    • J
      Let 'git <command> -h' show usage without a git dir · 99caeed0
      Jonathan Nieder 提交于
      There is no need for "git <command> -h" to depend on being inside
      a repository.
      
      Reported by Gerfried Fuchs through http://bugs.debian.org/462557Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      99caeed0
    • B
      format-patch: Add "--no-stat" as a synonym for "-p" · 2cfa8330
      Björn Gustavsson 提交于
      "-p" means "generate patch" in 'git log' and 'git diff', so it's
      quite surprising that it means "suppress diffstat" in
      'git format-patch'.
      
      Keep the "-p" option for backward compatibility, but add
      "--no-stat" as a more intuitive synonym. For backward compatibility
      with scripts, we must allow combinations of --stat and --no-stat.
      Signed-off-by: NBjörn Gustavsson <bgustavsson@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2cfa8330
    • B
      format-patch: Always generate a patch · 02bc5b03
      Björn Gustavsson 提交于
      Jeff King recently reinstated -p to suppress the default diffstat
      (as -p used to work before 68daa64d, about 14 months ago).
      
      However, -p is also needed in combination with certain options
      (e.g. --stat or --numstat) in order to produce any patch at all.
      The documentation does not mention this.
      
      Since the purpose of format-patch is to produce a patch that
      can be emailed, it does not make sense that certain combination
      of options will suppress the generation of the patch itself.
      
      Therefore:
      
      * Update 'git format-patch' to always generate a patch.
      
      * Since the --name-only, --name-status, and --check suppresses
        the generation of the patch, disallow those options,
        and remove the description of them in the documentation.
      
      * Remove the reference to -p in the description of -U.
      
      * Remove the descriptions of the options that are synonyms for -p
        plus another option (--patch-with-raw and --patch-with-stat).
      
      * While at it, slightly tweak the description of -p itself
        to say that it generates "plain patches", so that you can
        think of -p as "plain patch" as an mnemonic aid.
      Signed-off-by: NBjörn Gustavsson <bgustavsson@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      02bc5b03
  15. 10 11月, 2009 1 次提交
    • J
      Show usage string for 'git cherry -h' · fef34270
      Jonathan Nieder 提交于
      Treat an "-h" option as a request for help, rather than an
      "Unknown commit -h" error.
      
      "cherry -h" could be asking to compare histories that leads to
      our HEAD and a commit that can be named as "-h".  Strictly
      speaking, that may be a valid refname, but the user would have to
      say something like "tags/-h" to name such a pathological ref
      already, so it is not such a big deal.
      
      The "-h" option keeps its meaning even if preceded by other
      options or followed by other arguments.  This keeps the
      command-line syntax closer to what parse_options would give and
      supports shell aliases like 'alias cherry="git cherry -v"' a
      little better.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fef34270
  16. 09 11月, 2009 1 次提交
    • J
      format-patch: make "-p" suppress diffstat · 1d46f2ea
      Jeff King 提交于
      Once upon a time, format-patch would use its default stat
      plus patch format only when no diff format was given on the
      command line. This meant that "format-patch -p" would
      suppress the stat and show just the patch.
      
      Commit 68daa64d changed this to keep the stat format when we
      had an "implicit" patch format, like "-U5". As a side
      effect, this meant that an explicit patch format was now
      ignored (because cmd_format_patch didn't know the reason
      that the format was set way down in diff_opt_parse).
      
      This patch unbreaks what 68daa64d did (while still preserving
      what 68daa64d was trying to do), reinstating "-p" to suppress
      the default behavior. We do this by parsing "-p" ourselves
      in format-patch, and noting whether it was used explicitly.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1d46f2ea
  17. 20 10月, 2009 1 次提交
    • T
      Refactor pretty_print_commit arguments into a struct · dd2e794a
      Thomas Rast 提交于
      pretty_print_commit() has a bunch of rarely-used arguments, and
      introducing more of them requires yet another update of all the call
      sites.  Refactor most of them into a struct to make future extensions
      easier.
      
      The ones that stay "plain" arguments were chosen on the grounds that
      all callers put real arguments there, whereas some callers have 0/NULL
      for all arguments that were factored into the struct.
      
      We declare the struct 'const' to ensure none of the callers are bitten
      by the changed (no longer call-by-value) semantics.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dd2e794a
  18. 27 8月, 2009 1 次提交
  19. 19 8月, 2009 1 次提交
  20. 11 8月, 2009 1 次提交
  21. 08 8月, 2009 1 次提交
  22. 30 7月, 2009 1 次提交
    • J
      diff: Rename QUIET internal option to QUICK · 90b19941
      Junio C Hamano 提交于
      The option "QUIET" primarily meant "find if we have _any_ difference as
      quick as possible and report", which means we often do not even have to
      look at blobs if we know the trees are different by looking at the higher
      level (e.g. "diff-tree A B").  As a side effect, because there is no point
      showing one change that we happened to have found first, it also enables
      NO_OUTPUT and EXIT_WITH_STATUS options, making the end result look quiet.
      
      Rename the internal option to QUICK to reflect this better; it also makes
      grepping the source tree much easier, as there are other kinds of QUIET
      option everywhere.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      90b19941
  23. 20 7月, 2009 2 次提交
    • J
      show: add space between multiple items · ae03ee64
      Jeff King 提交于
      When showing an annotated tag, "git show" will always
      display the pointed-to object. However, it didn't separate
      the two with whitespace, making it more difficult to notice
      where the new object started. For example:
      
        $ git tag -m 'my message' foo
        $ git show foo
        tag foo
        Tagger: Jeff King <peff@peff.net>
        Date:   Fri Jul 17 18:46:25 2009 -0400
      
        my message
        commit 41cabf8fed2694ba33e01d64f9094f2fc5e5805a
        Author: Jeff King <peff@peff.net>
        Date:   Thu Jul 16 17:31:34 2009 -0400
        ...
      
      This patch respects and sets the rev.shown_one member to
      prepend a blank line before showing a second item. We use
      this member of rev_info instead of a local flag, because the
      log_tree_commit we call into for showing commits already
      respects and sets that flag. Meaning that everything will be
      spaced properly if you intermix commits and tags, like:
      
        $ git show v1.6.3 v1.6.2 HEAD
      
      In that case, a single blank line will separate the first
      tag, the commit it points to, the second tag, the commit
      that one points to, and the final commit.
      
      While we're at it, let's also support trees, so that even
      something as crazy as
      
        $ git show HEAD^{tree} HEAD~1^{tree} HEAD
      
      will also be spaced in an easy-to-read way. However, we
      intentionally do _not_ insert blank lines for blobs, so
      that specifying multiple blobs gives a strict concatenation.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ae03ee64
    • J
      show: suppress extra newline when showing annotated tag · ca4ca9ed
      Jeff King 提交于
      When showing a tag, our header parsing finishes with the
      offset pointing to the newline separating the tag header
      from the tag body. This means that the printed body will
      always start with a newline.
      
      However, we also add an extra newline when printing the
      tagger information. This leads to an ugly double-newline:
      
          $ git show v1.6.3
          tag v1.6.3
          Tagger: Junio C Hamano <gitster@pobox.com>
          Date:   Wed May 6 18:16:47 2009 -0700
      
          GIT 1.6.3
          -----BEGIN PGP SIGNATURE-----
          ...
      
      This patch removes the extra newline from the end of the
      tagger headers. This is a better solution than suppressing
      the separator newline, because it retains the behavior for
      tags which have no tagger. E.g., "git show v0.99" will
      continue to look like:
      
            $ git show v0.99
            tag v0.99
      
            Test-release for wider distribution.
            ...
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ca4ca9ed
  24. 28 6月, 2009 1 次提交
    • T
      Use die_errno() instead of die() when checking syscalls · 0721c314
      Thomas Rast 提交于
      Lots of die() calls did not actually report the kind of error, which
      can leave the user confused as to the real problem.  Use die_errno()
      where we check a system/library call that sets errno on failure, or
      one of the following that wrap such calls:
      
        Function              Passes on error from
        --------              --------------------
        odb_pack_keep         open
        read_ancestry         fopen
        read_in_full          xread
        strbuf_read           xread
        strbuf_read_file      open or strbuf_read_file
        strbuf_readlink       readlink
        write_in_full         xwrite
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0721c314
  25. 21 6月, 2009 1 次提交
    • L
      Fix various sparse warnings in the git source code · 2af202be
      Linus Torvalds 提交于
      There are a few remaining ones, but this fixes the trivial ones. It boils
      down to two main issues that sparse complains about:
      
       - warning: Using plain integer as NULL pointer
      
         Sparse doesn't like you using '0' instead of 'NULL'. For various good
         reasons, not the least of which is just the visual confusion. A NULL
         pointer is not an integer, and that whole "0 works as NULL" is a
         historical accident and not very pretty.
      
         A few of these remain: zlib is a total mess, and Z_NULL is just a 0.
         I didn't touch those.
      
       - warning: symbol 'xyz' was not declared. Should it be static?
      
         Sparse wants to see declarations for any functions you export. A lack
         of a declaration tends to mean that you should either add one, or you
         should mark the function 'static' to show that it's in file scope.
      
         A few of these remain: I only did the ones that should obviously just
         be made static.
      
      That 'wt_status_submodule_summary' one is debatable. It has a few related
      flags (like 'wt_status_use_color') which _are_ declared, and are used by
      builtin-commit.c. So maybe we'd like to export it at some point, but it's
      not declared now, and not used outside of that file, so 'static' it is in
      this patch.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2af202be
  26. 25 5月, 2009 1 次提交
  27. 19 5月, 2009 1 次提交
  28. 18 5月, 2009 1 次提交
  29. 09 5月, 2009 1 次提交
  30. 06 4月, 2009 1 次提交
  31. 28 3月, 2009 1 次提交
  32. 23 3月, 2009 4 次提交
  33. 22 3月, 2009 1 次提交