1. 05 9月, 2008 1 次提交
    • J
      log --author/--committer: really match only with name part · a4d7d2c6
      Junio C Hamano 提交于
      When we tried to find commits done by AUTHOR, the first implementation
      tried to pattern match a line with "^author .*AUTHOR", which later was
      enhanced to strip leading caret and look for "^author AUTHOR" when the
      search pattern was anchored at the left end (i.e. --author="^AUTHOR").
      
      This had a few problems:
      
       * When looking for fixed strings (e.g. "git log -F --author=x --grep=y"),
         the regexp internally used "^author .*x" would never match anything;
      
       * To match at the end (e.g. "git log --author='google.com>$'"), the
         generated regexp has to also match the trailing timestamp part the
         commit header lines have.  Also, in order to determine if the '$' at
         the end means "match at the end of the line" or just a literal dollar
         sign (probably backslash-quoted), we would need to parse the regexp
         ourselves.
      
      An earlier alternative tried to make sure that a line matches "^author "
      (to limit by field name) and the user supplied pattern at the same time.
      While it solved the -F problem by introducing a special override for
      matching the "^author ", it did not solve the trailing timestamp nor tail
      match problem.  It also would have matched every commit if --author=author
      was asked for, not because the author's email part had this string, but
      because every commit header line that talks about the author begins with
      that field name, regardleses of who wrote it.
      
      Instead of piling more hacks on top of hacks, this rethinks the grep
      machinery that is used to look for strings in the commit header, and makes
      sure that (1) field name matches literally at the beginning of the line,
      followed by a SP, and (2) the user supplied pattern is matched against the
      remainder of the line, excluding the trailing timestamp data.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a4d7d2c6
  2. 04 9月, 2008 13 次提交
  3. 03 9月, 2008 1 次提交
  4. 02 9月, 2008 5 次提交
  5. 01 9月, 2008 3 次提交
  6. 31 8月, 2008 7 次提交
  7. 30 8月, 2008 5 次提交
  8. 29 8月, 2008 5 次提交
    • P
      tutorial: gentler illustration of Alice/Bob workflow using gitk · 53d1589f
      Paolo Ciarrocchi 提交于
      Update to gitutorial as discussedin the git mailing list:
      
      http://marc.info/?t=121969390900002&r=1&w=2Signed-off-by: NPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53d1589f
    • J
      pretty=format: respect date format options · d36f8679
      Jeff King 提交于
      When running a command like:
      
        git log --pretty=format:%ad --date=short
      
      the date option was ignored. This patch causes it to use whatever
      format was specified by --date (or by --relative-date, etc), just
      as the non-user formats would do.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d36f8679
    • P
      make git-shell paranoid about closed stdin/stdout/stderr · 0cfeed2e
      Paolo Bonzini 提交于
      It is in general unsafe to start a program with one or more of file
      descriptors 0/1/2 closed.  Karl Chen for example noticed that stat_command
      does this in order to rename a pipe file descriptor to 0:
      
          dup2(from, 0);
          close(from);
      
      ... but if stdin was closed (for example) from == 0, so that
      
          dup2(0, 0);
          close(0);
      
      just ends up closing the pipe.  Another extremely rare but nasty problem
      would occur if an "important" file ends up in file descriptor 2, and is
      corrupted by a call to die().
      
      Fixing this in git was considered to be overkill, so this patch works
      around it only for git-shell.  The fix is simply to open all the "low"
      descriptors to /dev/null in main.
      Signed-off-by: NPaolo Bonzini <bonzini@gnu.org>
      Acked-by: NStephen R. van den Berg <srb@cuci.nl>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0cfeed2e
    • Y
      Document gitk --argscmd flag. · 29f28151
      Yann Dirson 提交于
      This was part of my original patch, but appears to have been lost.
      Signed-off-by: NYann Dirson <ydirson@altern.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      29f28151
    • L
      Fix '--dirstat' with cross-directory renaming · 441bca0b
      Linus Torvalds 提交于
      The dirstat code depends on the fact that we always generate diffs with
      the names sorted, since it then just does a single-pass walk-over of the
      sorted list of names and how many changes there were. The sorting means
      that all files are nicely grouped by directory.
      
      That all works fine.
      
      Except when we have rename detection, and suddenly the nicely sorted list
      of pathnames isn't all that sorted at all. And now the single-pass dirstat
      walk gets all confused, and you can get results like this:
      
        [torvalds@nehalem linux]$ git diff --dirstat=2 -M v2.6.27-rc4..v2.6.27-rc5
           3.0% arch/powerpc/configs/
           6.8% arch/arm/configs/
           2.7% arch/powerpc/configs/
           4.2% arch/arm/configs/
           5.6% arch/powerpc/configs/
           8.4% arch/arm/configs/
           5.5% arch/powerpc/configs/
          23.3% arch/arm/configs/
           8.6% arch/powerpc/configs/
           4.0% arch/
           4.4% drivers/usb/musb/
           4.0% drivers/watchdog/
           7.6% drivers/
           3.5% fs/
      
      The trivial fix is to add a sorting pass, fixing it to:
      
        [torvalds@nehalem linux]$ git diff --dirstat=2 -M v2.6.27-rc4..v2.6.27-rc5
          43.0% arch/arm/configs/
          25.5% arch/powerpc/configs/
           5.3% arch/
           4.4% drivers/usb/musb/
           4.0% drivers/watchdog/
           7.6% drivers/
           3.5% fs/
      
      Spot the difference. In case anybody wonders: it's because of a ton of
      renames from {include/asm-blackfin => arch/blackfin/include/asm} that just
      totally messed up the file ordering in between arch/arm and arch/powerpc.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      441bca0b