1. 13 12月, 2007 1 次提交
    • J
      git-commit: squelch needless message during an empty merge · 37d07f8f
      Junio C Hamano 提交于
      When recording a merge that conflicted and ends up in no changes after
      manual resolution, commit callchain looked like this:
      
      	cmd_commit() ->
                  prepare_log_message() ->
                      run_status() ->
      		    wt_status_print()
      
      This invocation of run_status() is asked to find out if there is a
      committable change, but it unconditionally gave instructions such as
      "use git-add" at the same time.  When in merge, we do allow an empty
      change to be recorded, so after showing this message the code still went
      ahead and made a commit.
      
      This introduces "nowarn" parameter to run_status() to avoid these
      useless messages.  If we are not allowed to create an empty commit, we
      already call run_status() again in the original codepath, and the
      message will be shown from that call anyway.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      37d07f8f
  2. 11 12月, 2007 1 次提交
  3. 09 12月, 2007 3 次提交
    • J
      Re-fix "builtin-commit: fix --signoff" · 774751a8
      Junio C Hamano 提交于
      An earlier fix to the said commit was incomplete; it mixed up the
      meaning of the flag parameter passed to the internal fmt_ident()
      function, so this corrects it.
      
      git_author_info() and git_committer_info() can be told to issue a
      warning when no usable user information is found, and optionally can be
      told to error out.  Operations that actually use the information to
      record a new commit or a tag will still error out, but the caller to
      leave reflog record will just silently use bogus user information.
      
      Not warning on misconfigured user information while writing a reflog
      entry is somewhat debatable, but it is probably nicer to the users to
      silently let it pass, because the only information you are losing is who
      checked out the branch.
      
       * git_author_info() and git_committer_info() used to take 1 (positive
         int) to error out with a warning on misconfiguration; this is now
         signalled with a symbolic constant IDENT_ERROR_ON_NO_NAME.
      
       * These functions used to take -1 (negative int) to warn but continue;
         this is now signalled with a symbolic constant IDENT_WARN_ON_NO_NAME.
      
       * fmt_ident() function implements the above error reporting behaviour
         common to git_author_info() and git_committer_info().  A symbolic
         constant IDENT_NO_DATE can be or'ed in to the flag parameter to make
         it return only the "Name <email@address.xz>".
      
       * fmt_name() is a thin wrapper around fmt_ident() that always passes
         IDENT_ERROR_ON_NO_NAME and IDENT_NO_DATE.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      774751a8
    • J
      Fix commit-msg hook to allow editing · 740001a5
      Junio C Hamano 提交于
      The old git-commit.sh script allowed the commit-msg hook to not only
      prevent a commit from proceding, but also to edit the commit message
      on the fly and allow it to proceed. So here we teach builtin-commit
      to do the same.
      
      This is based on Wincent's patch, but redone with a clarified logic.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      740001a5
    • W
      Allow --no-verify to bypass commit-msg hook · 6b95655d
      Wincent Colaiuta 提交于
      At the moment the --no-verify switch to "git commit" instructs it to
      skip over the pre-commit hook. Here we teach "git commit --no-verify"
      to skip over the commit-msg hook as well. This brings the behaviour
      of builtin-commit back in line with git-commit.sh.
      Signed-off-by: NWincent Colaiuta <win@wincent.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6b95655d
  4. 08 12月, 2007 1 次提交
  5. 03 12月, 2007 4 次提交
  6. 02 12月, 2007 1 次提交
  7. 29 11月, 2007 1 次提交
  8. 27 11月, 2007 2 次提交
  9. 26 11月, 2007 1 次提交
    • J
      add -i: Fix running from a subdirectory · 3f061887
      Junio C Hamano 提交于
      This fixes the pathspec interactive_add() passes to the underlying
      git-add--interactive helper.  When the command was run from a
      subdirectory, cmd_add() already has gone up to the toplevel of the work
      tree, and the helper will be spawned from there.  The pathspec given on
      the command line from the user needs to be adjusted for this.
      
      This adds "validate_pathspec()" function in the callchain, but it does
      not validate yet.  The function can be changed to barf if there are
      unmatching pathspec given by the user, but that is not strictly
      necessary.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3f061887
  10. 23 11月, 2007 14 次提交