1. 18 4月, 2006 2 次提交
    • L
      Log message printout cleanups · 91539833
      Linus Torvalds 提交于
      On Sun, 16 Apr 2006, Junio C Hamano wrote:
      >
      > In the mid-term, I am hoping we can drop the generate_header()
      > callchain _and_ the custom code that formats commit log in-core,
      > found in cmd_log_wc().
      
      Ok, this was nastier than expected, just because the dependencies between
      the different log-printing stuff were absolutely _everywhere_, but here's
      a patch that does exactly that.
      
      The patch is not very easy to read, and the "--patch-with-stat" thing is
      still broken (it does not call the "show_log()" thing properly for
      merges). That's not a new bug. In the new world order it _should_ do
      something like
      
      	if (rev->logopt)
      		show_log(rev, rev->logopt, "---\n");
      
      but it doesn't. I haven't looked at the --with-stat logic, so I left it
      alone.
      
      That said, this patch removes more lines than it adds, and in particular,
      the "cmd_log_wc()" loop is now a very clean:
      
      	while ((commit = get_revision(rev)) != NULL) {
      		log_tree_commit(rev, commit);
      		free(commit->buffer);
      		commit->buffer = NULL;
      	}
      
      so it doesn't get much prettier than this. All the complexity is entirely
      hidden in log-tree.c, and any code that needs to flush the log literally
      just needs to do the "if (rev->logopt) show_log(...)" incantation.
      
      I had to make the combined_diff() logic take a "struct rev_info" instead
      of just a "struct diff_options", but that part is pretty clean.
      
      This does change "git whatchanged" from using "diff-tree" as the commit
      descriptor to "commit", and I changed one of the tests to reflect that new
      reality. Otherwise everything still passes, and my other tests look fine
      too.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      91539833
    • J
      rev-list --header: output format fix · db89665f
      Junio C Hamano 提交于
      Initial fix prepared by Johannes, but I did it slightly differently.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      db89665f
  2. 17 4月, 2006 1 次提交
  3. 16 4月, 2006 12 次提交
  4. 15 4月, 2006 13 次提交
    • J
      diff-tree: typefix. · 5069b1cf
      Junio C Hamano 提交于
      Recent diff_tree_setup_paths() update made it take a second
      argument of type "struct diff_options", but we passed another
      struct that happenes to have that type at the beginning by
      mistake.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5069b1cf
    • J
      GIT v1.3.0-rc4 · 42b5c788
      Junio C Hamano 提交于
      I've merged everything I think is ready for 1.3.0, so this is
      the final round -- hopefully I can release this with minimum
      last-minute fixup as v1.3.0 early next week.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      42b5c788
    • J
      Merge branch 'dl/xdiff' · 170abc81
      Junio C Hamano 提交于
      * dl/xdiff:
        xdiff: post-process hunks to make them consistent.
      170abc81
    • 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
  5. 14 4月, 2006 9 次提交
  6. 13 4月, 2006 3 次提交