1. 02 1月, 2008 1 次提交
    • J
      config: handle lack of newline at end of file better · 02e5ba4a
      Jeff King 提交于
      The config parsing routines use the static global
      'config_file' to store the FILE* pointing to the current
      config file being parsed. The function get_next_char()
      automatically converts an EOF on this file to a newline for
      the convenience of its callers, and it sets config_file to
      NULL to indicate that EOF was reached.
      
      This throws away useful information, though, since some
      routines want to call ftell on 'config_file' to find out
      exactly _where_ the routine ended. In the case of a key
      ending at EOF boundary, we ended up segfaulting in some
      cases (changing that key or adding another key in its
      section), or failing to provide the necessary newline
      (adding a new section).
      
      This patch adds a new flag to indicate EOF and uses that
      instead of setting config_file to NULL. It also makes sure
      to add newlines where necessary for truncated input. All
      three included tests fail without the patch.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      02e5ba4a
  2. 01 1月, 2008 3 次提交
  3. 31 12月, 2007 3 次提交
  4. 29 12月, 2007 2 次提交
    • J
      "git pull --tags": error out with a better message. · 441ed413
      Junio C Hamano 提交于
      When "git pull --tags" is run without any other arguments, the
      standard error message "You told me to fetch and merge stuff but
      there is nothing to merge!  You might want to fix your config"
      is given.
      
      While the error may be technically correct, fixing the config
      would not help, as "git pull --tags" itself tells "git fetch"
      not to use the configured refspecs.
      
      This commit makes "git pull --tags" to issue a different error
      message to avoid confusion.  This is merely an interim solution.
      
      In the longer term, it would be a better approach to change the
      semantics of --tags option to make "git fetch" and "git pull"
      to:
      
       (1) behave as if no --tags was given (so an explicit refspec on
           the command line overrides configured ones, or no explicit
           refspecs on the command line takes configured ones); but
      
       (2) no auto-following of tags is made even when using
           configured refspecs; and
      
       (3) fetch all tags as not-for-merge entries".
      
      Then we would not need to have this separate error message, as
      the ordinary merge will happen even with the --tags option.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      441ed413
    • M
      git-sh-setup: document git_editor() and get_author_ident_from_commit() · 3f4bc3e0
      Miklos Vajna 提交于
      These 2 functions were missing from the manpage.
      Signed-off-by: NMiklos Vajna <vmiklos@frugalware.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3f4bc3e0
  5. 28 12月, 2007 1 次提交
  6. 27 12月, 2007 10 次提交
  7. 24 12月, 2007 2 次提交
  8. 23 12月, 2007 10 次提交
  9. 22 12月, 2007 4 次提交
  10. 21 12月, 2007 4 次提交