1. 15 11月, 2008 1 次提交
    • L
      Add cache preload facility · 671c9b7e
      Linus Torvalds 提交于
      This can do the lstat() storm in parallel, giving potentially much
      improved performance for cold-cache cases or things like NFS that have
      weak metadata caching.
      
      Just use "read_cache_preload()" instead of "read_cache()" to force an
      optimistic preload of the index stat data.  The function takes a
      pathspec as its argument, allowing us to preload only the relevant
      portion of the index.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      671c9b7e
  2. 14 11月, 2008 4 次提交
    • J
      Merge git://git.bogomips.org/git-svn · a0d3ab9c
      Junio C Hamano 提交于
      * git://git.bogomips.org/git-svn:
        git-svn: proper detection of bare repositories
        git-svn: respect i18n.commitencoding config
        git-svn: don't escape tilde ('~') for http(s) URLs
      a0d3ab9c
    • J
      Merge branch 'maint' · 59d8cb49
      Junio C Hamano 提交于
      * maint:
        date/time: do not get confused by fractional seconds
      59d8cb49
    • L
      date/time: do not get confused by fractional seconds · e9854a76
      Linus Torvalds 提交于
      The date/time parsing code was confused if the input time HH:MM:SS is
      followed by fractional seconds.  Since we do not record anything finer
      grained than seconds, we could just drop fractional part, but there is a
      twist.
      
      We have taught people that not just spaces but dot can be used as word
      separators when spelling things like:
      
          $ git log --since 2.days
          $ git show @{12:34:56.7.days.ago}
      
      and we shouldn't mistake "7" in the latter example as a fraction and
      discard it.
      
      The rules are:
      
       - valid days of month/mday are always single or double digits.
      
       - valid years are either two or four digits
      
         No, we don't support the year 600 _anyway_, since our encoding is based
         on the UNIX epoch, and the day we worry about the year 10,000 is far
         away and we can raise the limit to five digits when we get closer.
      
       - Other numbers (eg "600 days ago") can have any number of digits, but
         they cannot start with a zero. Again, the only exception is for
         two-digit numbers, since that is fairly common for dates ("Dec 01" is
         not unheard of)
      
      So that means that any milli- or micro-second would be thrown out just
      because the number of digits shows that it cannot be an interesting date.
      
      A milli- or micro-second can obviously be a perfectly fine number
      according to the rules above, as long as it doesn't start with a '0'. So
      if we have
      
      	12:34:56.123
      
      then that '123' gets parsed as a number, and we remember it. But because
      it's bigger than 31, we'll never use it as such _unless_ there is
      something after it to trigger that use.
      
      So you can say "12:34:56.123.days.ago", and because of the "days", that
      123 will actually be meaninful now.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e9854a76
    • J
      Merge git://git.kernel.org/pub/scm/gitk/gitk · b43b7366
      Junio C Hamano 提交于
      * git://git.kernel.org/pub/scm/gitk/gitk:
        gitk: Fix linehtag undefined error with file highlighting
        gitk: Fix commit encoding support
        gitk: Fix transient windows on Win32 and MacOS
        gitk: Add accelerators to frequently used menu commands
        gitk: Implement a user-friendly Edit View dialog
        gitk: Improve cherry-pick error handling
        gitk: Make cherry-pick call git-citool on conflicts
        gitk: Make gitk dialog windows transient
        gitk: Add Return and Escape bindings to dialogs
        gitk: Cope with unmerged files in local changes
        gitk: Make "show origin of this line" work on fake commits
        gitk: Unify handling of merge diffs with normal 2-way diffs
        gitk: Make the background color of marked lines configurable
        gitk: Add a menu item to show where a given line comes from
        gitk: Fix some off-by-one errors in computing which line to blame
        gitk: Allow starting gui blame for a specific line
        gitk: Fix file list context menu for merge commits
        gitk: Allow forcing branch creation if it already exists
      b43b7366
  3. 13 11月, 2008 35 次提交
    • P
      gitk: Fix linehtag undefined error with file highlighting · d98d50e2
      Paul Mackerras 提交于
      Occasionally gitk will throw a Tcl error complaining that linehtag(n)
      is undefined when.  It happens when the commit list is still growing
      (e.g. when updating the commit list) and gitk is set to highlight
      commits that affect certain file(s).  What happens is that the changes
      to the commit list set need_redisplay to indicate that the display
      needs to be redrawn.  That causes the next call to drawcommits to call
      clear_display, which unsets iddrawn and thus ensures that readfhighlight
      won't call bolden on any rows that have moved.  However, it is possible
      for readfhighlight to be called after the commit list has changed but
      before drawcommits has run, meaning that readfhighlight will potentially
      think that rows have been drawn when they haven't, because of the
      change in the id -> row mapping (and the fact that iddrawn is indexed
      by id but line[hnd]tag are indexed by row number).
      
      This fixes it (and also optimizes things a little) by making bolden
      and bolden_name check need_redisplay before doing anything.  If
      need_redisplay is set, then there is no point doing anything because
      the whole display is about to get cleared and redrawn, and it avoids
      looking up line[hn]tag using stale row numbers.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d98d50e2
    • A
      gitk: Fix commit encoding support · 590915da
      Alexander Gavrilov 提交于
      This commit fixes two problems with commit encodings:
      
      1) git-log actually uses i18n.logoutputencoding to generate
         its output, and falls back to i18n.commitencoding only
         when that option is not set.  Thus, gitk should use its
         value to read the results, if available.
      
      2) The readcommit function did not process encodings at all.
         This led to randomly appearing misconverted commits if
         the commit encoding differed from the current locale.
      
      Now commit messages should be displayed correctly, except
      when logoutputencoding is set to an encoding that cannot
      represent charecters in the message.  For example, it is
      impossible to convert Japanese characters from Shift-JIS
      to CP-1251 (although the reverse conversion works).
      
      The reason for using git log to read the commit and then getting
      Tcl to convert its output is that is essentially what happens in
      the normal path through getcommitlines, hence there is less chance
      for unintended differences in how commits are processed in
      getcommitlines and do_readcommit.
      Signed-off-by: NAlexander Gavrilov <angavrilov@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      590915da
    • A
      gitk: Fix transient windows on Win32 and MacOS · e7d64008
      Alexander Gavrilov 提交于
      Transient windows cause problems on these platforms:
      
      - On Win32 the windows appear in the top left corner
        of the screen. In order to fix it, this patch causes
        them to be explicitly centered on their parents by
        an idle handler.
      
      - On MacOS with Tk 8.4 they appear without a title bar.
        Since it is clearly unacceptable, this patch disables
        transient on that platform.
      Signed-off-by: NAlexander Gavrilov <angavrilov@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e7d64008
    • A
      gitk: Add accelerators to frequently used menu commands · cea07cf8
      Alexander Gavrilov 提交于
      This commit documents keyboard accelerators used for menu
      commands in the menu, as it is usually done, and adds some
      more, e.g. F4 to invoke Edit View (or New View if the current
      view is the un-editable "All files" view).
      
      The changes include a workaround for handling Shift-F4 on
      systems where XKB binds special XF86_Switch_VT_* symbols
      to Ctrl-Alt-F* combinations.  Tk often receives these codes
      when Shift-F* is pressed, so it is necessary to bind the
      relevant actions to them as well.
      Signed-off-by: NAlexander Gavrilov <angavrilov@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cea07cf8
    • J
      Update draft release notes to 1.6.1 · e599e7ff
      Junio C Hamano 提交于
      A large number of topics are merged to prepare for -rc0 now.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e599e7ff
    • J
      Merge branch 'jn/gitweb-customlinks' · 168d5bd5
      Junio C Hamano 提交于
      * jn/gitweb-customlinks:
        gitweb: Better processing format string in custom links in navbar
      168d5bd5
    • J
      Merge branch 'gb/gitweb-snapshot-pathinfo' · ac538e5d
      Junio C Hamano 提交于
      * gb/gitweb-snapshot-pathinfo:
        gitweb: embed snapshot format parameter in PATH_INFO
        gitweb: retrieve snapshot format from PATH_INFO
        gitweb: make the supported snapshot formats array global
      ac538e5d
    • J
      Merge branch 'ds/uintmax-config' (early part) · 3e9f158c
      Junio C Hamano 提交于
      * 'ds/uintmax-config' (early part):
        Add autoconf tests for pthreads
        Make Pthread link flags configurable
        Add Makefile check for FreeBSD 4.9-SECURITY
        Build: add NO_UINTMAX_T to support ancient systems
      
      Conflicts:
      	Makefile
      3e9f158c
    • J
      Merge branch 'jk/maint-commit-v-strip' · 6d14414d
      Junio C Hamano 提交于
      * jk/maint-commit-v-strip:
        commit: Fix stripping of patch in verbose mode.
      6d14414d
    • J
      Merge branch 'np/pack-safer' · 7b51b77d
      Junio C Hamano 提交于
      * np/pack-safer:
        t5303: fix printf format string for portability
        t5303: work around printf breakage in dash
        pack-objects: don't leak pack window reference when splitting packs
        extend test coverage for latest pack corruption resilience improvements
        pack-objects: allow "fixing" a corrupted pack without a full repack
        make find_pack_revindex() aware of the nasty world
        make check_object() resilient to pack corruptions
        make packed_object_info() resilient to pack corruptions
        make unpack_object_header() non fatal
        better validation on delta base object offsets
        close another possibility for propagating pack corruption
      7b51b77d
    • J
      Merge branch 'mk/maint-cg-push' · 3fdd37fe
      Junio C Hamano 提交于
      * mk/maint-cg-push:
        git push: Interpret $GIT_DIR/branches in a Cogito compatible way
      
      Conflicts:
      	t/t5516-fetch-push.sh
      3fdd37fe
    • J
      Merge branch 'bc/maint-keep-pack' · ecbbfb15
      Junio C Hamano 提交于
      * bc/maint-keep-pack:
        t7700: test that 'repack -a' packs alternate packed objects
        pack-objects: extend --local to mean ignore non-local loose objects too
        sha1_file.c: split has_loose_object() into local and non-local counterparts
        t7700: demonstrate mishandling of loose objects in an alternate ODB
        builtin-gc.c: use new pack_keep bitfield to detect .keep file existence
        repack: do not fall back to incremental repacking with [-a|-A]
        repack: don't repack local objects in packs with .keep file
        pack-objects: new option --honor-pack-keep
        packed_git: convert pack_local flag into a bitfield and add pack_keep
        t7700: demonstrate mishandling of objects in packs with a .keep file
      ecbbfb15
    • J
      Merge branch 'mv/remote-rename' · a5b2d4ac
      Junio C Hamano 提交于
      * mv/remote-rename:
        git-remote: document the migration feature of the rename subcommand
        git-remote rename: migrate from remotes/ and branches/
        remote: add a new 'origin' variable to the struct
        Implement git remote rename
      a5b2d4ac
    • J
      Merge branch 'jk/deny-push-to-current' · 902a4a25
      Junio C Hamano 提交于
      * jk/deny-push-to-current:
        receive-pack: detect push to current branch of non-bare repo
        t5516: refactor oddball tests
      902a4a25
    • J
      Merge branch 'dl/xdiff' · ac2abb49
      Junio C Hamano 提交于
      * dl/xdiff:
        xdiff: give up scanning similar lines early
      ac2abb49
    • J
      Merge branch 'lt/decorate' · b2b80c10
      Junio C Hamano 提交于
      * lt/decorate:
        rev-list documentation: clarify the two parts of history simplification
        Document "git log --simplify-by-decoration"
        Document "git log --source"
        revision traversal: '--simplify-by-decoration'
        Make '--decorate' set an explicit 'show_decorations' flag
        revision: make tree comparison functions take commits rather than trees
        Add a 'source' decorator for commits
      
      Conflicts:
      	Documentation/rev-list-options.txt
      b2b80c10
    • J
      Merge branch 'jk/diff-convfilter' · 72b6157a
      Junio C Hamano 提交于
      * jk/diff-convfilter:
        enable textconv for diff in verbose status/commit
        wt-status: load diff ui config
        only textconv regular files
        userdiff: require explicitly allowing textconv
        refactor userdiff textconv code
      
      Conflicts:
      	t/t4030-diff-textconv.sh
      72b6157a
    • J
      Merge branch 'jk/diff-convfilter-test-fix' · 459d6008
      Junio C Hamano 提交于
      * jk/diff-convfilter-test-fix:
        Avoid using non-portable `echo -n` in tests.
        add userdiff textconv tests
        document the diff driver textconv feature
        diff: add missing static declaration
      
      Conflicts:
      	Documentation/gitattributes.txt
      459d6008
    • J
      Merge branch 'st/tag' · df5e12f7
      Junio C Hamano 提交于
      * st/tag:
        tag: Add more tests about mixing incompatible modes and options
        tag: Check that options are only allowed in the appropriate mode
      df5e12f7
    • J
      Merge git://repo.or.cz/git-gui · 0f639abb
      Junio C Hamano 提交于
      * git://repo.or.cz/git-gui:
        git-gui: Request blame metadata in utf-8.
        git-gui: Add the Show SSH Key item to the clone dialog.
        git-gui: Fix focus transition in the blame viewer.
      0f639abb
    • B
      t7700: test that 'repack -a' packs alternate packed objects · 3289b9de
      Brandon Casey 提交于
      Previously, when 'repack -a' was called and there were no packs in the local
      repository without a .keep file, the repack would fall back to calling
      pack-objects with '--unpacked --incremental'. This resulted in the created
      pack file, if any, to be missing the packed objects in the alternate object
      store. Test that this specific case has been fixed.
      Signed-off-by: NBrandon Casey <casey@nrlssc.navy.mil>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3289b9de
    • J
      git.html: Update the links to stale versions · 171d7661
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      171d7661
    • J
      Merge branch 'maint' · 6cd3729e
      Junio C Hamano 提交于
      * maint:
        Start 1.6.0.5 cycle
        Fix pack.packSizeLimit and --max-pack-size handling
        checkout: Fix "initial checkout" detection
        Remove the period after the git-check-attr summary
      
      Conflicts:
      	RelNotes
      6cd3729e
    • J
      Start 1.6.0.5 cycle · c14639f7
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c14639f7
    • N
      Fix pack.packSizeLimit and --max-pack-size handling · a1e4760f
      Nicolas Pitre 提交于
      If the limit was sufficiently low, having a single object written
      could bust the limit (by design), but caused the remaining allowed
      size to go negative for subsequent objects, which for an unsigned
      variable is a rather huge limit.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a1e4760f
    • S
      rev-list documentation: clarify the two parts of history simplification · 7bc2508b
      Santi Béjar 提交于
      One set of options and parameters determine what commits are involved in
      the simplification process, and another set of options determine how the
      simplification is done.  Clarify their distinction at the beginning.
      Signed-off-by: NSanti Béjar <santi@agolina.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7bc2508b
    • N
      3fcfd662
    • J
      checkout: Fix "initial checkout" detection · fa7b3c2f
      Junio C Hamano 提交于
      Earlier commit 55218834 (checkout: do not lose staged removal, 2008-09-07)
      tightened the rule to prevent switching branches from losing local
      changes, so that staged removal of paths can be protected, while
      attempting to keep a loophole to still allow a special case of switching
      out of an un-checked-out state.
      
      However, the loophole was made a bit too tight, and did not allow
      switching from one branch (in an un-checked-out state) to check out
      another branch.
      
      The change to builtin-checkout.c in this commit loosens it to allow this,
      by not insisting the original commit and the new commit to be the same.
      
      It also introduces a new function, is_index_unborn (and an associated
      macro, is_cache_unborn), to check if the repository is truly in an
      un-checked-out state more reliably, by making sure that $GIT_INDEX_FILE
      did not exist when populating the in-core index structure.  A few places
      the earlier commit 55218834 added the check for the initial checkout
      condition are updated to use this function.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fa7b3c2f
    • J
      commit: Fix stripping of patch in verbose mode. · 0b38227f
      Jeff King 提交于
      When the "-v" option is given, we put diff of what is to be committed into
      the commit template, and then strip it back out again after the user has
      edited it.
      
      We used to look for the diff by searching for the "diff --git a/"
      header. With diff.mnemonicprefix set in the configuration, however, this
      pattern does not match.  The pattern is loosened to cover this case.
      
      Also, if the user puts their own diff in the message (e.g., as a sample
      output), then we will accidentally trigger the pattern, removing part of
      their output.
      
      We can avoid doing this stripping altogether if the user didn't use "-v"
      in the first place, so we know that any match we find will be a false
      positive.
      
      [jc: this fix was split out of a series originally meant for master.]
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0b38227f
    • M
      Remove the period after the git-check-attr summary · 0d641f75
      Matt Kraai 提交于
      The period at the end of the git-check-attr summary causes there to be
      two periods after the summary in the git(1) manual page.
      Signed-off-by: NMatt Kraai <kraai@ftbfs.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0d641f75
    • B
      pack-objects: extend --local to mean ignore non-local loose objects too · daae0625
      Brandon Casey 提交于
      With this patch, --local means pack only local objects that are not already
      packed.
      
      Additionally, this fixes t7700 testing whether loose objects in an alternate
      object database are repacked.
      Signed-off-by: NBrandon Casey <drafnel@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      daae0625
    • B
    • B
      t7700: demonstrate mishandling of loose objects in an alternate ODB · 3c3df429
      Brandon Casey 提交于
      Loose objects residing in an alternate object database should not be packed
      when the -l option to repack is used.
      Signed-off-by: NBrandon Casey <drafnel@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3c3df429
    • B
    • B
      repack: do not fall back to incremental repacking with [-a|-A] · f7991d1e
      Brandon Casey 提交于
      When repack is called with either the -a or -A option, the user has
      requested to repack all objects including those referenced by the
      alternates mechanism. Currently, if there are no local packs without
      .keep files, then repack will call pack-objects with the
      '--unpacked --incremental' options which causes it to exclude alternate
      packed objects. So, remove this fallback.
      Signed-off-by: NBrandon Casey <casey@nrlssc.navy.mil>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f7991d1e