1. 01 1月, 2010 1 次提交
    • B
      Fix "git remote update" with remotes.defalt set · 4f2e842d
      Björn Gustavsson 提交于
      Starting from commit 8db35596, "git remote update" (with no
      group name given) will fail with the following message if
      remotes.default has been set in the config file:
      
      fatal: 'default' does not appear to be a git repository
      fatal: The remote end hung up unexpectedly
      
      The problem is that the --multiple option is not passed to
      "git fetch" if no remote or group name is given on the command
      line. Fix the problem by always passing the --multiple
      option to "git fetch" (which actually simplifies the code).
      
      Reported-by: YONETANI Tomokazu
      Signed-off-by: NBjörn Gustavsson <bgustavsson@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4f2e842d
  2. 10 11月, 2009 1 次提交
  3. 25 10月, 2009 1 次提交
  4. 14 6月, 2009 1 次提交
    • M
      builtin-remote: Show push urls as well · 857f8c30
      Michael J Gruber 提交于
      Teach builtin remote to show push urls also when asked to
      "show" a specific remote.
      
      This improves upon the standard display mode: multiple specified "url"s
      mean that the first one is for fetching, all are used for pushing. We
      make this clearer now by displaying the first one prefixed with "Fetch
      URL", and all "url"s (or, if present, all "pushurl"s) prefixed with
      "Push  URL".
      
      Example with "one" having one url, "two" two urls, "three" one url and
      one pushurl (URL part only):
      
      * remote one
        Fetch URL: hostone.com:/somepath/repoone.git
        Push  URL: hostone.com:/somepath/repoone.git
      * remote two
        Fetch URL: hosttwo.com:/somepath/repotwo.git
        Push  URL: hosttwo.com:/somepath/repotwo.git
        Push  URL: hosttwobackup.com:/somewheresafe/repotwo.git
      * remote three
        Fetch URL: http://hostthree.com/otherpath/repothree.git
        Push  URL: hostthree.com:/pathforpushes/repothree.git
      
      Also, adjust t5505 accordingly and make it test for the new output.
      Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      857f8c30
  5. 28 5月, 2009 1 次提交
  6. 28 2月, 2009 5 次提交
    • J
      builtin-remote: new show output style for push refspecs · e5dcbfd9
      Jay Soffian 提交于
      The existing output of "git remote show <remote>" with respect to push
      ref specs is basically just to show the raw refspec. This patch teaches
      the command to interpret the refspecs and show how each branch will be
      pushed to the destination. The output gives the user an idea of what
      "git push" should do if it is run w/o any arguments.
      
      Example new output:
      
      1a. Typical output with no push refspec (i.e. matching branches only)
      
      $ git remote show origin
      * remote origin
        [...]
        Local refs configured for 'git push':
          master pushes to master (up to date)
          next   pushes to next   (local out of date)
      
      1b. Same as above, w/o querying the remote:
      
      $ git remote show origin -n
      * remote origin
        [...]
        Local ref configured for 'git push' (status not queried):
          (matching) pushes to (matching)
      
      2a. With a forcing refspec (+), and a new topic
          (something like push = refs/heads/*:refs/heads/*):
      
      $ git remote show origin
      * remote origin
        [...]
        Local refs configured for 'git push':
          master     pushes to master    (fast forwardable)
          new-topic  pushes to new-topic (create)
          next       pushes to next      (local out of date)
          pu         forces to pu        (up to date)
      
      2b. Same as above, w/o querying the remote
      
      $ git remote show origin -n
      * remote origin
        [...]
        Local refs configured for 'git push' (status not queried):
          master     pushes to master
          new-topic  pushes to new-topic
          next       pushes to next
          pu         forces to pu
      
      3. With a remote configured as a mirror:
      
      * remote backup
        [...]
        Local refs will be mirrored by 'git push'
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e5dcbfd9
    • J
      builtin-remote: new show output style · 7ecbbf87
      Jay Soffian 提交于
      The existing output of "git remote show <remote>" is too verbose for the
      information it provides. This patch teaches it to provide more
      information in less space.
      
      The output for push refspecs is addressed in the next patch.
      
      Before the patch:
      
      $ git remote show origin
      * remote origin
        URL: git://git.kernel.org/pub/scm/git/git.git
        HEAD branch: master
        Remote branch merged with 'git pull' while on branch master
          master
        Remote branch merged with 'git pull' while on branch next
          next
        Remote branches merged with 'git pull' while on branch octopus
          foo bar baz frotz
        New remote branch (next fetch will store in remotes/origin)
          html
        Stale tracking branch (use 'git remote prune')
          bogus
        Tracked remote branches
          maint
          man
          master
          next
          pu
          todo
      
      After this patch:
      
      $ git remote show origin
      * remote origin
        URL: git://git.kernel.org/pub/scm/git/git.git
        HEAD branch: master
        Remote branches:
          bogus  stale (use 'git remote prune' to remove)
          html   new (next fetch will store in remotes/origin)
          maint  tracked
          man    tracked
          master tracked
          next   tracked
          pu     tracked
          todo   tracked
        Local branches configured for 'git pull':
          master  rebases onto remote master
          next    rebases onto remote next
          octopus  merges with remote foo
                      and with remote bar
                      and with remote baz
                      and with remote frotz
      
      $ git remote show origin -n
      * remote origin
        URL: git://git.kernel.org/pub/scm/git/git.git
        HEAD branch: (not queried)
        Remote branches: (status not queried)
          bogus
          maint
          man
          master
          next
          pu
          todo
        Local branches configured for 'git pull':
          master  rebases onto remote master
          next    rebases onto remote next
          octopus  merges with remote foo
                      and with remote bar
                      and with remote baz
                      and with remote frotz
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ecbbf87
    • J
      builtin-remote: add set-head subcommand · bc14fac8
      Jay Soffian 提交于
      Provide a porcelain command for setting and deleting
      $GIT_DIR/remotes/<remote>/HEAD.
      
      While we're at it, document what $GIT_DIR/remotes/<remote>/HEAD is all
      about.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bc14fac8
    • J
      builtin-remote: teach show to display remote HEAD · e61e0cc6
      Jay Soffian 提交于
      This is in preparation for teaching remote how to set
      refs/remotes/<remote>/HEAD to match what HEAD is set to at <remote>, but
      is useful in its own right.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e61e0cc6
    • J
      builtin-remote: fix two inconsistencies in the output of "show <remote>" · 3bd92563
      Jay Soffian 提交于
      Remote and stale branches are emitted in alphabetical order, but new and
      tracked branches are not. So sort the latter to be consistent with the
      former. This also lets us use more efficient string_list_has_string()
      instead of unsorted_string_list_has_string().
      
      "show <remote>" prunes symrefs, but "show <remote> -n" does not. Fix the
      latter to match the former.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3bd92563
  7. 11 2月, 2009 2 次提交
  8. 05 2月, 2009 1 次提交
    • J
      builtin-remote: make rm operation safer in mirrored repository · 441adf0c
      Jay Soffian 提交于
      "git remote rm <repo>" happily removes non-remote refs and their reflogs.
      This may be okay if the repository truely is a mirror, but if the user
      had done "git remote add --mirror <repo>" by accident and was just
      undoing their mistake, then they are left in a situation that is
      difficult to recover from.
      
      After this commit, "git remote rm" skips over non-remote refs. The user
      is advised on how remove branches using "git branch -d", which itself
      has nice safety checks wrt to branch removal lacking from "git remote rm".
      Non-remote non-branch refs are skipped silently.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Acked-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      441adf0c
  9. 12 11月, 2008 1 次提交
  10. 06 11月, 2008 1 次提交
  11. 23 10月, 2008 1 次提交
  12. 14 10月, 2008 1 次提交
    • J
      Fix fetch/pull when run without --update-head-ok · 8ee5d731
      Johannes Schindelin 提交于
      Some confusing tutorials suggested that it would be a good idea to fetch
      into the current branch with something like this:
      
      	git fetch origin master:master
      
      (or even worse: the same command line with "pull" instead of "fetch").
      While it might make sense to store what you want to pull, it typically is
      plain wrong when the current branch is "master".  This should only be
      allowed when (an incorrect) "git pull origin master:master" tries to work
      around by giving --update-head-ok to underlying "git fetch", and otherwise
      we should refuse it, but somewhere along the lines we lost that behavior.
      
      The check for the current branch is now _only_ performed in non-bare
      repositories, which is an improvement from the original behaviour.
      
      Some newer tests were depending on the broken behaviour of "git fetch"
      this patch fixes, and have been adjusted.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Acked-by: NShawn O. Pearce <spearce@spearce.org>
      Acked-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8ee5d731
  13. 02 9月, 2008 1 次提交
    • J
      Bring local clone's origin URL in line with that of a remote clone · 86521aca
      Johan Herland 提交于
      On a local clone, "git clone" would use the fully DWIMmed path as the origin
      URL in the resulting repo. This was slightly inconsistent with the case of a
      remote clone where the _given_ URL was used as the origin URL (because the
      DWIMming was done remotely, and was therefore not available to "git clone").
      
      This behaviour caused problems when cloning a local non-bare repo with
      relative submodule URLs, because these submodule URLs would then be resolved
      against the DWIMmed URL (e.g. "/repo/.git") instead of the given URL (e.g.
      "/repo").
      
      This patch teaches "git clone" to use the _given_ URL - instead of the
      DWIMmed path - as the origin URL. This causes relative submodule URLs to be
      resolved correctly, as long the _given_ URL indicates the correct directory
      against which the submodule URLs should be resolved.
      
      The patch also updates a testcase that contained the old-style origin URLs.
      Signed-off-by: NJohan Herland <johan@herland.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      86521aca
  14. 14 7月, 2008 1 次提交
  15. 11 6月, 2008 3 次提交
  16. 01 6月, 2008 1 次提交
  17. 24 5月, 2008 1 次提交
  18. 25 4月, 2008 1 次提交
  19. 19 4月, 2008 1 次提交
  20. 24 3月, 2008 1 次提交
  21. 20 3月, 2008 1 次提交
  22. 13 3月, 2008 1 次提交
    • J
      add test_cmp function for test scripts · 82ebb0b6
      Jeff King 提交于
      Many scripts compare actual and expected output using
      "diff -u". This is nicer than "cmp" because the output shows
      how the two differ. However, not all versions of diff
      understand -u, leading to unnecessary test failure.
      
      This adds a test_cmp function to the test scripts and
      switches all "diff -u" invocations to use it. The function
      uses the contents of "$GIT_TEST_CMP" to compare its
      arguments; the default is "diff -u".
      
      On systems with a less-capable diff, you can do:
      
        GIT_TEST_CMP=cmp make test
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      82ebb0b6
  23. 09 3月, 2008 1 次提交
  24. 06 3月, 2008 1 次提交
  25. 01 3月, 2008 3 次提交
  26. 27 2月, 2008 1 次提交
  27. 24 9月, 2007 1 次提交