1. 14 12月, 2011 2 次提交
    • J
      http-push: enable "proactive auth" · a4ddbc33
      Jeff King 提交于
      Before commit 986bbc08, git was proactive about asking for
      http passwords. It assumed that if you had a username in
      your URL, you would also want a password, and asked for it
      before making any http requests.
      
      However, this could interfere with the use of .netrc (see
      986bbc08 for details). And it was also unnecessary, since
      the http fetching code had learned to recognize an HTTP 401
      and prompt the user then. Furthermore, the proactive prompt
      could interfere with the usage of .netrc (see 986bbc08 for
      details).
      
      Unfortunately, the http push-over-DAV code never learned to
      recognize HTTP 401, and so was broken by this change. This
      patch does a quick fix of re-enabling the "proactive auth"
      strategy only for http-push, leaving the dumb http fetch and
      smart-http as-is.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a4ddbc33
    • J
      t5540: test DAV push with authentication · 0521710a
      Jeff King 提交于
      We don't currently test this case at all, and instead just
      test the DAV mechanism over an unauthenticated push. That
      isn't very realistic, as most people will want to
      authenticate pushes.
      
      Two of the tests expect_failure as they reveal bugs:
      
        1. Pushing without a username in the URL fails to ask for
           credentials when we get an HTTP 401. This has always
           been the case, but it would be nice if it worked like
           smart-http.
      
        2. Pushing with a username fails to ask for the password
           since 986bbc08 (http: don't always prompt for password,
           2011-11-04). This is a severe regression in v1.7.8, as
           authenticated push-over-DAV is now totally unusable
           unless you have credentials in your .netrc.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0521710a
  2. 10 12月, 2011 3 次提交
  3. 09 12月, 2011 1 次提交
  4. 06 12月, 2011 6 次提交
  5. 03 12月, 2011 1 次提交
  6. 29 11月, 2011 1 次提交
  7. 24 11月, 2011 5 次提交
  8. 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
  9. 22 11月, 2011 4 次提交
  10. 21 11月, 2011 2 次提交
    • R
      config.c: Fix a static buffer overwrite bug by avoiding mkpath() · 05bab3ea
      Ramsay Jones 提交于
      On cygwin, test number 21 of t3200-branch.sh (git branch -m q q2
      without config should succeed) fails. The failure involves the
      functions from path.c which parcel out internal static buffers
      from the git_path() and mkpath() functions.
      
      In particular, the rename_ref() function calls safe_create_leading\
      _directories() with a filename returned by git_path("logs/%s", ref).
      safe_create_leading_directories(), in turn, calls stat() on each
      element of the path it is given. On cygwin, this leads to a call
      to git_config() for each component of the path, since this test
      explicitly removes the config file. git_config() calls mkpath(), so
      on the fourth component of the path, the original buffer passed
      into the function is overwritten with the config filename.
      
      Note that this bug is specific to cygwin and it's schizophrenic
      stat() functions (see commits adbc0b6b, 7faee6b8 and 79748439). The
      lack of a config file and a path with at least four elements is
      also important to trigger the bug.
      
      In order to fix the problem, we replace the call to mkpath() with
      a call to mksnpath() and provide our own buffer.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      05bab3ea
    • R
      t5501-*.sh: Fix url passed to clone in setup test · 3a81f33c
      Ramsay Jones 提交于
      In particular, the url passed to git-clone has an extra '/' given
      after the 'file://' schema prefix, thus:
      
          git clone --reference=original "file:///$(pwd)/original one
      
      Once the prefix is removed, the remainder of the url looks something
      like "//home/ramsay/git/t/...", which is then interpreted as an
      network path. This then results in a "Permission denied" error, like
      so:
      
          ramsay $ ls //home
          ls: cannot access //home: No such host or network path
          ramsay $ ls //home/ramsay
          ls: cannot access //home/ramsay: Permission denied
          ramsay $
      
      In order to fix the problem, we simply remove the extraneous '/'
      character from the url.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3a81f33c
  11. 19 11月, 2011 7 次提交