1. 15 1月, 2007 15 次提交
    • J
      Add describe test. · 5312ab11
      Junio C Hamano 提交于
      ... with help from Shawn.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5312ab11
    • S
      Improve git-describe performance by reducing revision listing. · 8713ab30
      Shawn O. Pearce 提交于
      My prior version of git-describe ran very slowly on even reasonably
      sized projects like git.git and linux.git as it tended to identify
      a large number of possible tags and then needed to generate the
      revision list for each of those tags to sort them and select the
      best tag to describe the input commit.
      
      All we really need is the number of commits in the input revision
      which are not in the tag.  We can generate these counts during
      the revision walking and tag matching loop by assigning a color to
      each tag and coloring the commits as we walk them.  This limits us
      to identifying no more than 26 possible tags, as there is limited
      space available within the flags field of struct commit.
      
      The limitation of 26 possible tags is hopefully not going to be a
      problem in real usage, as most projects won't create 26 maintenance
      releases and merge them back into a development trunk after the
      development trunk was tagged with a release candidate tag.  If that
      does occur git-describe will start to revert to its old behavior of
      using the newer maintenance release tag to describe the development
      trunk, rather than the development trunk's own tag.  The suggested
      workaround would be to retag the development trunk's tip.
      
      However since even 26 possible tags can take a while to generate a
      description for on some projects I'm defaulting the limit to 10 but
      offering the user --candidates to increase the number of possible
      matches if they need a more accurate result.  I specifically chose
      10 for the default as it seems unlikely projects will have more
      than 10 maintenance releases merged into a development trunk before
      retagging the development trunk, and it seems to perform about the
      same on linux.git as v1.4.4.4 git-describe.
      
      A large amount of debugging information was also added during
      the development of this change, so I've left it in to be toggled
      on with --debug.  It may be useful to the end user to help them
      understand why git-describe took one particular tag over another.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8713ab30
    • S
      Use binary searching on large buckets in git-describe. · 910c0d7b
      Shawn O. Pearce 提交于
      If a project has a really huge number of tags (such as several
      thousand tags) then we are likely to have nearly a hundred tags in
      some buckets.  Scanning those buckets as linked lists could take
      a large amount of time if done repeatedly during history traversal.
      
      Since we are searching for a unique commit SHA1 we can sort all
      tags by commit SHA1 and perform a binary search within the bucket.
      Once we identify a particular tag as matching this commit we walk
      backwards within the bucket matches to make sure we pick up the
      highest priority tag for that commit, as the binary search may
      have landed us in the middle of a set of tags which point at the
      same commit.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      910c0d7b
    • S
      Hash tags by commit SHA1 in git-describe. · c3e3cd4b
      Shawn O. Pearce 提交于
      If a project has a very large number of tags then git-describe
      will spend a good part of its time looping over the tags testing
      them one at a time to determine if it matches a given commit.
      For 10 tags this is not a big deal, but for hundreds of tags the
      time could become considerable if we don't find an exact match for
      the input commit and we need to walk back along the history chain.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      c3e3cd4b
    • S
      Always perfer annotated tags in git-describe. · dccd0c2a
      Shawn O. Pearce 提交于
      Several people have suggested that its always better to describe
      a commit using an annotated tag, and to only use a lightweight tag
      if absolutely no annotated tag matches the input commit.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      dccd0c2a
    • N
      some doc updates · c14261ea
      Nicolas Pitre 提交于
      1) talk about "git merge" instead of "git pull ."
      
      2) suggest "git repo-config" instead of directly editing config files
      
      3) echo "URL: blah" > .git/remotes/foo is obsolete and should be
         "git repo-config remote.foo.url blah"
      
      4) support for partial URL prefix has been removed (see commit
         ea560e6d) so drop mention of it.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      c14261ea
    • J
      git log documentation: teach -<n> form. · adb7ba6b
      Junio C Hamano 提交于
      We say "this shows only the most often used ones"; so instead of
      teaching --max-number=<n> form, list -<n> form which is much
      easier to type.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      adb7ba6b
    • S
      Convert output messages in merge-recursive to past tense. · 89f40be2
      Shawn O. Pearce 提交于
      Now that we are showing the output messages for verbosity levels
      <5 after all actions have been performed (due to the progress meter
      running during the actions) it can be confusing to see messages in
      the present tense when the user is looking at a '100% done' message
      right above them.  Converting the messages to past tense will appear
      more correct in this case, and shouldn't affect a developer who is
      debugging the application and running it at a verbosity level >=5.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      89f40be2
    • S
      Display a progress meter during merge-recursive. · 3f6ee2d1
      Shawn O. Pearce 提交于
      Because large merges on slow systems can take up to a minute to
      execute we should try to keep the user entertained with a progress
      meter to let them know how far we have progressed through the
      current merge.
      
      The progress meter considers each entry in the in-memory index to
      be a unit, which means a single recursive merge will double the
      number of units in the progress meter.  Files which are unmerged
      after the 3-way tree merge are also considered a unit within the
      progress meter.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      3f6ee2d1
    • S
      Enable output buffering in merge-recursive. · 66a155bc
      Shawn O. Pearce 提交于
      Buffering all message output until a merge invocation is complete is
      necessary to prevent intereferring with a progress meter that would
      indicate the number of files completely merged, and how many remain.
      This change does not introduce a progress meter, but merely lays
      the groundwork to buffer the output.
      
      To aid debugging output buffering is only enabled if verbosity
      is lower than 5.  When using verbosity levels above 5 the user is
      probably debugging the merge program itself and does not want to
      see the output delayed, especially if they are stepping through
      portions of the code in a debugger.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      66a155bc
    • S
      Allow the user to control the verbosity of merge-recursive. · 8c3275ab
      Shawn O. Pearce 提交于
      Junio C Hamano <junkio@cox.net> writes:
      >
      > I think the output from merge-recursive can be categorized into 5
      > verbosity levels:
      >
      > 1. "CONFLICT", "Rename", "Adding here instead due to D/F conflict"
      > (outermost)
      >
      > 2. "Auto-merged successfully" (outermost)
      >
      > 3. The first "Merging X with Y".
      >
      > 4. outermost "Merging:\ntitle1\ntitle2".
      >
      > 5. outermost "found N common ancestors\nancestor1\nancestor2\n..."
      > and anything from inner merge.
      >
      > I would prefer the default verbosity level to be 2 (that is, show
      > both 1 and 2).
      
      and this change makes it so.  I think level 3 is probably pointless
      as its only one line of output above level 2, but I can see how some
      users may want to view it but not view the slightly more verbose
      output of level 4.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8c3275ab
    • S
      Remove unnecessary call_depth parameter in merge-recursive. · 63889639
      Shawn O. Pearce 提交于
      Because the output_indent always matches the call_depth value
      there is no reason to pass around the call_depth to the merge
      function during each recursive invocation.
      
      This is a simple refactoring that will make the code easier to
      follow later on as I start to add output verbosity controls.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      63889639
    • J
      Merge branch 'jc/int' · f4b6c6b9
      Junio C Hamano 提交于
      * jc/int:
        More tests in t3901.
        Consistent message encoding while reusing log from an existing commit.
        t3901: test "format-patch | am" pipe with i18n
        Use log output encoding in --pretty=email headers.
      f4b6c6b9
    • J
      Merge branch 'sp/merge' (early part) · 6de33478
      Junio C Hamano 提交于
      * 'sp/merge' (early part):
        Improve merge performance by avoiding in-index merges.
      6de33478
    • J
      Merge branch 'jc/subdir' · 3681d40b
      Junio C Hamano 提交于
      * jc/subdir:
        Allow whole-tree operations to be started from a subdirectory
        Use cd_to_toplevel in scripts that implement it by hand.
        Define cd_to_toplevel shell function in git-sh-setup
      3681d40b
  2. 14 1月, 2007 10 次提交
  3. 13 1月, 2007 8 次提交
  4. 12 1月, 2007 7 次提交