1. 19 9月, 2007 7 次提交
  2. 18 9月, 2007 6 次提交
    • J
      Document ls-files --with-tree=<tree-ish> · 7a461b5a
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7a461b5a
    • J
      git-commit: partial commit of paths only removed from the index · cba8d489
      Junio C Hamano 提交于
      Because a partial commit is meant to be a way to ignore what are
      staged in the index, "git rm --cached A && git commit A" should
      just record what is in A on the filesystem.  The previous patch
      made the command sequence to barf, saying that A has not been
      added yet.  This fixes it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cba8d489
    • J
      git-commit: Allow partial commit of file removal. · 64586e75
      Junio C Hamano 提交于
      When making a partial commit, git-commit uses git-ls-files with
      the --error-unmatch option to expand and sanity check the user
      supplied path patterns.  When any path pattern does not match
      with the paths known to the index, it errors out, in order to
      catch a common mistake to say "git commit Makefiel cache.h"
      and end up with a commit that touches only cache.h (notice the
      misspelled "Makefile").  This detection however does not work
      well when the path has already been removed from the index.
      
      If you drop a path from the index and try to commit that
      partially, i.e.
      
      	$ git rm COPYING
      	$ git commit -m 'Remove COPYING' COPYING
      
      the command complains because git does not know anything about
      COPYING anymore.
      
      This introduces a new option --with-tree to git-ls-files and
      uses it in git-commit when we build a temporary index to
      write a tree object for the partial commit.
      
      When --with-tree=<tree-ish> option is specified, names from the
      given tree are added to the set of names the index knows about,
      so we can treat COPYING file in the example as known.
      
      Of course, there is no reason to use "git rm" and git-aware
      people have long time done:
      
      	$ rm COPYING
      	$ git commit -m 'Remove COPYING' COPYING
      
      which works just fine.  But this caused a constant confusion.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      64586e75
    • J
      Merge branch 'jc/grep-c' into maint · a017f27d
      Junio C Hamano 提交于
      * jc/grep-c:
        Split grep arguments in a way that does not requires to add /dev/null.
      a017f27d
    • J
      Merge branch 'maint' of git://repo.or.cz/git-gui into maint · 9269df96
      Junio C Hamano 提交于
      * 'maint' of git://repo.or.cz/git-gui:
        git-gui: Disable native platform text selection in "lists"
        git-gui: Paper bag fix "Commit->Revert" format arguments
        git-gui: Provide 'uninstall' Makefile target to undo an installation
        git-gui: Font chooser to handle a large number of font families
        git-gui: Make backporting changes from i18n version easier
        git-gui: Don't delete send on Windows as it doesn't exist
        git-gui: Trim trailing slashes from untracked submodule names
        git-gui: Assume untracked directories are Git submodules
        git-gui: handle "deleted symlink" diff marker
        git-gui: show unstaged symlinks in diff viewer
        git-gui: Avoid use of libdir in Makefile
        git-gui: Disable Tk send in all git-gui sessions
        git-gui: lib/index.tcl: handle files with % in the filename properly
        git-gui: Properly set the state of "Stage/Unstage Hunk" action
        git-gui: Fix detaching current branch during checkout
        git-gui: Correct starting of git-remote to handle -w option
      9269df96
    • J
      send-email: make message-id generation a bit more robust · be510cfe
      Junio C Hamano 提交于
      Earlier code took Unix time and appended a few random digits.
      If you are firing off many messages within a second, you could
      issue the same id to different messages, which is a no-no.  If
      you send out 31 messages within a single second, with random
      integer taken out of rand(4200), you have about 10% chance of
      producing the same message ID.
      
      This fixes the problem by uses a prefix string which is
      constant-per-invocation (time and pid), with a serial number for
      each message generated by the process appended at the end.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      be510cfe
  3. 17 9月, 2007 3 次提交
    • J
      git-apply: fix whitespace stripping · d7416eca
      J. Bruce Fields 提交于
      The algorithm isn't right here: it accumulates any set of 8 spaces into
      tabs even if they're separated by tabs, so
      
      	<four spaces><tab><four spaces><tab>
      
      is converted to
      
      	<tab><tab><tab>
      
      when it should be just
      
      	<tab><tab>
      
      So teach git-apply that a tab hides any group of less than 8 previous
      spaces in a row.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d7416eca
    • S
      git-gui: Disable native platform text selection in "lists" · 3849bfba
      Shawn O. Pearce 提交于
      Sometimes we use a Tk text widget as though it were a listbox.
      This happens typically when we want to show an icon to the left
      of the text label or just when a text widget is generally a better
      choice then the native listbox widget.
      
      In these cases if we want the user to have control over the selection
      we implement our own "in_sel" tag that shows the selected region
      and we perform our own selection management in the background
      via keybindings and mouse bindings.  In such uses we don't want
      the user to be able to activate the native platform selection by
      dragging their mouse through the text widget.  Doing so creates a
      very confusing display and the user is left wondering what it may
      mean to have two different types of selection in the same widget.
      
      Tk doesn't allow us to delete the "sel" tag that it uses internally
      to manage the native selection but it will allow us to make it
      invisible by setting the tag to have the same display properties
      as unselected text.  So long as we don't actually use the "sel"
      tag for anything in code its effectively invisible.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      3849bfba
    • J
      apply --index-info: fall back to current index for mode changes · ece7b749
      Johannes Schindelin 提交于
      "git diff" does not record index lines for pure mode changes (i.e. no
      lines changed).  Therefore, apply --index-info would call out a bogus
      error.
      
      Instead, fall back to reading the info from the current index.
      
      Incidentally, this fixes an error where git-rebase would not rebase a
      commit including a pure mode change, and changes requiring a threeway
      merge.
      
      Noticed and later tested by Chris Shoemaker.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ece7b749
  4. 16 9月, 2007 15 次提交
  5. 15 9月, 2007 6 次提交
    • J
      Split grep arguments in a way that does not requires to add /dev/null. · d99ebf08
      Junio C Hamano 提交于
      In order to (almost) always show the name of the file without
      relying on "-H" option of GNU grep, we used to add /dev/null to
      the argument list unless we are doing -l or -L.  This caused
      "/dev/null:0" to show up when -c is given in the output.
      
      It is not enough to add -c to the set of options we do not pass
      /dev/null for.  When we have too many files, we invoke grep
      multiple times and we need to avoid giving a widow filename to
      the last invocation -- otherwise we will not see the name.
      
      This keeps two filenames when the argv[] buffer is about to
      overflow and we have not finished iterating over the index, so
      that the last round will always have at least two paths to work
      with (and not require /dev/null).
      
      An obvious and the only exception is when there is only 1 file
      that is given to the underlying grep, and in that case we avoid
      passing /dev/null and let the external "grep -c" report only the
      number of matches.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d99ebf08
    • J
      Documentation/git-config.txt: AsciiDoc tweak to avoid leading dot · 7c8b5eaf
      Junio C Hamano 提交于
      Bram Schoenmakers noticed that git-config document was formatted
      incorrectly.  Depending on the version of AsciiDoc and docbook
      toolchain, it is sometimes taken as a numbered example by AsciiDoc,
      some other times passed intact to roff format to confuse "man".
      
      Since we refer to the repository metadata directory as $GIT_DIR
      elsewhere, work it around by using that symbolic name.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7c8b5eaf
    • B
      Add test to check recent fix to "git add -u" · 43b98acc
      Benoit Sigoure 提交于
      An earlier commit fixed type-change case in "git add -u".
      This adds a test to make sure we do not introduce regression.
      
      At the same time, it fixes a stupid typo in the error message.
      Signed-off-by: NBenoit Sigoure <tsuna@lrde.epita.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      43b98acc
    • J
      Documentation/git-archive.txt: a couple of clarifications. · 42b5f869
      Jari Aalto 提交于
      The description of the option gave impression that there
      were several formats available by using three dots. There are
      no other formats than tar and gzip currently supported.
      
      Clarify that the archive goes to the standard output.
      Signed-off-by: NJari Aalto <jari.aalto@cante.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      42b5f869
    • L
      Fix the rename detection limit checking · 0024a549
      Linus Torvalds 提交于
      This adds more proper rename detection limits. Instead of just checking
      the limit against the number of potential rename destinations, we verify
      that the rename matrix (which is what really matters) doesn't grow
      ridiculously large, and we also make sure that we don't overflow when
      doing the matrix size calculation.
      
      This also changes the default limits from unlimited, to a rename matrix
      that is limited to 100 entries on a side. You can raise it with the config
      entry, or by using the "-l<n>" command line flag, but at least the default
      is now a sane number that avoids spending lots of time (and memory) in
      situations that likely don't merit it.
      
      The choice of default value is of course very debatable. Limiting the
      rename matrix to a 100x100 size will mean that even if you have just one
      obvious rename, but you also create (or delete) 10,000 files, the rename
      matrix will be so big that we disable the heuristics. Sounds reasonable to
      me, but let's see if people hit this (and, perhaps more importantly,
      actually *care*) in real life.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0024a549
    • J
      diff --no-index: do not forget to run diff_setup_done() · b78281f7
      Junio C Hamano 提交于
      Code inspection by Linus found this.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b78281f7
  6. 14 9月, 2007 3 次提交