1. 09 7月, 2009 1 次提交
    • L
      Add 'fill_directory()' helper function for directory traversal · 1d8842d9
      Linus Torvalds 提交于
      Most of the users of "read_directory()" actually want a much simpler
      interface than the whole complex (but rather powerful) one.
      
      In fact 'git add' had already largely abstracted out the core interface
      issues into a private "fill_directory()" function that was largely
      applicable almost as-is to a number of callers.  Yes, 'git add' wants to
      do some extra work of its own, specific to the add semantics, but we can
      easily split that out, and use the core as a generic function.
      
      This function does exactly that, and now that much simplified
      'fill_directory()' function can be shared with a number of callers,
      while also ensuring that the rather more complex calling conventions of
      read_directory() are used by fewer call-sites.
      
      This also makes the 'common_prefix()' helper function private to dir.c,
      since all callers are now in that file.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1d8842d9
  2. 07 7月, 2009 12 次提交
  3. 02 7月, 2009 9 次提交
  4. 01 7月, 2009 9 次提交
  5. 30 6月, 2009 1 次提交
    • L
      git log: add '--merges' flag to match '--no-merges' · b8e8db28
      Linus Torvalds 提交于
      I do various statistics on git, and one of the things I look at is merges,
      because they are often interesting events to count ("how many merges vs
      how much 'real development'" kind of statistics). And you can do it with
      some fairly straightforward scripting, ie
      
      	git rev-list --parents HEAD |
      		grep ' .* ' |
      		git diff-tree --always -s --pretty=oneline --stdin |
      		less -S
      
      will do it.
      
      But I finally got irritated with the fact that we can skip merges with
      '--no-merges', but we can't do the trivial reverse operation.
      
      So this just adds a '--merges' flag that _only_ shows merges. Now you can
      do the above with just a
      
      	git log --merges --pretty=oneline
      
      which is a lot simpler. It also means that we automatically get a lot of
      statistics for free, eg
      
      	git shortlog -ns --merges
      
      does exactly what you'd want it to do.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b8e8db28
  6. 28 6月, 2009 8 次提交