1. 11 1月, 2010 1 次提交
    • J
      ident.c: check explicit identity for name and email separately · 91c38a21
      Junio C Hamano 提交于
      bb1ae3f6 (commit: Show committer if automatic, 2008-05-04) added a logic to
      check both name and email were given explicitly by the end user, but it
      assumed that fmt_ident() is never called before git_default_user_config()
      is called, which was fragile.  The former calls setup_ident() and fills
      the "default" name and email, so the check in the config parser would have
      mistakenly said both are given even if only user.name was provided.
      
      Make the logic more robust by keeping track of name and email separately.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      Acked-by: NSanti Béjar <santi@agolina.net>
      91c38a21
  2. 18 11月, 2009 1 次提交
  3. 20 10月, 2009 1 次提交
    • J
      Introduce commit notes · a97a7468
      Johannes Schindelin 提交于
      Commit notes are blobs which are shown together with the commit
      message.  These blobs are taken from the notes ref, which you can
      configure by the config variable core.notesRef, which in turn can
      be overridden by the environment variable GIT_NOTES_REF.
      
      The notes ref is a branch which contains "files" whose names are
      the names of the corresponding commits (i.e. the SHA-1).
      
      The rationale for putting this information into a ref is this: we
      want to be able to fetch and possibly union-merge the notes,
      maybe even look at the date when a note was introduced, and we
      want to store them efficiently together with the other objects.
      
      This patch has been improved by the following contributions:
      - Thomas Rast: fix core.notesRef documentation
      - Tor Arne Vestbø: fix printing of multi-line notes
      - Alex Riesen: Using char array instead of char pointer costs less BSS
      - Johan Herland: Plug leak when msg is good, but msglen or type causes return
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NTor Arne Vestbø <tavestbo@trolltech.com>
      Signed-off-by: NJohan Herland <johan@herland.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      
      get_commit_notes(): Plug memory leak when 'if' triggers, but not because of read_sha1_file() failure
      a97a7468
  4. 13 9月, 2009 1 次提交
    • J
      use write_str_in_full helper to avoid literal string lengths · 2b7ca830
      Jim Meyering 提交于
      In 2d14d65c (Use a clearer style to issue commands to remote helpers,
      2009-09-03) I happened to notice two changes like this:
      
      -	write_in_full(helper->in, "list\n", 5);
      +
      +	strbuf_addstr(&buf, "list\n");
      +	write_in_full(helper->in, buf.buf, buf.len);
      +	strbuf_reset(&buf);
      
      IMHO, it would be better to define a new function,
      
          static inline ssize_t write_str_in_full(int fd, const char *str)
          {
                 return write_in_full(fd, str, strlen(str));
          }
      
      and then use it like this:
      
      -       strbuf_addstr(&buf, "list\n");
      -       write_in_full(helper->in, buf.buf, buf.len);
      -       strbuf_reset(&buf);
      +       write_str_in_full(helper->in, "list\n");
      
      Thus not requiring the added allocation, and still avoiding
      the maintenance risk of literal string lengths.
      These days, compilers are good enough that strlen("literal")
      imposes no run-time cost.
      
      Transformed via this:
      
          perl -pi -e \
              's/write_in_full\((.*?), (".*?"), \d+\)/write_str_in_full($1, $2)/'\
            $(git grep -l 'write_in_full.*"')
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2b7ca830
  5. 12 9月, 2009 1 次提交
    • J
      push: make non-fast-forward help message configurable · 75194438
      Jeff King 提交于
      This message is designed to help new users understand what
      has happened when refs fail to push. However, it does not
      help experienced users at all, and significantly clutters
      the output, frequently dwarfing the regular status table and
      making it harder to see.
      
      This patch introduces a general configuration mechanism for
      optional messages, with this push message as the first
      example.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      75194438
  6. 24 8月, 2009 1 次提交
  7. 31 7月, 2009 1 次提交
  8. 25 7月, 2009 2 次提交
  9. 06 5月, 2009 1 次提交
  10. 02 5月, 2009 1 次提交
  11. 30 4月, 2009 2 次提交
  12. 26 4月, 2009 1 次提交
  13. 18 4月, 2009 1 次提交
    • T
      Fix buffer overflow in config parser · e0b3cc0d
      Thomas Jarosch 提交于
      When interpreting a config value, the config parser reads in 1+ space
      character(s) and puts -one- space character in the buffer as soon as
      the first non-space character is encountered (if not inside quotes).
      
      Unfortunately the buffer size check lacks the extra space character
      which gets inserted at the next non-space character, resulting in
      a crash with a specially crafted config entry.
      
      The unit test now uses Java to compile a platform independent
      .NET framework to output the test string in C# :o)
      
          Read: Thanks to Johannes Sixt for the correct printf call
          which replaces the perl invocation.
      Signed-off-by: NThomas Jarosch <thomas.jarosch@intra2net.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e0b3cc0d
  14. 12 4月, 2009 1 次提交
  15. 18 3月, 2009 1 次提交
    • F
      New config push.default to decide default behavior for push · 52153747
      Finn Arne Gangstad 提交于
      When "git push" is not told what refspecs to push, it pushes all matching
      branches to the current remote.  For some workflows this default is not
      useful, and surprises new users.  Some have even found that this default
      behaviour is too easy to trigger by accident with unwanted consequences.
      
      Introduce a new configuration variable "push.default" that decides what
      action git push should take if no refspecs are given or implied by the
      command line arguments or the current remote configuration.
      
      Possible values are:
      
        'nothing'  : Push nothing;
        'matching' : Current default behaviour, push all branches that already
                     exist in the current remote;
        'tracking' : Push the current branch to whatever it is tracking;
        'current'  : Push the current branch to a branch of the same name,
                     i.e. HEAD.
      Signed-off-by: NFinn Arne Gangstad <finnag@pvv.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      52153747
  16. 22 2月, 2009 1 次提交
  17. 11 2月, 2009 1 次提交
  18. 09 2月, 2009 1 次提交
  19. 21 12月, 2008 1 次提交
    • J
      Introduce commit notes · 879ef248
      Johannes Schindelin 提交于
      Commit notes are blobs which are shown together with the commit
      message.  These blobs are taken from the notes ref, which you can
      configure by the config variable core.notesRef, which in turn can
      be overridden by the environment variable GIT_NOTES_REF.
      
      The notes ref is a branch which contains "files" whose names are
      the names of the corresponding commits (i.e. the SHA-1).
      
      The rationale for putting this information into a ref is this: we
      want to be able to fetch and possibly union-merge the notes,
      maybe even look at the date when a note was introduced, and we
      want to store them efficiently together with the other objects.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      879ef248
  20. 15 12月, 2008 1 次提交
  21. 15 11月, 2008 1 次提交
    • L
      Add cache preload facility · 671c9b7e
      Linus Torvalds 提交于
      This can do the lstat() storm in parallel, giving potentially much
      improved performance for cold-cache cases or things like NFS that have
      weak metadata caching.
      
      Just use "read_cache_preload()" instead of "read_cache()" to force an
      optimistic preload of the index stat data.  The function takes a
      pathspec as its argument, allowing us to preload only the relevant
      portion of the index.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      671c9b7e
  22. 31 10月, 2008 1 次提交
  23. 13 10月, 2008 1 次提交
  24. 03 10月, 2008 2 次提交
  25. 29 7月, 2008 1 次提交
    • A
      Make use of stat.ctime configurable · 1ce4790b
      Alex Riesen 提交于
      A new configuration variable 'core.trustctime' is introduced to
      allow ignoring st_ctime information when checking if paths
      in the working tree has changed, because there are situations where
      it produces too much false positives.  Like when file system crawlers
      keep changing it when scanning and using the ctime for marking scanned
      files.
      
      The default is to notice ctime changes.
      Signed-off-by: NAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1ce4790b
  26. 14 7月, 2008 1 次提交
    • S
      Move code interpreting path relative to exec-dir to new function system_path() · 2de9de5e
      Steffen Prohaska 提交于
      Expanding system paths relative to git_exec_path can be used for
      creating an installation that can be moved to a different directory
      without re-compiling.  We use this approach for template_dir and the
      system wide gitconfig.  The Windows installer (msysgit) is an example
      for such a setup.
      
      This commit moves common code to a new function system_path().  System
      paths that are to be interpreted relative to git_exec_path are passed to
      system_path() and the return value is used instead of the original path.
      system_path() prefixes a relative path with git_exec_path and leaves
      absolute paths unmodified.  For example, we now write
      
          template_dir = system_path(DEFAULT_GIT_TEMPLATE_DIR);
      
      [j6t: moved from path.c to exec_cmd.c]
      Signed-off-by: NSteffen Prohaska <prohaska@zib.de>
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2de9de5e
  27. 01 7月, 2008 1 次提交
    • D
      Only use GIT_CONFIG in "git config", not other programs · dc871831
      Daniel Barkalow 提交于
      For everything other than using "git config" to read or write a
      git-style config file that isn't the current repo's config file,
      GIT_CONFIG was actively detrimental. Rather than argue over which
      programs are important enough to have work anyway, just fix all of
      them at the root.
      
      Also removes GIT_LOCAL_CONFIG, which would only be useful for programs
      that do want to use global git-specific config, but not the repo's own
      git-specific config, and want to use some other, presumably
      git-specific config. Despite being documented, I can't find any sign that
      it was ever used.
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dc871831
  28. 20 6月, 2008 1 次提交
  29. 19 6月, 2008 4 次提交
  30. 15 5月, 2008 1 次提交
  31. 13 5月, 2008 2 次提交
  32. 12 5月, 2008 1 次提交
  33. 07 5月, 2008 1 次提交