1. 16 9月, 2012 3 次提交
  2. 15 9月, 2012 4 次提交
    • J
      log: document use of multiple commit limiting options · a23e3138
      Junio C Hamano 提交于
      Generally speaking, using more options will further narrow the
      selection, but there are a few exceptions.  Document them.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a23e3138
    • J
      log --grep/--author: honor --all-match honored for multiple --grep patterns · 13e4fc7e
      Junio C Hamano 提交于
      When we have both header expression (which has to be an OR node by
      construction) and a pattern expression (which could be anything), we
      create a new top-level OR node to bind them together, and the
      resulting expression structure looks like this:
      
                   OR
              /          \
             /            \
         pattern            OR
           / \           /     \
          .....    committer    OR
                               /   \
                           author   TRUE
      
      The three elements on the top-level backbone that are inspected by
      the "all-match" logic are "pattern", "committer" and "author".  When
      there are more than one elements in the "pattern", the top-level
      node of the "pattern" part of the subtree is an OR, and that node is
      inspected by "all-match".
      
      The result ends up ignoring the "--all-match" given from the command
      line.  A match on either side of the pattern is considered a match,
      hence:
      
              git log --grep=A --grep=B --author=C --all-match
      
      shows the same "authored by C and has either A or B" that is correct
      only when run without "--all-match".
      
      Fix this by turning the resulting expression around when "--all-match"
      is in effect, like this:
      
                    OR
                /        \
               /          \
              /              OR
          committer        /    \
                       author    \
                                 pattern
      
      The set of nodes on the top-level backbone in the resulting
      expression becomes "committer", "author", and the nodes that are on
      the top-level backbone of the "pattern" subexpression.  This makes
      the "all-match" logic inspect the same nodes in "pattern" as the
      case without the author and/or the committer restriction, and makes
      the earlier "log" example to show "authored by C and has A and has
      B", which is what the command line expects.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      13e4fc7e
    • M
      grep: show --debug output only once · 208f5aa4
      Michael J Gruber 提交于
      When threaded grep is in effect, the patterns are duplicated and
      recompiled for each thread. Avoid "--debug" output during the
      recompilation so that the output is given once instead of "1+nthreads"
      times.
      Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      208f5aa4
    • J
      grep: teach --debug option to dump the parse tree · 17bf35a3
      Junio C Hamano 提交于
      Our "grep" allows complex boolean expressions to be formed to match
      each individual line with operators like --and, '(', ')' and --not.
      Introduce the "--debug" option to show the parse tree to help people
      who want to debug and enhance it.
      
      Also "log" learns "--grep-debug" option to do the same.  The command
      line parser to the log family is a lot more limited than the general
      "git grep" parser, but it has special handling for header matching
      (e.g. "--author"), and a parse tree is valuable when working on it.
      
      Note that "--all-match" is *not* any individual node in the parse
      tree.  It is an instruction to the evaluator to check all the nodes
      in the top-level backbone have matched and reject a document as
      non-matching otherwise.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      17bf35a3
  3. 18 6月, 2012 3 次提交
  4. 12 6月, 2012 1 次提交
  5. 04 6月, 2012 2 次提交
  6. 02 6月, 2012 8 次提交
  7. 01 6月, 2012 1 次提交
  8. 31 5月, 2012 1 次提交
  9. 29 5月, 2012 1 次提交
  10. 26 5月, 2012 5 次提交
    • J
      Git 1.7.10.3 · 26e5c5d0
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      26e5c5d0
    • J
      Merge branch 'hv/submodule-alt-odb' into maint · 69e82602
      Junio C Hamano 提交于
      When a submodule repository uses alternate object store mechanism, some
      commands that were started from the superproject did not notice it and
      failed with "No such object" errors.  The subcommands of "git submodule"
      command that recursed into the submodule in a separate process were OK;
      only the ones that cheated and peeked directly into the submodule's
      repository from the primary process were affected.
      
      By Heiko Voigt
      * hv/submodule-alt-odb:
        teach add_submodule_odb() to look for alternates
      69e82602
    • J
      Merge branch 'bp/diff-no-index-strbuf-fix' into maint · 98eb3fc6
      Junio C Hamano 提交于
      The directory path used in "git diff --no-index", when it recurses
      down, was broken with a recent update after v1.7.10.1 release.
      
      By Bobby Powers
      * bp/diff-no-index-strbuf-fix:
        diff --no-index: don't leak buffers in queue_diff
        diff --no-index: reset temporary buffer lengths on directory iteration
      98eb3fc6
    • L
      fmt-merge-message: add empty line between tag and signature verification · a3347b98
      Linus Torvalds 提交于
      When adding the information from a tag, put an empty line between the
      message of the tag and the commented-out signature verification
      information.
      
      At least for the kernel workflow, I often end up re-formatting the message
      that people send me in the tag data. In that situation, putting the tag
      message and the tag signature verification back-to-back then means that
      normal editor "reflow parapgraph" command will get confused and think that
      the signature is a continuation of the last message paragraph.
      
      So I always end up having to first add an empty line, and then go back and
      reflow the last paragraph. Let's just do it in git directly.
      
      The extra vertical space also makes the verification visually stand out
      more from the user-supplied message, so it looks a bit more readable to me
      too, but that may be just an odd personal preference.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a3347b98
    • J
      config doc: remove confusion about relative GIT_DIR from FILES section · ec84e069
      Jonathan Nieder 提交于
      From the FILES section of the git-config(1) manual:
      
      	$GIT_DIR/config::
      		Repository specific configuration file. (The filename is
      		of course relative to the repository root, not the working
      		directory.)
      
      That's confusing because $GIT_DIR really is relative to the working
      directory.
      
      	$ GIT_DIR=.git GIT_EDITOR='pwd; echo editing'
      	$ export GIT_DIR GIT_EDITOR
      	$ git config --edit --local
      	/home/jrn/src/git/Documentation
      	editing .git/config
      
      It turns out that the comment is a remnant from older days when the
      heading said ".git/config" (which is indeed relative to the top of the
      worktree).
      
      It was only when the heading was changed to refer more precisely to
      <git dir>/config (see v1.5.3.2~18, AsciiDoc tweak to avoid leading
      dot, 2007-09-14) that the parenthesis stopped making sense.  Remove
      it.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ec84e069
  11. 25 5月, 2012 4 次提交
    • J
      Update draft release notes to 1.7.10.3 · c4649188
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c4649188
    • J
      Merge branch 'jk/maint-status-porcelain-z-b' into maint · a8bd582d
      Junio C Hamano 提交于
      "git status --porcelain" ignored "--branch" option by mistake.  The output
      for "git status --branch -z" was also incorrect and did not terminate the
      record for the current branch name with NUL as asked.
      
      By Jeff King
      * jk/maint-status-porcelain-z-b:
        status: respect "-b" for porcelain format
        status: fix null termination with "-b"
        status: refactor null_termination option
        commit: refactor option parsing
      a8bd582d
    • A
      checkout: no progress messages if !isatty(2). · e9fc64c6
      Avery Pennarun 提交于
      If stderr isn't a tty, we shouldn't be printing incremental progress
      messages.  In particular, this affects 'git checkout -f . >&logfile'
      unless you provided -q.  And git-new-workdir has no way to provide -q.
      
      It would probably be better to have progress.c check isatty(2) all the time,
      but that wouldn't allow things like 'git push --progress' to force progress
      reporting to on, so I won't try to solve the general case right now.
      
      Actual fix suggested by Jeff King.
      Signed-off-by: NAvery Pennarun <apenwarr@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e9fc64c6
    • J
      osxkeychain: pull make config from top-level directory · 17a9ac7d
      Jeff King 提交于
      The default compiler and cflags were mostly "works for me"
      when I built the original version. We need to be much less
      careful here than usual, because we know we are building
      only on OS X.  But it's only polite to at least respect the
      CFLAGS and CC definitions that the user may have provided
      earlier.
      
      While we're at it, let's update our definitions and rules to
      be more like the top-level Makefile; default our CFLAGS to
      include -O2, and make sure we use CFLAGS and LDFLAGS when
      linking.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      17a9ac7d
  12. 23 5月, 2012 3 次提交
    • J
      avoid segfault when reading header of malformed commits · a9c7a8a8
      Jeff King 提交于
      If a commit object has a header line at the end of the
      buffer that is missing its newline (or if it appears so
      because the content on the header line contains a stray
      NUL), then git will segfault.
      
      Interestingly, this case is explicitly handled and we do
      correctly scan the final line for the header we are looking
      for. But if we don't find it, we will dereference NULL while
      trying to look at the next line.
      
      Git will never generate such a commit, but it's good to be
      defensive. We could die() in such a case, but since it's
      easy enough to handle it gracefully, let's just issue a
      warning and continue (so you could still view such a commit
      with "git show", though you might be missing headers after
      the NUL).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a9c7a8a8
    • J
      pretty: avoid buffer overflow in format_person_part · c9b4e9e5
      Jeff King 提交于
      When we parse the name and email from a commit to
      pretty-print them, we usually can just put the result
      directly into our strbuf result. However, if we are going to
      use the mailmap, then we must first copy them into a
      NUL-terminated buffer to feed to the mailmap machinery.
      
      We did so by using strlcpy into a static buffer, but we used
      it wrong. We fed it the length of the substring we wanted to
      copy, but never checked that that length was less than the
      size of the destination buffer.
      
      The simplest fix is to just use snprintf to copy the
      substring properly while still respecting the destination
      buffer's size. It might seem like replacing the static
      buffer with a strbuf would help, but we need to feed a
      static buffer to the mailmap machinery anyway, so there's
      not much benefit to handling arbitrary sizes.
      
      A more ideal solution would be for mailmap to grow an
      interface that:
      
        1. Takes a pointer and length combination, instead of
           assuming a NUL-terminated string.
      
        2. Returns a pointer to the mailmap's allocated string,
           rather than copying it into the buffer.
      
      Then we could avoid the need for an extra buffer entirely.
      However, doing this would involve a lot of refactoring of
      mailmap and of string_list (which mailmap uses to store the
      map itself). For now, let's do the simplest thing to fix the
      bug.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c9b4e9e5
    • J
      fix off-by-one error in split_ident_line · d9955fd6
      Jeff King 提交于
      Commit 4b340cfa split the logic to parse an ident line out of
      pretty.c's format_person_part. But in doing so, it
      accidentally introduced an off-by-one error that caused it
      to think that single-character names were invalid.
      
      This manifested itself as the "%an" format failing to show
      anything at all for a single-character name.
      Reported-by: NBrian Turner <bturner@atlassian.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d9955fd6
  13. 22 5月, 2012 1 次提交
  14. 21 5月, 2012 3 次提交