1. 03 8月, 2013 2 次提交
  2. 02 8月, 2013 1 次提交
  3. 23 7月, 2013 4 次提交
    • J
      t5533: test "push --force-with-lease" · d887cc18
      Junio C Hamano 提交于
      Prepare two repositories, src and dst, the latter of which is a
      clone of the former (with tracking branches), and push from the
      latter into the former, with various --force-with-lease options.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d887cc18
    • J
      push --force-with-lease: tie it all together · 631b5ef2
      Junio C Hamano 提交于
      This teaches the deepest part of the callchain for "git push" (and
      "git send-pack") to enforce "the old value of the ref must be this,
      otherwise fail this push" (aka "compare-and-swap" / "--lockref").
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      631b5ef2
    • J
      push --force-with-lease: implement logic to populate old_sha1_expect[] · 91048a95
      Junio C Hamano 提交于
      This plugs the push_cas_option data collected by the command line
      option parser to the transport system with a new function
      apply_push_cas(), which is called after match_push_refs() has
      already been called.
      
      At this point, we know which remote we are talking to, and what
      remote refs we are going to update, so we can fill in the details
      that may have been missing from the command line, such as
      
       (1) what abbreviated refname the user gave us matches the actual
           refname at the remote; and
      
       (2) which remote-tracking branch in our local repository to read
           the value of the object to expect at the remote.
      
      to populate the old_sha1_expect[] field of each of the remote ref.
      As stated in the documentation, the use of remote-tracking branch
      as the default is a tentative one, and we may come up with a better
      logic as we gain experience.
      
      Still nobody uses this information, which is the topic of the next
      patch.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      91048a95
    • J
      remote.c: add command line option parser for "--force-with-lease" · 28f5d176
      Junio C Hamano 提交于
      Update "git push" and "git send-pack" to parse this commnd line
      option.
      
      The intended sematics is:
      
       * "--force-with-lease" alone, without specifying the details, will
         protect _all_ remote refs that are going to be updated by
         requiring their current value to be the same as some reasonable
         default, unless otherwise specified;
      
       * "--force-with-lease=refname", without specifying the expected
         value, will protect that refname, if it is going to be updated,
         by requiring its current value to be the same as some reasonable
         default.
      
       * "--force-with-lease=refname:value" will protect that refname, if
         it is going to be updated, by requiring its current value to be
         the same as the specified value; and
      
       * "--no-force-with-lease" will cancel all the previous --force-with-lease on the
         command line.
      
      For now, "some reasonable default" is tentatively defined as "the
      value of the remote-tracking branch we have for the ref of the
      remote being updated", and it is an error if we do not have such a
      remote-tracking branch.  But this is known to be fragile, its use is
      not yet recommended, and hopefully we will find more reasonable
      default as we gain experience with this feature.  The manual marks
      the feature as experimental unless the expected value is specified
      explicitly for this reason.
      
      Because the command line options are parsed _before_ we know which
      remote we are pushing to, there needs further processing to the
      parsed data after we instantiate the transport object to:
      
       * expand "refname" given by the user to a full refname to be
         matched with the list of "struct ref" used in match_push_refs()
         and set_ref_status_for_push(); and
      
       * learning the actual local ref that is the remote-tracking branch
         for the specified remote ref.
      
      Further, some processing need to be deferred until we find the set
      of remote refs and match_push_refs() returns in order to find the
      ones that need to be checked after explicit ones have been processed
      for "--force-with-lease" (no specific details).
      
      These post-processing will be the topic of the next patch.
      
      This option was originally called "cas" (for "compare and swap"),
      the name which nobody liked because it was too technical.  The
      second attempt called it "lockref" (because it is conceptually like
      pushing after taking a lock) but the word "lock" was hated because
      it implied that it may reject push by others, which is not the way
      this option works.  This round calls it "force-with-lease".  You
      assume you took the lease on the ref when you fetched to decide what
      the rebased history should be, and you can push back only if the
      lease has not been broken.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      28f5d176
  4. 09 7月, 2013 2 次提交
    • J
      builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN · ab22d2eb
      Junio C Hamano 提交于
      The command line parser of "git push" for "--tags", "--delete", and
      "--thin" options still used outdated OPT_BOOLEAN.  Because these
      options do not give escalating levels when given multiple times,
      they should use OPT_BOOL.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ab22d2eb
    • J
      cache.h: move remote/connect API out of it · 47a59185
      Junio C Hamano 提交于
      The definition of "struct ref" in "cache.h", a header file so
      central to the system, always confused me.  This structure is not
      about the local ref used by sha1-name API to name local objects.
      
      It is what refspecs are expanded into, after finding out what refs
      the other side has, to define what refs are updated after object
      transfer succeeds to what values.  It belongs to "remote.h" together
      with "struct refspec".
      
      While we are at it, also move the types and functions related to the
      Git transport connection to a new header file connect.h
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47a59185
  5. 05 7月, 2013 2 次提交
    • J
      Merge branch 'maint' · f8abaeba
      Junio C Hamano 提交于
      * maint:
        fixup-builtins: retire an old transition helper script
      f8abaeba
    • J
      Merge branch 'tr/test-v-and-v-subtest-only' · 04f2ddda
      Junio C Hamano 提交于
      Allows N instances of tests run in parallel, each running 1/N parts
      of the test suite under Valgrind, to speed things up.
      
      * tr/test-v-and-v-subtest-only:
        perf-lib: fix start/stop of perf tests
        test-lib: support running tests under valgrind in parallel
        test-lib: allow prefixing a custom string before "ok N" etc.
        test-lib: valgrind for only tests matching a pattern
        test-lib: verbose mode for only tests matching a pattern
        test-lib: self-test that --verbose works
        test-lib: rearrange start/end of test_expect_* and test_skip
        test-lib: refactor $GIT_SKIP_TESTS matching
        test-lib: enable MALLOC_* for the actual tests
      04f2ddda
  6. 04 7月, 2013 21 次提交
  7. 02 7月, 2013 8 次提交
    • J
      Merge branch 'maint' · 8c4e4ec3
      Junio C Hamano 提交于
      * maint:
        t7500: fix flipped actual/expect
        lib-rebase: document exec_ in FAKE_LINES
      8c4e4ec3
    • J
      Update draft release notes to 1.8.4 · 51f11d69
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      51f11d69
    • J
      Merge branch 'rr/remote-branch-config-refresh' · 7e5ad06f
      Junio C Hamano 提交于
      The original way to specify remote repository using .git/branches/
      used to have a nifty feature.  The code to support the feature was
      still in a function but the caller was changed not to call it 5
      years ago, breaking that feature and leaving the supporting code
      unreachable.
      
      * rr/remote-branch-config-refresh:
        t/t5505-remote: test multiple push/pull in remotes-file
        ls-remote doc: don't encourage use of branches-file
        ls-remote doc: rewrite <repository> paragraph
        ls-remote doc: fix example invocation on git.git
        t/t5505-remote: test url-with-# in branches-file
        remote: remove dead code in read_branches_file()
        t/t5505-remote: use test_path_is_missing
        t/t5505-remote: test push-refspec in branches-file
        t/t5505-remote: modernize style
      7e5ad06f
    • J
      Merge branch 'ed/color-prompt' · 46b04591
      Junio C Hamano 提交于
      Code clean-up for in-prompt status script (in contrib/).
      
      * ed/color-prompt:
        git-prompt.sh: add missing information in comments
        git-prompt.sh: do not print duplicate clean color code
        t9903: remove redundant tests
        git-prompt.sh: refactor colored prompt code
        t9903: add tests for git-prompt pcmode
      46b04591
    • J
      Merge branch 'ap/rebase-multiple-fixups' · eb3a4fc1
      Junio C Hamano 提交于
      Having multiple "fixup!" on a line in the rebase instruction sheet
      did not work very well with "git rebase -i --autosquash".
      
      * ap/rebase-multiple-fixups:
        lib-rebase: style: use write_script, <<-\EOF
        rebase -i: handle fixup! fixup! in --autosquash
      eb3a4fc1
    • J
      Merge branch 'kb/am-deprecate-resolved' · 4b9a0ded
      Junio C Hamano 提交于
      Promote "git am --continue" over "git am --resolved" for UI
      consistency.
      
      * kb/am-deprecate-resolved:
        am: replace uses of --resolved with --continue
      4b9a0ded
    • J
      Merge branch 'rr/column-doc' · 66929c42
      Junio C Hamano 提交于
      * rr/column-doc:
        column doc: rewrite documentation for column.ui
      66929c42
    • J
      Merge branch 'ft/doc-git-transport' · 43f25ae7
      Junio C Hamano 提交于
      * ft/doc-git-transport:
        documentation: add git:// transport security notice
      43f25ae7