1. 12 12月, 2007 3 次提交
  2. 09 12月, 2007 2 次提交
  3. 08 12月, 2007 10 次提交
    • J
      mailmap: fix bogus for() loop that happened to be safe by accident · fd99b361
      Junio C Hamano 提交于
      The empty loop pretended to have an empty statement as its body by a
      phony indentation, but in fact was slurping the next statement into it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fd99b361
    • N
      pack-objects: fix threaded load balancing · 384b32c0
      Nicolas Pitre 提交于
      The current method consists of a master thread serving chunks of objects
      to work threads when they're done with their previous chunk.  The issue
      is to determine the best chunk size: making it too large creates poor
      load balancing, while making it too small has a negative effect on pack
      size because of the increased number of chunk boundaries and poor delta
      window utilization.
      
      This patch implements a completely different approach by initially
      splitting the work in large chunks uniformly amongst all threads, and
      whenever a thread is done then it steals half of the remaining work from
      another thread with the largest amount of unprocessed objects.
      
      This has the advantage of greatly reducing the number of chunk boundaries
      with an almost perfect load balancing.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      384b32c0
    • N
      pack-objects: reverse the delta search sort list · b904166c
      Nicolas Pitre 提交于
      It is currently sorted and then walked backward.  Not only this doesn't
      feel natural for my poor brain, but it would make the next patch less
      obvious as well.
      
      So reverse the sort order, and reverse the list walking direction,
      which effectively produce the exact same end result as before.
      
      Also bring the relevant comment nearer the actual code and adjust it
      accordingly, with minor additional clarifications.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b904166c
    • N
      pack-objects: fix delta cache size accounting · b7a28f78
      Nicolas Pitre 提交于
      The wrong value was substracted from delta_cache_size when replacing
      a cached delta, as trg_entry->delta_size was used after the old size
      had been replaced by the new size.
      
      Noticed by Linus.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b7a28f78
    • J
      git-status: documentation improvements · 2099bca9
      Jeff King 提交于
      This patch is the result of reading over git-status with an
      editorial eye:
      
        - fix a few typo/grammatical errors
        - mention untracked output
        - present output types in the order they appear from the
          command
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2099bca9
    • J
      add status.relativePaths config variable · 46f721c8
      Jeff King 提交于
      The output of git-status was recently changed to output relative
      paths. Setting this variable to false restores the old behavior for
      any old-timers that prefer it.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      46f721c8
    • J
      wt-status.c:quote_path(): convert empty path to "./" · c3ce3261
      Jeff King 提交于
      Now that we are correctly removing leading prefixes from files in git
      status, there is a degenerate case: the directory matching the prefix.
      Because we show only the directory name for a directory that contains
      only untracked files, it gets collapsed to an empty string.
      
      Example:
      
        $ git init
        $ mkdir subdir
        $ touch subdir/file
        $ git status
        ...
        # Untracked files:
        #   (use "git add <file>..." to include in what will be committed)
        #
        #       subdir/
      
        So far, so good.
      
        $ cd subdir
        $ git status
        ....
        # Untracked files:
        #   (use "git add <file>..." to include in what will be committed)
        #
        #
      
        Oops, that's a bit confusing.
      
        This patch prints './' to show that there is some output.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c3ce3261
    • J
      git-bisect visualize: work in non-windowed environments better · 235997c9
      Junio C Hamano 提交于
      This teaches "git bisect visualize" to be more useful in non-windowed
      environments.
      
       (1) When no option is given, and $DISPLAY is set, it continues to
           spawn gitk as before;
      
       (2) When no option is given, and $DISPLAY is unset, "git log" is run
           to show the range of commits between the bad one and the good ones;
      
       (3) If only "-flag" options are given, "git log <options>" is run.
           E.g. "git bisect visualize --stat"
      
       (4) Otherwise, all of the given options are taken as the initial part
           of the command line and the commit range expression is given to
           that command.  E.g. "git bisect visualize tig" will run "tig"
           history viewer to show between the bad one and the good ones.
      
      As "visualize" is a bit too long to type, we also give it a shorter
      synonym "view".
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      235997c9
    • W
      Teach "git add -i" to colorize whitespace errors · 4af756f3
      Wincent Colaiuta 提交于
      Rather than replicating the colorization logic of "git diff-files" we
      rely on "git diff-files" itself. This guarantees consistent colorization
      in and outside "git add -i".
      
      Seeing as speed is not a concern here (the bottleneck is how fast the
      user can read, not how fast "git diff-files" runs) we do this by
      actually running it twice, once without color and once with.
      
      In this way as the whitespace colorization provided by "git diff-files"
      evolves (per-path attributes, new classes of whitespace error), "git
      add -i" will automatically benefit from it and stay in synch.
      
      Also, by working with two sets of diff output (an uncolorized one for
      internal processing and a colorized one for display only) we minimize
      the risk of regressions because the changes required to implement this
      are minimally invasive.
      Signed-off-by: NWincent Colaiuta <win@wincent.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4af756f3
    • S
      Let git-help prefer man-pages installed with this version of git · 8e566f24
      Sergei Organov 提交于
      Prepend $(prefix)/share/man to the MANPATH environment variable before
      invoking 'man' from help.c:show_man_page().  There may be other git
      documentation in the user's MANPATH but the user is asking a specific
      instance of git about its own documentation, so we'd better show the
      documentation for _that_ instance of git.
      Signed-off-by: NSergei Organov <osv@javad.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8e566f24
  4. 07 12月, 2007 13 次提交
  5. 06 12月, 2007 12 次提交
    • J
      do not discard status in fetch_refs_via_pack() · c6bc4005
      Junio C Hamano 提交于
      The code calls fetch_pack() to get the list of refs it fetched, and
      discards refs and always returns 0 to signal success.
      
      But builtin-fetch-pack.c::fetch_pack() has error cases.  The function
      returns NULL if error is detected (shallow-support side seems to choose
      to die but I suspect that is easily fixable to error out as well).
      
      Make fetch_refs_via_pack() propagate that error to the caller.
      Acked-By: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c6bc4005
    • J
      for-each-ref: Fix quoting style constants. · c9ecf4f1
      Johannes Sixt 提交于
      for-each-ref can accept only one quoting style. For this reason it uses
      OPT_BIT for the quoting style switches so that it is easy to check for
      more than one bit being set. However, not all symbolic constants were
      actually single bit values. In particular:
      
          $ git for-each-ref --python
          error: more than one quoting style ?
      
      This fixes it.
      
      While we are here, let's also remove the space before the question mark.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c9ecf4f1
    • J
      hg-to-git: handle an empty dir in hg. · 90e0653b
      Junio C Hamano 提交于
      Mark Drago had a subversion repository which was then converted to hg
      and now is moving in to git.  The first commit in the svn repo was
      just the creation of the empty directory.  This made its way in to the
      hg repository fine, but converting from hg to git would cause an
      error.  The problem was that hg-to-git.py tries to commit the change,
      git-commit fails, and then hg-to-git.py tries to checkout the new
      revision and that fails (because it was not created).  This may have
      only caused an error because it was the first commit in the
      repository.  If an empty directory was added in the middle of the repo
      somewhere things might have worked out fine.
      
      This patch will use the new --allow-empty option to git-commit to
      record such an "empty" commit, to reproduce the history recorded in hg
      more faithfully.
      Tested-by: NMark Drago <markdrago@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      90e0653b
    • J
      config --get-colorbool: diff.color is a deprecated synonym to color.diff · 69243c2b
      Junio C Hamano 提交于
      The applications can ask for color.diff but the configuration of old
      timer users can still instruct it to use color with diff.color this
      way.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      69243c2b
    • J
      t7300: add test for clean with wildcard pathspec · d3357ab8
      Jeff King 提交于
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d3357ab8
    • J
      git-clean: Honor pathspec. · d871c869
      Junio C Hamano 提交于
      git-clean "*.rej" should attempt to look at only paths that match
      pattern "*.rej", but rewrite to C broke it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d871c869
    • J
      Color support for "git-add -i" · b4c61ed6
      Junio C Hamano 提交于
      This is mostly lifted from earlier series by Dan Zwell, but updated to
      use "git config --get-color" and "git config --get-colorbool" to make it
      simpler and more consistent with commands written in C.
      
      A new configuration color.interactive variable is like color.diff and
      color.status, and controls if "git-add -i" uses color.
      
      A set of configuration variables, color.interactive.<slot>, are used to
      define what color is used for the prompt, header, and help text.
      
      For perl scripts, Git.pm provides $repo->get_color() method, which takes
      the slot name and the default color, and returns the terminal escape
      sequence to color the output text.  $repo->get_colorbool() method can be
      used to check if color is set to be used for a given operation.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b4c61ed6
    • J
      git config --get-colorbool · 0f6f5a40
      Junio C Hamano 提交于
      This adds an option to help scripts find out color settings from
      the configuration file.
      
          git config --get-colorbool color.diff
      
      inspects color.diff variable, and exits with status 0 (i.e. success) if
      color is to be used.  It exits with status 1 otherwise.
      
      If a script wants "true"/"false" answer to the standard output of the
      command, it can pass an additional boolean parameter to its command
      line, telling if its standard output is a terminal, like this:
      
          git config --get-colorbool color.diff true
      
      When called like this, the command outputs "true" to its standard output
      if color is to be used (i.e. "color.diff" says "always", "auto", or
      "true"), and "false" otherwise.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0f6f5a40
    • J
      Documentation: color.* = true means "auto" · cec99d8c
      Junio C Hamano 提交于
      We forgot to document the earlier sanity-fix.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cec99d8c
    • J
      Merge branch 'maint' · 27ee1891
      Junio C Hamano 提交于
      * maint:
        git-am -i: report rewritten title
        git grep shows the same hit repeatedly for unmerged paths
        Do check_repository_format() early (re-fix)
        Do check_repository_format() early
        Add missing inside_work_tree setting in setup_git_directory_gently
      27ee1891
    • J
      git-am -i: report rewritten title · f23272f3
      Junio C Hamano 提交于
      Jeff Garzik noticed that "git am -i" reports the applied patch with
      the title before the user edited it.  This was confusing.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f23272f3
    • J
      git grep shows the same hit repeatedly for unmerged paths · 6326cee5
      Junio C Hamano 提交于
      When the index is unmerged, e.g.
      
      	$ git ls-files -u
              100644 faf413748eb6ccb15161a212156c5e348302b1b6 1	setup.c
              100644 145eca50f41d811c4c8fcb21ed2604e6b2971aba 2	setup.c
              100644 cb9558c49b6027bf225ba2a6154c4d2a52bcdbe2 3	setup.c
      
      running "git grep" for work tree files repeats hits for each unmerged
      stage.
      
      	$ git grep -n -e setup_work_tree -- '*.[ch]'
              setup.c:209:void setup_work_tree(void)
              setup.c:209:void setup_work_tree(void)
              setup.c:209:void setup_work_tree(void)
      
      This should fix it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6326cee5