1. 06 12月, 2011 23 次提交
  2. 03 12月, 2011 1 次提交
  3. 02 12月, 2011 1 次提交
  4. 29 11月, 2011 2 次提交
  5. 24 11月, 2011 5 次提交
  6. 23 11月, 2011 8 次提交
    • J
      017d1e13
    • J
      Merge branch 'jn/revert-quit' · 9fd389b6
      Junio C Hamano 提交于
      * jn/revert-quit:
        revert: remove --reset compatibility option
        revert: introduce --abort to cancel a failed cherry-pick
        revert: write REVERT_HEAD pseudoref during conflicted revert
        revert: improve error message for cherry-pick during cherry-pick
        revert: rearrange pick_revisions() for clarity
        revert: rename --reset option to --quit
      9fd389b6
    • J
      revert: remove --reset compatibility option · c427b211
      Jonathan Nieder 提交于
      Remove the "git cherry-pick --reset" option, which has a different
      preferred spelling nowadays ("--quit").  Luckily the old --reset name
      was not around long enough for anyone to get used to it.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c427b211
    • J
      revert: introduce --abort to cancel a failed cherry-pick · 539047c1
      Jonathan Nieder 提交于
      After running some ill-advised command like "git cherry-pick
      HEAD..linux-next", the bewildered novice may want to return to more
      familiar territory.  Introduce a "git cherry-pick --abort" command
      that rolls back the entire cherry-pick sequence and places the
      repository back on solid ground.
      
      Just like "git merge --abort", this internally uses "git reset
      --merge", so local changes not involved in the conflict resolution are
      preserved.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      539047c1
    • J
      revert: write REVERT_HEAD pseudoref during conflicted revert · 82433cdf
      Jonathan Nieder 提交于
      When conflicts are encountered while reverting a commit, it can be
      handy to have the name of that commit easily available.  For example,
      to produce a copy of the patch to refer to while resolving conflicts:
      
      	$ git revert 2eceb2a8
      	error: could not revert 2eceb2a8... awesome, buggy feature
      	$ git show -R REVERT_HEAD >the-patch
      	$ edit $(git diff --name-only)
      
      Set a REVERT_HEAD pseudoref when "git revert" does not make a commit,
      for cases like this.  This also makes it possible for scripts to
      distinguish between a revert that encountered conflicts and other
      sources of an unmerged index.
      
      After successfully committing, resetting with "git reset", or moving
      to another commit with "git checkout" or "git reset", the pseudoref is
      no longer useful, so remove it.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      82433cdf
    • J
      revert: improve error message for cherry-pick during cherry-pick · b8c74690
      Jonathan Nieder 提交于
      In the spirit of v1.6.3.3~3^2 (refuse to merge during a merge,
      2009-07-01), "git cherry-pick" refuses to start a new cherry-pick when
      in the middle of an existing conflicted cherry-pick in the following
      sequence:
      
       1. git cherry-pick HEAD..origin
       2. resolve conflicts
       3. git cherry-pick HEAD..origin (instead of "git cherry-pick
          --continue", by mistake)
      
      Good.  However, the error message on attempting step 3 is more
      convoluted than necessary:
      
        $ git cherry-pick HEAD..origin
        error: .git/sequencer already exists.
        error: A cherry-pick or revert is in progress.
        hint: Use --continue to continue the operation
        hint: or --quit to forget about it
        fatal: cherry-pick failed
      
      Clarify by removing the redundant first "error:" message, simplifying
      the advice, and using lower-case and no full stops to be consistent
      with other commands that prefix their messages with "error:", so it
      becomes
      
        error: a cherry-pick or revert is already in progress
        hint: try "git cherry-pick (--continue | --quit)"
        fatal: cherry-pick failed
      
      The "fatal: cherry-pick failed" line seems unnecessary, too, but
      that can be fixed some other day.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b8c74690
    • J
      revert: rearrange pick_revisions() for clarity · dffc8600
      Jonathan Nieder 提交于
      Deal completely with "cherry-pick --quit" and --continue at the
      beginning of pick_revisions(), leaving the rest of the function for
      the more interesting "git cherry-pick <commits>" case.
      
      No functional change intended.  The impact is just to unindent the
      code a little.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dffc8600
    • J
      revert: rename --reset option to --quit · f80a8726
      Jonathan Nieder 提交于
      The option to "git cherry-pick" and "git revert" to discard the
      sequencer state introduced by v1.7.8-rc0~141^2~6 (revert: Introduce
      --reset to remove sequencer state, 2011-08-04) has a confusing name.
      Change it now, while we still have the time.
      
      The new name for "cherry-pick, please get out of my way, since I've
      long forgotten about the sequence of commits I was cherry-picking when
      you wrote that old .git/sequencer directory" is --quit.  Mnemonic:
      this is analagous to quiting a program the user is no longer using ---
      we just want to get out of the multiple-command cherry-pick procedure
      and not to reset HEAD or rewind any other old state.
      
      The "--reset" option is kept as a synonym to minimize the impact.  We
      might consider dropping it for simplicity in a separate patch, though.
      
      Adjust documentation and tests to use the newly preferred name (--quit)
      instead of --reset.  While at it, let's clarify the short descriptions
      of these operations in "-h" output.
      
      Before:
      
      	--reset		forget the current operation
      	--continue	continue the current operation
      
      After:
      
      	--quit		end revert or cherry-pick sequence
      	--continue	resume revert or cherry-pick sequence
      Noticed-by: NPhil Hord <phil.hord@gmail.com>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f80a8726