1. 13 4月, 2007 1 次提交
  2. 12 4月, 2007 2 次提交
  3. 20 3月, 2007 1 次提交
  4. 05 3月, 2007 1 次提交
  5. 27 2月, 2007 1 次提交
    • N
      convert object type handling from a string to a number · 21666f1a
      Nicolas Pitre 提交于
      We currently have two parallel notation for dealing with object types
      in the code: a string and a numerical value.  One of them is obviously
      redundent, and the most used one requires more stack space and a bunch
      of strcmp() all over the place.
      
      This is an initial step for the removal of the version using a char array
      found in object reading code paths.  The patch is unfortunately large but
      there is no sane way to split it in smaller parts without breaking the
      system.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      21666f1a
  6. 24 2月, 2007 1 次提交
  7. 21 2月, 2007 1 次提交
    • J
      Mechanical conversion to use prefixcmp() · cc44c765
      Junio C Hamano 提交于
      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: NJunio C Hamano <junkio@cox.net>
      cc44c765
  8. 09 2月, 2007 1 次提交
  9. 28 1月, 2007 1 次提交
    • J
      Don't force everybody to call setup_ident(). · 01754769
      Junio C Hamano 提交于
      Back when only handful commands that created commit and tag were
      the only users of committer identity information, it made sense
      to explicitly call setup_ident() to pre-fill the default value
      from the gecos information.  But it is much simpler for programs
      to make the call automatic when get_ident() is called these days,
      since many more programs want to use the information when updating
      the reflog.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      01754769
  10. 26 1月, 2007 1 次提交
    • J
      Allow non-developer to clone, checkout and fetch more easily. · cb280e10
      Junio C Hamano 提交于
      The code that uses committer_info() in reflog can barf and die
      whenever it is asked to update a ref.  And I do not think
      calling ignore_missing_committer_name() upfront like recent
      receive-pack did in the aplication is a reasonable workaround.
      
      What the patch does.
      
       - git_committer_info() takes one parameter.  It used to be "if
         this is true, then die() if the name is not available due to
         bad GECOS, otherwise issue a warning once but leave the name
         empty".  The reason was because we wanted to prevent bad
         commits from being made by git-commit-tree (and its
         callers).  The value 0 is only used by "git var -l".
      
         Now it takes -1, 0 or 1.  When set to -1, it does not
         complain but uses the pw->pw_name when name is not
         available.  Existing 0 and 1 values mean the same thing as
         they used to mean before.  0 means issue warnings and leave
         it empty, 1 means barf and die.
      
       - ignore_missing_committer_name() and its existing caller
         (receive-pack, to set the reflog) have been removed.
      
       - git-format-patch, to come up with the phoney message ID when
         asked to thread, now passes -1 to git_committer_info().  This
         codepath uses only the e-mail part, ignoring the name.  It
         used to barf and die.  The other call in the same program
         when asked to add signed-off-by line based on committer
         identity still passes 1 to make sure it barfs instead of
         adding a bogus s-o-b line.
      
       - log_ref_write in refs.c, to come up with the name to record
         who initiated the ref update in the reflog, passes -1.  It
         used to barf and die.
      
      The last change means that git-update-ref, git-branch, and
      commit walker backends can now be used in a repository with
      reflog by somebody who does not have the user identity required
      to make a commit.  They all used to barf and die.
      
      I've run tests and all of them seem to pass, and also tried "git
      clone" as a user whose GECOS is empty -- git clone works again
      now (it was broken when reflog was enabled by default).
      
      But this definitely needs extra sets of eyeballs.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cb280e10
  11. 23 1月, 2007 1 次提交
  12. 21 1月, 2007 1 次提交
  13. 18 1月, 2007 6 次提交
  14. 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
  15. 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
  16. 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
  17. 14 12月, 2006 1 次提交
  18. 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
  19. 24 11月, 2006 1 次提交
  20. 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
  21. 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
  22. 29 9月, 2006 2 次提交
  23. 27 8月, 2006 1 次提交
  24. 05 8月, 2006 1 次提交
  25. 01 8月, 2006 1 次提交
  26. 29 7月, 2006 2 次提交
  27. 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
  28. 15 7月, 2006 4 次提交
  29. 09 7月, 2006 1 次提交