1. 11 Aug, 2010 1 commit
  2. 27 Jun, 2010 2 commits
  3. 22 Feb, 2010 1 commit
    • Linus Torvalds's avatar
      Move 'builtin-*' into a 'builtin/' subdirectory · 81b50f3c
      Linus Torvalds authored
      This shrinks the top-level directory a bit, and makes it much more
      pleasant to use auto-completion on the thing. Instead of
      	[torvalds@nehalem git]$ em buil<tab>
      	Display all 180 possibilities? (y or n)
      	[torvalds@nehalem git]$ em builtin-sh
      	builtin-shortlog.c     builtin-show-branch.c  builtin-show-ref.c
      	builtin-shortlog.o     builtin-show-branch.o  builtin-show-ref.o
      	[torvalds@nehalem git]$ em builtin-shor<tab>
      	builtin-shortlog.c  builtin-shortlog.o
      	[torvalds@nehalem git]$ em builtin-shortlog.c
      you get
      	[torvalds@nehalem git]$ em buil<tab>		[type]
      	builtin/   builtin.h
      	[torvalds@nehalem git]$ em builtin		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/sh<tab>	[type]
      	shortlog.c     shortlog.o     show-branch.c  show-branch.o  show-ref.c     show-ref.o
      	[torvalds@nehalem git]$ em builtin/sho		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/shor<tab>	[type]
      	shortlog.c  shortlog.o
      	[torvalds@nehalem git]$ em builtin/shortlog.c
      which doesn't seem all that different, but not having that annoying
      break in "Display all 180 possibilities?" is quite a relief.
      NOTE! If you do this in a clean tree (no object files etc), or using an
      editor that has auto-completion rules that ignores '*.o' files, you
      won't see that annoying 'Display all 180 possibilities?' message - it
      will just show the choices instead.  I think bash has some cut-off
      around 100 choices or something.
      So the reason I see this is that I'm using an odd editory, and thus
      don't have the rules to cut down on auto-completion.  But you can
      simulate that by using 'ls' instead, or something similar.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  4. 20 Feb, 2010 1 commit
  5. 25 Nov, 2009 1 commit
  6. 20 Oct, 2009 1 commit
    • Thomas Rast's avatar
      Refactor pretty_print_commit arguments into a struct · dd2e794a
      Thomas Rast authored
      pretty_print_commit() has a bunch of rarely-used arguments, and
      introducing more of them requires yet another update of all the call
      sites.  Refactor most of them into a struct to make future extensions
      The ones that stay "plain" arguments were chosen on the grounds that
      all callers put real arguments there, whereas some callers have 0/NULL
      for all arguments that were factored into the struct.
      We declare the struct 'const' to ensure none of the callers are bitten
      by the changed (no longer call-by-value) semantics.
      Signed-off-by: default avatarThomas Rast <trast@student.ethz.ch>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  7. 01 Sep, 2009 1 commit
  8. 25 May, 2009 1 commit
  9. 14 Mar, 2009 1 commit
    • Benjamin Kramer's avatar
      Remove unused assignments · 8e76bf3f
      Benjamin Kramer authored
      These variables were always overwritten or the assigned
      value was unused:
        builtin-diff-tree.c::cmd_diff_tree(): nr_sha1
        builtin-for-each-ref.c::opt_parse_sort(): sort_tail
        builtin-mailinfo.c::decode_header_bq(): in
        builtin-shortlog.c::insert_one_record(): len
        connect.c::git_connect(): path
        imap-send.c::v_issue_imap_cmd(): n
        pretty.c::pp_user_info(): filler
        remote::parse_refspec_internal(): llen
      Signed-off-by: default avatarBenjamin Kramer <benny.kra@googlemail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  10. 08 Feb, 2009 2 commits
  11. 07 Jan, 2009 1 commit
  12. 01 Jan, 2009 1 commit
    • Dato Simó's avatar
      builtin-shortlog.c: use string_list_append(), and don't strdup unnecessarily · fe73fc1a
      Dato Simó authored
      Make insert_one_record() use string_list_append(), instead of duplicating
      its code. Because of this, do not free the "util" member when clearing the
      "onelines" string lists: with the new code path it is not initialized to
      any value (was being initialized to NULL previously).
      Also, avoid unnecessary strdup() calls when inserting names in log->list.
      This list always has "strdup_strings" activated, hence strdup'ing namebuf is
      unnecessary. This change also removes a latent memory leak in the old code.
      NB: The duplicated code mentioned above predated the appearance of
      Signed-off-by: Dato Simó's avatarAdeodato Simó <dato@net.com.org.es>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  13. 22 Jul, 2008 1 commit
    • Johannes Schindelin's avatar
      Rename path_list to string_list · c455c87c
      Johannes Schindelin authored
      The name path_list was correct for the first usage of that data structure,
      but it really is a general-purpose string list.
      $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list)
      $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list)
      $ git mv path-list.h string-list.h
      $ git mv path-list.c string-list.c
      $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path)
      $ perl -i -pe 's/path/string/g' string-list.[ch]
      $ git mv Documentation/technical/api-path-list.txt \
      $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths)
      ... and then fix all users of string-list to access the member "string"
      instead of "path".
      Documentation/technical/api-string-list.txt needed some rewrapping, too.
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  14. 15 Jul, 2008 1 commit
  15. 13 Jul, 2008 1 commit
    • Stephan Beyer's avatar
      Make usage strings dash-less · 1b1dd23f
      Stephan Beyer authored
      When you misuse a git command, you are shown the usage string.
      But this is currently shown in the dashed form.  So if you just
      copy what you see, it will not work, when the dashed form
      is no longer supported.
      This patch makes git commands show the dash-less version.
      For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh
      generates a dash-less usage string now.
      Signed-off-by: default avatarStephan Beyer <s-beyer@gmx.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  16. 09 Jul, 2008 2 commits
  17. 12 Apr, 2008 1 commit
  18. 15 Mar, 2008 1 commit
  19. 05 Mar, 2008 1 commit
    • Andy Whitcroft's avatar
      shortlog: take the first populated line of the description · c1ce83a5
      Andy Whitcroft authored
      Way back the perl version of shortlog would take the first populated line
      of the commit body.  The builtin version mearly takes the first line.
      This leads to empty shortlog entries when there is some viable text in
      the commit.
      Reinstate this behaviour igoring all lines with nothing but whitespace.
      This is often useful when dealing with commits imported from foreign SCMs
      that do not tidy up the log message of useless blank lines at the beginning.
      Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  20. 26 Feb, 2008 1 commit
  21. 18 Feb, 2008 1 commit
  22. 09 Jan, 2008 1 commit
  23. 12 Dec, 2007 1 commit
    • Junio C Hamano's avatar
      shortlog: default to HEAD when the standard input is a tty · 3384a2df
      Junio C Hamano authored
      Instead of warning the user that it is expecting git log output from
      the standard input (and waiting for the user to type the log from
      the keyboard, which is a silly thing to do), default to traverse from
      HEAD when there is no rev parameter given and the standard input is
      a tty.
      This factors out a useful helper "add_head()" from builtin-diff.c to a
      more appropriate place revision.c while renaming it to more descriptive
      name add_head_to_pending(), as that is what the function is about.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  24. 11 Dec, 2007 1 commit
  25. 08 Dec, 2007 2 commits
  26. 19 Sep, 2007 1 commit
  27. 07 Jun, 2007 1 commit
    • Junio C Hamano's avatar
      War on whitespace · a6080a0a
      Junio C Hamano authored
      This uses "git-apply --whitespace=strip" to fix whitespace errors that have
      crept in to our source files over time.  There are a few files that need
      to have trailing whitespaces (most notably, test vectors).  The results
      still passes the test, and build result in Documentation/ area is unchanged.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  28. 30 Apr, 2007 1 commit
  29. 29 Apr, 2007 1 commit
  30. 10 Apr, 2007 2 commits
  31. 14 Mar, 2007 1 commit
    • Junio C Hamano's avatar
      shortlog: prompt when reading from terminal by mistake · 0497c620
      Junio C Hamano authored
      I was trying to see who have been active recently to find GSoC
      mentor candidates by running:
      	$ git shortlog -s -n --since=4.months | head -n 20
      After waiting for about 20 seconds, I started getting worried,
      thinking that the recent revision traversal updates might have
      had an unintended side effect.
      Not so.  "git shortlog" acts as a filter when no revs are given,
      unlike "git log" which defaults to HEAD.  It was reading from
      its standard input.
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
  32. 07 Mar, 2007 1 commit
    • Shawn O. Pearce's avatar
      General const correctness fixes · 3a55602e
      Shawn O. Pearce authored
      We shouldn't attempt to assign constant strings into char*, as the
      string is not writable at runtime.  Likewise we should always be
      treating unsigned values as unsigned values, not as signed values.
      Most of these are very straightforward.  The only exception is the
      (unnecessary) xstrdup/free in builtin-branch.c for the detached
      head case.  Since this is a user-level interactive type program
      and that particular code path is executed no more than once, I feel
      that the extra xstrdup call is well worth the easy elimination of
      this warning.
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
  33. 21 Feb, 2007 1 commit
    • Junio C Hamano's avatar
      Mechanical conversion to use prefixcmp() · cc44c765
      Junio C Hamano authored
      This mechanically converts strncmp() to use prefixcmp(), but only when
      the parameters match specific patterns, so that they can be verified
      easily.  Leftover from this will be fixed in a separate step, including
      idiotic conversions like
          if (!strncmp("foo", arg, 3))
          if (!(-prefixcmp(arg, "foo")))
      This was done by using this script in px.perl
         #!/usr/bin/perl -i.bak -p
         if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ && (length($2) == $3)) {
                 s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|;
         if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ && (length($1) == $3)) {
                 s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|;
      and running:
         $ git grep -l strncmp -- '*.c' | xargs perl px.perl
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
  34. 20 Dec, 2006 1 commit
    • Junio C Hamano's avatar
      simplify inclusion of system header files. · 85023577
      Junio C Hamano authored
      This is a mechanical clean-up of the way *.c files include
      system header files.
       (1) sources under compat/, platform sha-1 implementations, and
           xdelta code are exempt from the following rules;
       (2) the first #include must be "git-compat-util.h" or one of
           our own header file that includes it first (e.g. config.h,
           builtin.h, pkt-line.h);
       (3) system headers that are included in "git-compat-util.h"
           need not be included in individual C source files.
       (4) "git-compat-util.h" does not have to include subsystem
           specific header files (e.g. expat.h).
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
  35. 11 Dec, 2006 1 commit
    • Junio C Hamano's avatar
      shortlog: fix segfault on empty authorname · 6f987258
      Junio C Hamano authored
      The old code looked backwards from the email address to parse
      the name, allowing an arbitrary number of spaces between the
      two. However, in the case of no name, we looked back too far to
      the 'author' (or 'Author:') header.
      The bug was triggered by commit febf7ea4bed from linux-2.6.
      Jeff King originally fixed it by looking back only one
      character; Johannes Schindelin pointed out that we could try
      harder while at it to cope with commits with broken headers.
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>