1. 04 8月, 2008 4 次提交
  2. 03 8月, 2008 10 次提交
  3. 02 8月, 2008 14 次提交
  4. 01 8月, 2008 3 次提交
    • P
      Allow "non-option" revision options in parse_option-enabled commands · 0fe8c138
      Pierre Habouzit 提交于
      Commands which use parse_options() but also call setup_revisions()
      must do their parsing in a two step process:
      
        1. first, they parse all options. Anything unknown goes to
           parse_revision_opt() (which calls handle_revision_opt), which
           may claim the option or say "I don't recognize this"
      
        2. the non-option remainder goes to setup_revisions() to
           actually get turned into revisions
      
      Some revision options are "non-options" in that they must be
      parsed in order with their revision counterparts in
      setup_revisions().  For example, "--all" functions as a
      pseudo-option expanding to all refs, and "--no-walk" affects refs
      after it on the command line, but not before. The revision option
      parser in step 1 recognizes such options and sets them aside for
      later parsing by setup_revisions().
      
      However, the return value used from handle_revision_opt indicated
      "I didn't recognize this", which was wrong. It did, and it took
      appropriate action (even though that action was just deferring it
      for later parsing). Thus it should return "yes, I recognized
      this."
      
      Previously, these pseudo-options generated an error when used with
      parse_options parsers (currently just blame and shortlog). With
      this patch, they should work fine, enabling things like "git
      shortlog --all".
      Signed-off-by: NJeff King <peff@peff.net>
      Acked-By: NPierre Habouzit <madcoder@debian.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0fe8c138
    • J
      Teach --find-copies-harder to "git blame" · b3123f98
      Junio C Hamano 提交于
      It's equivalent to "-C -C" with the diff family.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b3123f98
    • J
      Compact commit template message · fdc7c811
      Jeff King 提交于
      We recently let the user know explicitly that an empty
      commit message will abort the commit. However, this adds yet
      another line to the template; let's rephrase and re-wrap so
      that this fits back on two lines.
      
      This patch also makes the "fatal: empty commit message?"
      warning a bit less scary, since this is now a "feature"
      instead of an error. However, we retain the non-zero exit
      status to indicate to callers that nothing was committed.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fdc7c811
  5. 31 7月, 2008 4 次提交
  6. 30 7月, 2008 5 次提交
    • J
      Fix merge name generation in "merge in C" · 9b6bf4d5
      Junio C Hamano 提交于
      When merging an early part of a branch, e.g. "git merge xyzzy~20", we were
      supposed to say "branch 'xyzzy' (early part)", but it incorrectly said
      "branch 'refs/heads/xy' (early part)" instead.
      
      The logic was supposed to first strip away "~20" part to make sure that
      what follows "~" is a non-zero posint, prefix it with "refs/heads/" and
      ask resolve_ref() if it is a ref.  If it is, then we know xyzzy was a
      branch, and we can give the correct message.
      
      However, there were a few bugs.  First of all, the logic to build this
      "true branch refname" did not count the characters correctly.  At this
      point of the code, "len" is the number of trailing, non-name part of the
      given extended SHA-1 expression given by the user, i.e. number of bytes in
      "~20" in the above example.
      
      In addition, the message forgot to skip "refs/heads/" it prefixed from the
      output.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9b6bf4d5
    • C
    • J
      Merge git://repo.or.cz/git-gui · 731ab1f5
      Junio C Hamano 提交于
      * git://repo.or.cz/git-gui:
        git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
        git-gui (Windows): Switch to relative discovery of oguilib
        git-gui: Correct installation of library to be $prefix/share
        git-gui: Fix gitk search in $PATH to work on Windows
        git-gui: Preserve scroll position on reshow_diff.
        git-gui: Fix the Remote menu separator.
      731ab1f5
    • J
      Teach gitlinks to ie_modified() and ce_modified_check_fs() · c70115b4
      Junio C Hamano 提交于
      The ie_modified() function is the workhorse for refresh_cache_entry(),
      i.e. checking if an index entry that is stat-dirty actually has changes.
      
      After running quicker check to compare cached stat information with
      results from the latest lstat(2) to answer "has modification" early, the
      code goes on to check if there really is a change by comparing the staged
      data with what is on the filesystem by asking ce_modified_check_fs().
      However, this function always said "no change" for any gitlinks that has a
      directory at the corresponding path.  This made ie_modified() to miss
      actual changes in the subproject.
      
      The patch fixes this first by modifying an existing short-circuit logic
      before calling the ce_modified_check_fs() function.  It knows that for any
      filesystem entity to which ie_match_stat() says its data has changed, if
      its cached size is nonzero then the contents cannot match, which is a
      correct optimization only for blob objects.  We teach gitlink objects to
      this special case, as we already know that any gitlink that
      ie_match_stat() says is modified is indeed modified at this point in the
      codepath.
      
      With the above change, we could leave ce_modified_check_fs() broken, but
      it also futureproofs the code by teaching it to use ce_compare_gitlink(),
      instead of assuming (incorrectly) that any directory is unchanged.
      
      Originally noticed by Alex Riesen on Cygwin.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c70115b4
    • A
      Advertise the ability to abort a commit · bd2574ca
      Anders Melchiorsen 提交于
      This treats aborting a commit more like a feature.
      Signed-off-by: NAnders Melchiorsen <mail@cup.kalibalik.dk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bd2574ca