1. 29 10月, 2016 1 次提交
  2. 15 7月, 2016 4 次提交
    • S
      add a test for push options · 3ac87030
      Stefan Beller 提交于
      The functions `mk_repo_pair` as well as `test_refs` are borrowed from
      t5543-atomic-push, with additional hooks installed.
      Signed-off-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3ac87030
    • S
      push: accept push options · f6a4e61f
      Stefan Beller 提交于
      This implements everything that is required on the client side to make use
      of push options from the porcelain push command.
      Signed-off-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f6a4e61f
    • S
      receive-pack: implement advertising and receiving push options · c714e45f
      Stefan Beller 提交于
      The pre/post receive hook may be interested in more information from the
      user. This information can be transmitted when both client and server
      support the "push-options" capability, which when used is a phase directly
      after update commands ended by a flush pkt.
      
      Similar to the atomic option, the server capability can be disabled via
      the `receive.advertisePushOptions` config variable. While documenting
      this, fix a nit in the `receive.advertiseAtomic` wording.
      Signed-off-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c714e45f
    • S
      push options: {pre,post}-receive hook learns about push options · 77a9745d
      Stefan Beller 提交于
      The environment variable GIT_PUSH_OPTION_COUNT is set to the number of
      push options sent, and GIT_PUSH_OPTION_{0,1,..} is set to the transmitted
      option.
      
      The code is not executed as the push options are set to NULL, nor is the
      new capability advertised.
      
      There was some discussion back and forth how to present these push options
      to the user as there are some ways to do it:
      
      Keep all options in one environment variable
      ============================================
      + easiest way to implement in Git
      - This would make things hard to parse correctly in the hook.
      
      Put the options in files instead,
      filenames are in GIT_PUSH_OPTION_FILES
      ======================================
      + After a discussion about environment variables and shells, we may not
        want to put user data into an environment variable (see [1] for example).
      + We could transmit binaries, i.e. we're not bound to C strings as
        we are when using environment variables to the user.
      + Maybe easier to parse than constructing environment variable names
        GIT_PUSH_OPTION_{0,1,..} yourself
      - cleanup of the temporary files is hard to do reliably
      - we have race conditions with multiple clients pushing, hence we'd need
        to use mkstemp. That's not too bad, but still.
      
      Use environment variables, but restrict to key/value pairs
      ==========================================================
      (When the user pushes a push option `foo=bar`, we'd
      GIT_PUSH_OPTION_foo=bar)
      + very easy to parse for a simple model of push options
      - it's not sufficient for more elaborate models, e.g.
        it doesn't allow doubles (e.g. cc=reviewer@email)
      
      Present the options in different environment variables
      ======================================================
      (This is implemented)
      * harder to parse as a user, but we have a sample hook for that.
      - doesn't allow binary files
      + allows the same option twice, i.e. is not restrictive about
        options, except for binary files.
      + doesn't clutter a remote directory with (possibly stale)
        temporary files
      
      As we first want to focus on getting simple strings to work
      reliably, we go with the last option for now. If we want to
      do transmission of binaries later, we can just attach a
      'side-channel', e.g. "any push option that contains a '\0' is
      put into a file instead of the environment variable and we'd
      have new GIT_PUSH_OPTION_FILES, GIT_PUSH_OPTION_FILENAME_{0,1,..}
      environment variables".
      
      [1] 'Shellshock' https://lwn.net/Articles/614218/Signed-off-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      77a9745d
  3. 07 7月, 2016 35 次提交
    • J
      Third batch of topics for 2.10 · 5c589a73
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5c589a73
    • J
      Sync with maint · 789808fe
      Junio C Hamano 提交于
      * maint:
        More fixes for 2.9.1
        mailmap: use main email address for dturner
      789808fe
    • J
      Merge branch 'jc/t2300-setup' · afb516e3
      Junio C Hamano 提交于
      Portability fix for Windows.
      
      * jc/t2300-setup:
        t2300: "git --exec-path" is not usable in $PATH on Windows as-is
      afb516e3
    • J
      Merge branch 'ao/p4-has-branch-prefix-fix' · 3efeb513
      Junio C Hamano 提交于
      A bug, which caused "git p4" while running under verbose mode to
      report paths that are omitted due to branch prefix incorrectly, has
      been fixed; the command said "Ignoring file outside of prefix" for
      paths that are _inside_.
      
      * ao/p4-has-branch-prefix-fix:
        git-p4: correct hasBranchPrefix verbose output
      3efeb513
    • J
      Merge branch 'cb/t7810-test-label-fix' · 4cea655a
      Junio C Hamano 提交于
      Test clean-up.
      
      * cb/t7810-test-label-fix:
        t7810: fix duplicated test title
      4cea655a
    • J
      Merge branch 'sb/t5614-modernize' · 8db528cf
      Junio C Hamano 提交于
      Test clean-up.
      
      * sb/t5614-modernize:
        t5614: don't use subshells
      8db528cf
    • J
      Merge branch 'js/perf-on-apple' · 3437017f
      Junio C Hamano 提交于
      t/perf needs /usr/bin/time with GNU extension; the invocation of it
      is updated to "gtime" on Darwin.
      
      * js/perf-on-apple:
        perf: accommodate for MacOSX
      3437017f
    • J
      Merge branch 'ak/t7800-wo-readlink' · 3edaee74
      Junio C Hamano 提交于
      One among four invocations of readlink(1) in our test suite has
      been rewritten so that the test can run on systems without the
      command (others are in valgrind test framework and t9802).
      
      * ak/t7800-wo-readlink:
        t7800: readlink may not be available
      3edaee74
    • J
      Merge branch 'jk/tzoffset-fix' · f6a729f3
      Junio C Hamano 提交于
      The internal code used to show local timezone offset is not
      prepared to handle timestamps beyond year 2100, and gave a
      bogus offset value to the caller.  Use a more benign looking
      +0000 instead and let "git log" going in such a case, instead
      of aborting.
      
      * jk/tzoffset-fix:
        local_tzoffset: detect errors from tm_to_time_t
        t0006: test various date formats
        t0006: rename test-date's "show" to "relative"
      f6a729f3
    • J
      Merge branch 'js/mingw-parameter-less-c-functions' · fd4df422
      Junio C Hamano 提交于
      Some platform-specific code had non-ANSI strict declarations of C
      functions that do not take any parameters, which has been
      corrected.
      
      * js/mingw-parameter-less-c-functions:
        mingw: let the build succeed with DEVELOPER=1
      fd4df422
    • J
      Merge branch 'lc/shell-default-value-noexpand' · 5854b36c
      Junio C Hamano 提交于
      Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}'
      to set the default value, without enclosing it in double quotes.
      
      * lc/shell-default-value-noexpand:
        sh-setup: enclose setting of ${VAR=default} in double-quotes
      5854b36c
    • J
      Merge branch 'sb/clone-shallow-passthru' · 9f1027d1
      Junio C Hamano 提交于
      Fix an unintended regression in v2.9 that breaks "clone --depth"
      that recurses down to submodules by forcing the submodules to also
      be cloned shallowly, which many server instances that host upstream
      of the submodules are not prepared for.
      
      * sb/clone-shallow-passthru:
        clone: do not let --depth imply --shallow-submodules
      9f1027d1
    • J
      Merge branch 'jk/gpg-interface-cleanup' · ed0f7bde
      Junio C Hamano 提交于
      A new run-command API function pipe_command() is introduced to
      sanely feed data to the standard input while capturing data from
      the standard output and the standard error of an external process,
      which is cumbersome to hand-roll correctly without deadlocking.
      
      The codepath to sign data in a prepared buffer with GPG has been
      updated to use this API to read from the status-fd to check for
      errors (instead of relying on GPG's exit status).
      
      * jk/gpg-interface-cleanup:
        gpg-interface: check gpg signature creation status
        sign_buffer: use pipe_command
        verify_signed_buffer: use pipe_command
        run-command: add pipe_command helper
        verify_signed_buffer: use tempfile object
        verify_signed_buffer: drop pbuf variable
        gpg-interface: use child_process.args
      ed0f7bde
    • J
      Merge branch 'mg/signature-doc' · 1d77bed8
      Junio C Hamano 提交于
      Formats of the various data (and how to validate them) where we use
      GPG signature have been documented.
      
      * mg/signature-doc:
        Documentation/technical: signed merge tag format
        Documentation/technical: signed commit format
        Documentation/technical: signed tag format
        Documentation/technical: describe signature formats
      1d77bed8
    • J
      Merge branch 'nd/graph-width-padded' · f2140c38
      Junio C Hamano 提交于
      "log --graph --format=" learned that "%>|(N)" specifies the width
      relative to the terminal's left edge, not relative to the area to
      draw text that is to the right of the ancestry-graph section.  It
      also now accepts negative N that means the column limit is relative
      to the right border.
      
      * nd/graph-width-padded:
        pretty.c: support <direction>|(<negative number>) forms
        pretty: pass graph width to pretty formatting for use in '%>|(N)'
      f2140c38
    • J
      Merge branch 'jk/repack-keep-unreachable' · 979f0303
      Junio C Hamano 提交于
      "git repack" learned the "--keep-unreachable" option, which sends
      loose unreachable objects to a pack instead of leaving them loose.
      This helps heuristics based on the number of loose objects
      (e.g. "gc --auto").
      
      * jk/repack-keep-unreachable:
        repack: extend --keep-unreachable to loose objects
        repack: add --keep-unreachable option
        repack: document --unpack-unreachable option
      979f0303
    • J
      Merge branch 'ew/mboxrd-format-am' · e25a4ded
      Junio C Hamano 提交于
      Teach format-patch and mailsplit (hence "am") how a line that
      happens to begin with "From " in the e-mail message is quoted with
      ">", so that these lines can be restored to their original shape.
      
      * ew/mboxrd-format-am:
        am: support --patch-format=mboxrd
        mailsplit: support unescaping mboxrd messages
        pretty: support "mboxrd" output format
      e25a4ded
    • J
      Merge branch 'jk/upload-pack-hook' · 1e4bf907
      Junio C Hamano 提交于
      "upload-pack" allows a custom "git pack-objects" replacement when
      responding to "fetch/clone" via the uploadpack.packObjectsHook.
      
      * jk/upload-pack-hook:
        upload-pack: provide a hook for running pack-objects
        t1308: do not get fooled by symbolic links to the source tree
        config: add a notion of "scope"
        config: return configset value for current_config_ functions
        config: set up config_source for command-line config
        git_config_parse_parameter: refactor cleanup code
        git_config_with_options: drop "found" counting
      1e4bf907
    • J
      Merge branch 'nd/worktree-cleanup-post-head-protection' · 7a738b40
      Junio C Hamano 提交于
      Further preparatory clean-up for "worktree" feature continues.
      
      * nd/worktree-cleanup-post-head-protection:
        worktree: simplify prefixing paths
        worktree: avoid 0{40}, too many zeroes, hard to read
        worktree.c: use is_dot_or_dotdot()
        git-worktree.txt: keep subcommand listing in alphabetical order
        worktree.c: rewrite mark_current_worktree() to avoid strbuf
        completion: support git-worktree
      7a738b40
    • J
      Merge branch 'jk/bisect-show-tree' · f1e80a12
      Junio C Hamano 提交于
      "git bisect" makes an internal call to "git diff-tree" when
      bisection finds the culprit, but this call did not initialize the
      data structure to pass to the diff-tree API correctly.
      
      * jk/bisect-show-tree:
        bisect: always call setup_revisions after init_revisions
      f1e80a12
    • J
      Merge branch 'lf/sideband-returns-void' · 35d213c8
      Junio C Hamano 提交于
      A small internal API cleanup.
      
      * lf/sideband-returns-void:
        upload-pack.c: make send_client_data() return void
        sideband.c: make send_sideband() return void
      35d213c8
    • J
      Merge branch 'jk/add-i-diff-compact-heuristics' · 054d949f
      Junio C Hamano 提交于
      "git add -i/-p" learned to honor diff.compactionHeuristic
      experimental knob, so that the user can work on the same hunk split
      as "git diff" output.
      
      * jk/add-i-diff-compact-heuristics:
        add--interactive: respect diff.compactionHeuristic
      054d949f
    • J
      Merge branch 'km/fetch-do-not-free-remote-name' · 845351c9
      Junio C Hamano 提交于
      The ownership rule for the piece of memory that hold references to
      be fetched in "git fetch" was screwy, which has been cleaned up.
      
      * km/fetch-do-not-free-remote-name:
        builtin/fetch.c: don't free remote->name after fetch
      845351c9
    • J
      Merge branch 'nd/test-lib-httpd-show-error-log-in-verbose' · 34bf3bbb
      Junio C Hamano 提交于
      HTTPd tests learned to show the server error log to help diagnosing
      a failing tests.
      
      * nd/test-lib-httpd-show-error-log-in-verbose:
        lib-httpd.sh: print error.log on error
      34bf3bbb
    • J
      Merge branch 'jk/string-list-static-init' · b8b6365a
      Junio C Hamano 提交于
      Instead of taking advantage of a struct string_list that is
      allocated with all NULs happens to be STRING_LIST_INIT_NODUP kind,
      initialize them explicitly as such, to document their behaviour
      better.
      
      * jk/string-list-static-init:
        use string_list initializer consistently
        blame,shortlog: don't make local option variables static
        interpret-trailers: don't duplicate option strings
        parse_opt_string_list: stop allocating new strings
      b8b6365a
    • J
      Merge branch 'jk/send-pack-stdio' · 7e58b816
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/send-pack-stdio:
        write_or_die: remove the unused write_or_whine() function
        send-pack: use buffered I/O to talk to pack-objects
      7e58b816
    • J
      Merge branch 'pb/commit-editmsg-path' · 7758b02b
      Junio C Hamano 提交于
      Code clean-up.
      
      * pb/commit-editmsg-path:
        builtin/commit.c: memoize git-path for COMMIT_EDITMSG
      7758b02b
    • J
      Merge branch 'ep/http-curl-trace' · 2f84df2c
      Junio C Hamano 提交于
      HTTP transport gained an option to produce more detailed debugging
      trace.
      
      * ep/http-curl-trace:
        imap-send.c: introduce the GIT_TRACE_CURL enviroment variable
        http.c: implement the GIT_TRACE_CURL environment variable
      2f84df2c
    • J
      More fixes for 2.9.1 · 674d38f5
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      674d38f5
    • J
      Merge branch 'jc/deref-tag' into maint · f8381983
      Junio C Hamano 提交于
      Code clean-up.
      
      * jc/deref-tag:
        blame, line-log: do not loop around deref_tag()
      f8381983
    • J
      Merge branch 'pb/strbuf-read-file-doc' into maint · f7927316
      Junio C Hamano 提交于
      Minor doc update.
      
      * pb/strbuf-read-file-doc:
        strbuf: describe the return value of strbuf_read_file
      f7927316
    • J
      Merge branch 'jk/fetch-prune-doc' into maint · 1c22105f
      Junio C Hamano 提交于
      Minor doc update.
      
      * jk/fetch-prune-doc:
        fetch: document that pruning happens before fetching
      1c22105f
    • J
      Merge branch 'pc/occurred' into maint · 9d3d0dbb
      Junio C Hamano 提交于
      Typofix.
      
      * pc/occurred:
        config.c: fix misspelt "occurred" in an error message
        refs.h: fix misspelt "occurred" in a comment
      9d3d0dbb
    • J
      Merge branch 'mg/cherry-pick-multi-on-unborn' into maint · 25227f0b
      Junio C Hamano 提交于
      "git cherry-pick A" worked on an unborn branch, but "git
      cherry-pick A..B" didn't.
      
      * mg/cherry-pick-multi-on-unborn:
        cherry-pick: allow to pick to unborn branches
      25227f0b
    • J
      Merge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint · af3a43cb
      Junio C Hamano 提交于
      Comments about misbehaving FreeBSD shells have been clarified with
      the version number (9.x and before are broken, newer ones are OK).
      
      * em/newer-freebsd-shells-are-fine-with-returns:
        rebase: update comment about FreeBSD /bin/sh
      af3a43cb