1. 16 4月, 2006 1 次提交
    • J
      Split init_revisions() out of setup_revisions() · 6b9c58f4
      Junio C Hamano 提交于
      Merging all three option parsers related to whatchanged is
      unarguably the right thing, but the fallout was too big to scare
      me away.  Let's try it once again, but once step at time.
      
      This splits out init_revisions() call from setup_revisions(), so
      that the callers can set different defaults to match the
      traditional benaviour.
      
      The rev-list command is still broken in a big way, which is the
      topic of next step.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6b9c58f4
  2. 15 4月, 2006 10 次提交
    • J
      Fix up rev-list option parsing. · 8c1f0b44
      Junio C Hamano 提交于
      rev-list does not take diff options, so barf after seeing some.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8c1f0b44
    • J
      Fix up default abbrev in setup_revisions() argument parser. · 8e8f9987
      Junio C Hamano 提交于
      The default abbreviation precision should be DEFAULT_ABBREV as before.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8e8f9987
    • L
      Common option parsing for "git log --diff" and friends · cd2bdc53
      Linus Torvalds 提交于
      This basically does a few things that are sadly somewhat interdependent,
      and nontrivial to split out
      
       - get rid of "struct log_tree_opt"
      
         The fields in "log_tree_opt" are moved into "struct rev_info", and all
         users of log_tree_opt are changed to use the rev_info struct instead.
      
       - add the parsing for the log_tree_opt arguments to "setup_revision()"
      
       - make setup_revision set a flag (revs->diff) if the diff-related
         arguments were used. This allows "git log" to decide whether it wants
         to show diffs or not.
      
       - make setup_revision() also initialize the diffopt part of rev_info
         (which we had from before, but we just didn't initialize it)
      
       - make setup_revision() do all the "finishing touches" on it all (it will
         do the proper flag combination logic, and call "diff_setup_done()")
      
      Now, that was the easy and straightforward part.
      
      The slightly more involved part is that some of the programs that want to
      use the new-and-improved rev_info parsing don't actually want _commits_,
      they may want tree'ish arguments instead. That meant that I had to change
      setup_revision() to parse the arguments not into the "revs->commits" list,
      but into the "revs->pending_objects" list.
      
      Then, when we do "prepare_revision_walk()", we walk that list, and create
      the sorted commit list from there.
      
      This actually cleaned some stuff up, but it's the less obvious part of the
      patch, and re-organized the "revision.c" logic somewhat. It actually paves
      the way for splitting argument parsing _entirely_ out of "revision.c",
      since now the argument parsing really is totally independent of the commit
      walking: that didn't use to be true, since there was lots of overlap with
      get_commit_reference() handling etc, now the _only_ overlap is the shared
      (and trivial) "add_pending_object()" thing.
      
      However, I didn't do that file split, just because I wanted the diff
      itself to be smaller, and show the actual changes more clearly. If this
      gets accepted, I'll do further cleanups then - that includes the file
      split, but also using the new infrastructure to do a nicer "git diff" etc.
      
      Even in this form, it actually ends up removing more lines than it adds.
      
      It's nice to note how simple and straightforward this makes the built-in
      "git log" command, even though it continues to support all the diff flags
      too. It doesn't get much simpler that this.
      
      I think this is worth merging soonish, because it does allow for future
      cleanup and even more sharing of code. However, it obviously touches
      "revision.c", which is subtle. I've tested that it passes all the tests we
      have, and it passes my "looks sane" detector, but somebody else should
      also give it a good look-over.
      
      [jc: squashed the original and three "oops this too" updates, with
       another fix-up.]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cd2bdc53
    • J
      Merge branch 'js/diffstat' · afcb536f
      Junio C Hamano 提交于
      * js/diffstat:
        diff --stat: no need to ask funcnames nor context.
        diff-options: add --stat (take 2)
        diff-options: add --stat (take 2)
      afcb536f
    • J
      Merge branch 'jc/fix5500' · a3cc31fb
      Junio C Hamano 提交于
      * jc/fix5500:
        t5500: test fix
      a3cc31fb
    • L
      Clean up trailing whitespace when pretty-printing commits · 40c2fe00
      Linus Torvalds 提交于
      Partly because we've messed up and now have some commits with trailing
      whitespace, but partly because this also just simplifies the code, let's
      remove trailing whitespace from the end when pretty-printing commits.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      40c2fe00
    • J
      "git cmd -h" for shell scripts. · cad1ed95
      Junio C Hamano 提交于
      Wrappers that use sh-setup took --help but not -h.  Noticed by
      Sébastien Pierre.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cad1ed95
    • J
      git-log <diff-options> <paths> documentation · e51c3b50
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e51c3b50
    • J
      Retire git-log.sh (take #4) · e3a125a9
      Junio C Hamano 提交于
      Noticed by Johannes.  We do not install it anymore, but still have
      been shipping the source, which was crazy.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e3a125a9
    • J
      stripspace: incomplete line fix (take #2) · 5cf7e21f
      Junio C Hamano 提交于
      This fixes f4ee3eb6 breakage, which
      added an extra trailing blank line after stripping trailing blank lines
      by mistake.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5cf7e21f
  3. 14 4月, 2006 8 次提交
  4. 13 4月, 2006 9 次提交
  5. 12 4月, 2006 12 次提交