1. 18 1月, 2007 2 次提交
  2. 28 12月, 2006 1 次提交
    • J
      UTF-8: introduce i18n.logoutputencoding. · d2c11a38
      Junio C Hamano 提交于
      It is plausible for somebody to want to view the commit log in a
      different encoding from i18n.commitencoding -- the project's
      policy may be UTF-8 and the user may be using a commit message
      hook to run iconv to conform to that policy (and either not have
      i18n.commitencoding to default to UTF-8 or have it explicitly
      set to UTF-8).  Even then, Latin-1 may be more convenient for
      the usual pager and the terminal the user uses.
      
      The new variable i18n.logoutputencoding is used in preference to
      i18n.commitencoding to decide what encoding to recode the log
      output in when git-log and friends formats the commit log message.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d2c11a38
  3. 26 12月, 2006 1 次提交
    • J
      Teach log family --encoding · 52883fbd
      Junio C Hamano 提交于
      Updated commit objects record the encoding used in their
      encoding header.  This updates the log family to reencode it
      into the encoding specified in i18n.commitencoding (or the
      default, which is "utf-8") upon output.
      
      To force a specific encoding that is different, log family takes
      command line flag --encoding=<encoding>; giving --encoding=none
      entirely disables the reencoding and lets you view log messges
      in their original encoding.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      52883fbd
  4. 21 12月, 2006 1 次提交
    • J
      simplify inclusion of system header files. · 85023577
      Junio C Hamano 提交于
      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: NJunio C Hamano <junkio@cox.net>
      85023577
  5. 14 12月, 2006 1 次提交
  6. 13 12月, 2006 1 次提交
    • A
      Allow subcommand.color and color.subcommand color configuration · a159ca0c
      Andy Parkins 提交于
      While adding colour to the branch command it was pointed out that a
      config option like "branch.color" conflicts with the pre-existing
      "branch.something" namespace used for specifying default merge urls and
      branches.  The suggested solution was to flip the order of the
      components to "color.branch", which I did for colourising branch.
      
      This patch does the same thing for
        - git-log (color.diff)
        - git-status (color.status)
        - git-diff (color.diff)
        - pager (color.pager)
      
      I haven't removed the old config options; but they should probably be
      deprecated and eventually removed to prevent future namespace
      collisions.  I've done this deprecation by changing the documentation
      for the config file to match the new names; and adding the "color.XXX"
      options to contrib/completion/git-completion.bash.
      
      Unfortunately git-svn reads "diff.color" and "pager.color"; which I
      don't like to change unilaterally.
      Signed-off-by: NAndy Parkins <andyparkins@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      a159ca0c
  7. 24 11月, 2006 1 次提交
  8. 27 10月, 2006 1 次提交
    • R
      Make git-cherry handle root trees · 2b60356d
      Rene Scharfe 提交于
      This patch on top of 'next' makes built-in git-cherry handle root
      commits.
      
      It moves the static function log-tree.c::diff_root_tree() to
      tree-diff.c and makes it more similar to diff_tree_sha1() by
      shuffling around arguments and factoring out the call to
      log_tree_diff_flush().  Consequently the name is changed to
      diff_root_tree_sha1().  It is a version of diff_tree_sha1() that
      compares the empty tree (= root tree) against a single 'real' tree.
      
      This function is then used in get_patch_id() to compute patch IDs
      for initial commits instead of SEGFAULTing, as the current code
      does if confronted with parentless commits.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2b60356d
  9. 24 10月, 2006 1 次提交
    • R
      Built-in cherry · e827633a
      Rene Scharfe 提交于
      This replaces the shell script git-cherry with a version written in C.
      
      The behaviour of the new version differs from the original in two
      points: it has no long help any more, and it is handling the (optional)
      third parameter a bit differently.  Basically, it does the equivalent
      of
      
         ours=`git-rev-list $ours ^$limit ^$upstream`
      
      instead of
      
         ours=`git-rev-list $ours ^$limit`
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e827633a
  10. 29 9月, 2006 2 次提交
  11. 27 8月, 2006 1 次提交
  12. 05 8月, 2006 1 次提交
  13. 01 8月, 2006 1 次提交
  14. 29 7月, 2006 2 次提交
  15. 28 7月, 2006 1 次提交
    • J
      log and diff family: honor config even from subdirectories · ef1d9c5a
      Junio C Hamano 提交于
      There currently is an unfortunate circular dependency between
      what init_revisions (the command line revision specification
      parser) does and setting up the log and diff options.  The
      function uses setup_git_directory() to find the root of the
      project relative to the current directory and calls diff_setup()
      to prepare diff generation.  However, some of the things that
      diff_setup() does needs to depend on the configuration variable,
      which needs to be read after setup_git_directory() is called.
      
      This patch is a low impact workaround.  It first lets
      init_revisions() to run and do its thing, then uses git_config()
      and diff_setup() after it returns, so that configuration
      variables that affects the diff operation can be used from
      subdirectories.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ef1d9c5a
  16. 15 7月, 2006 4 次提交
  17. 09 7月, 2006 1 次提交
  18. 08 7月, 2006 1 次提交
    • J
      diff: do not use configuration magic at the core-level · 83ad63cf
      Junio C Hamano 提交于
      The Porcelainish has become so much usable as the UI that there
      is not much reason people should be using the core programs by
      hand anymore.  At this point we are better off making the
      behaviour of the core programs predictable by keeping them
      unaffected by the configuration variables.  Otherwise they will
      become very hard to use as reliable building blocks.
      
      For example, "git-commit -a" internally uses git-diff-files to
      figure out the set of paths that need to be updated in the
      index, and we should never allow diff.renames that happens to be
      in the configuration to interfere (or slow down the process).
      
      The UI level configuration such as showing renamed diff and
      coloring are still honored by the Porcelainish ("git log" family
      and "git diff"), but not by the core anymore.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      83ad63cf
  19. 07 7月, 2006 1 次提交
  20. 29 6月, 2006 1 次提交
  21. 28 6月, 2006 2 次提交
  22. 27 6月, 2006 6 次提交
  23. 25 6月, 2006 1 次提交
  24. 20 6月, 2006 1 次提交
    • L
      Add "named object array" concept · 1f1e895f
      Linus Torvalds 提交于
      We've had this notion of a "object_list" for a long time, which eventually
      grew a "name" member because some users (notably git-rev-list) wanted to
      name each object as it is generated.
      
      That object_list is great for some things, but it isn't all that wonderful
      for others, and the "name" member is generally not used by everybody.
      
      This patch splits the users of the object_list array up into two: the
      traditional list users, who want the list-like format, and who don't
      actually use or want the name. And another class of users that really used
      the list as an extensible array, and generally wanted to name the objects.
      
      The patch is fairly straightforward, but it's also biggish. Most of it
      really just cleans things up: switching the revision parsing and listing
      over to the array makes things like the builtin-diff usage much simpler
      (we now see exactly how many members the array has, and we don't get the
      objects reversed from the order they were on the command line).
      
      One of the main reasons for doing this at all is that the malloc overhead
      of the simple object list was actually pretty high, and the array is just
      a lot denser. So this patch brings down memory usage by git-rev-list by
      just under 3% (on top of all the other memory use optimizations) on the
      mozilla archive.
      
      It does add more lines than it removes, and more importantly, it adds a
      whole new infrastructure for maintaining lists of objects, but on the
      other hand, the new dynamic array code is pretty obvious. The change to
      builtin-diff-tree.c shows a fairly good example of why an array interface
      is sometimes more natural, and just much simpler for everybody.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1f1e895f
  25. 18 6月, 2006 2 次提交
    • E
      Fix git-format-patch -s · 6c4cca1c
      Eric W. Biederman 提交于
      When git-format-patch was converted to a builtin an appropriate call
      to setup_ident was missed and thus git-format-patch -s fails because
      it doesn't look up anything in the password file.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6c4cca1c
    • L
      Some more memory leak avoidance · cb115748
      Linus Torvalds 提交于
      This is really the dregs of my effort to not waste memory in git-rev-list,
      and makes barely one percent of a difference in the memory footprint, but
      hey, it's also a pretty small patch.
      
      It discards the parent lists and the commit buffer after the commit has
      been shown by git-rev-list (and "git log" - which already did the commit
      buffer part), and frees the commit list entry that was used by the
      revision walker.
      
      The big win would be to get rid of the "refs" pointer in the object
      structure (another 5%), because it's only used by fsck. That would require
      some pretty major surgery to fsck, though, so I'm timid and did the less
      interesting but much easier part instead.
      
      This (percentually) makes a bigger difference to "git log" and friends,
      since those are walking _just_ commits, and thus the list entries tend to
      be a bigger percentage of the memory use. But the "list all objects" case
      does improve too.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cb115748
  26. 17 6月, 2006 2 次提交
    • L
      gitweb.cgi history not shown · 9202434c
      Linus Torvalds 提交于
      This does:
      
       - add a "rev.simplify_history" flag which defaults to on
       - it turns it off for "git whatchanged" (which thus now has real
         semantics outside of "git log")
       - it adds a command line flag ("--full-history") to turn it off for
         others (ie you can make "git log" and "gitk" etc get the semantics if
         you want to.
      
      Now, just as an example of _why_ you really really really want to simplify
      history by default, apply this patch, install it, and try these two
      command lines:
      
      	gitk --full-history -- git.c
      	gitk -- git.c
      
      and compare the output.
      
      So with this, you can also now do
      
      	git whatchanged -p -- gitweb.cgi
      	git log -p --full-history -- gitweb.cgi
      
      and it will show the old history of gitweb.cgi, even though it's not
      relevant to the _current_ state of the name "gitweb.cgi"
      
      NOTE NOTE NOTE! It will still actually simplify away merges that didn't
      change anything at all into either child. That creates these bogus strange
      discontinuities if you look at it with "gitk" (look at the --full-history
      gitk output for git.c, and you'll see a few strange cases).
      
      So the whole "--parent" thing ends up somewhat bogus with --full-history
      because of this, but I'm not sure it's worth even worrying about. I don't
      think you'd ever want to really use "--full-history" with the graphical
      representation, I just give it as an example exactly to show _why_ doing
      so would be insane.
      
      I think this is trivial enough and useful enough to be worth merging into
      the stable branch.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9202434c
    • P
      bfbd0bb6