Skip to content
Snippets Groups Projects
  1. Mar 15, 2018
  2. Mar 14, 2018
    • Junio C Hamano's avatar
      Merge branch 'nd/parseopt-completion' · 7fb6aefd
      Junio C Hamano authored
      Teach parse-options API an option to help the completion script,
      and make use of the mechanism in command line completion.
      
      * nd/parseopt-completion: (45 commits)
        completion: more subcommands in _git_notes()
        completion: complete --{reuse,reedit}-message= for all notes subcmds
        completion: simplify _git_notes
        completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate
        completion: use __gitcomp_builtin in _git_worktree
        completion: use __gitcomp_builtin in _git_tag
        completion: use __gitcomp_builtin in _git_status
        completion: use __gitcomp_builtin in _git_show_branch
        completion: use __gitcomp_builtin in _git_rm
        completion: use __gitcomp_builtin in _git_revert
        completion: use __gitcomp_builtin in _git_reset
        completion: use __gitcomp_builtin in _git_replace
        remote: force completing --mirror= instead of --mirror
        completion: use __gitcomp_builtin in _git_remote
        completion: use __gitcomp_builtin in _git_push
        completion: use __gitcomp_builtin in _git_pull
        completion: use __gitcomp_builtin in _git_notes
        completion: use __gitcomp_builtin in _git_name_rev
        completion: use __gitcomp_builtin in _git_mv
        completion: use __gitcomp_builtin in _git_merge_base
        ...
      7fb6aefd
    • Junio C Hamano's avatar
      Merge branch 'nd/object-allocation-comments' · 99321e32
      Junio C Hamano authored
      Code doc update.
      
      * nd/object-allocation-comments:
        object.h: realign object flag allocation comment
        object.h: update flag allocation comment
      99321e32
    • Junio C Hamano's avatar
      Merge branch 'jk/smart-http-protocol-doc-fix' · 88506cb8
      Junio C Hamano authored
      A doc update.
      
      * jk/smart-http-protocol-doc-fix:
        smart-http: document flush after "# service" line
      88506cb8
    • Junio C Hamano's avatar
      Merge branch 'jk/add-i-diff-filter' · c5e2df04
      Junio C Hamano authored
      The "interactive.diffFilter" used by "git add -i" must retain
      one-to-one correspondence between its input and output, but it was
      not enforced and caused end-user confusion.  We now at least make
      sure the filtered result has the same number of lines as its input
      to detect a broken filter.
      
      * jk/add-i-diff-filter:
        add--interactive: detect bogus diffFilter output
        t3701: add a test for interactive.diffFilter
      c5e2df04
    • Junio C Hamano's avatar
      Merge branch 'nd/worktree-move' · bd0f7943
      Junio C Hamano authored
      "git worktree" learned move and remove subcommands.
      
      * nd/worktree-move:
        t2028: fix minor error and issues in newly-added "worktree move" tests
        worktree remove: allow it when $GIT_WORK_TREE is already gone
        worktree remove: new command
        worktree move: refuse to move worktrees with submodules
        worktree move: accept destination as directory
        worktree move: new command
        worktree.c: add update_worktree_location()
        worktree.c: add validate_worktree()
      bd0f7943
    • Junio C Hamano's avatar
      Merge branch 'pw/add-p-recount' · 436d18f2
      Junio C Hamano authored
      "git add -p" has been lazy in coalescing split patches before
      passing the result to underlying "git apply", leading to corner
      case bugs; the logic to prepare the patch to be applied after hunk
      selections has been tightened.
      
      * pw/add-p-recount:
        add -p: don't rely on apply's '--recount' option
        add -p: fix counting when splitting and coalescing
        add -p: calculate offset delta for edited patches
        add -p: adjust offsets of subsequent hunks when one is skipped
        t3701: add failing test for pathological context lines
        t3701: don't hard code sha1 hash values
        t3701: use test_write_lines and write_script
        t3701: indent here documents
        add -i: add function to format hunk header
      436d18f2
    • Junio C Hamano's avatar
      Merge branch 'ab/pre-auto-gc-battery' · b423234d
      Junio C Hamano authored
      A sample auto-gc hook (in contrib/) to skip auto-gc while on
      battery has been updated to almost always allow running auto-gc
      unless on_ac_power command is absolutely sure that we are on
      battery power (earlier, it skipped unless the command is sure that
      we are on ac power).
      
      * ab/pre-auto-gc-battery:
        hooks/pre-auto-gc-battery: allow gc to run on non-laptops
      b423234d
    • Junio C Hamano's avatar
      Merge branch 'sg/test-x' · 571e472d
      Junio C Hamano authored
      Running test scripts under -x option of the shell is often not a
      useful way to debug them, because the error messages from the
      commands tests try to capture and inspect are contaminated by the
      tracing output by the shell.  An earlier work done to make it more
      pleasant to run tests under -x with recent versions of bash is
      extended to cover posix shells that do not support BASH_XTRACEFD.
      
      * sg/test-x:
        travis-ci: run tests with '-x' tracing
        t/README: add a note about don't saving stderr of compound commands
        t1510-repo-setup: mark as untraceable with '-x'
        t9903-bash-prompt: don't check the stderr of __git_ps1()
        t5570-git-daemon: don't check the stderr of a subshell
        t5526: use $TRASH_DIRECTORY to specify the path of GIT_TRACE log file
        t5500-fetch-pack: don't check the stderr of a subshell
        t3030-merge-recursive: don't check the stderr of a subshell
        t1507-rev-parse-upstream: don't check the stderr of a shell function
        t: add means to disable '-x' tracing for individual test scripts
        t: prevent '-x' tracing from interfering with test helpers' stderr
      571e472d
    • Junio C Hamano's avatar
      Merge branch 'rj/test-i18ngrep' · d92a0156
      Junio C Hamano authored
      Test updates.
      
      * rj/test-i18ngrep:
        t5536: simplify checking of messages output to stderr
        t4151: consolidate multiple calls to test_i18ngrep
      d92a0156
    • Junio C Hamano's avatar
      Merge branch 'ma/roll-back-lockfiles' · 787aa97f
      Junio C Hamano authored
      Some codepaths used to take a lockfile and did not roll it back;
      they are automatically rolled back at program exit, so there is no
      real "breakage", but it still is a good practice to roll back when
      you are done with a lockfile.
      
      * ma/roll-back-lockfiles:
        sequencer: do not roll back lockfile unnecessarily
        merge: always roll back lock in `checkout_fast_forward()`
        merge-recursive: always roll back lock in `merge_recursive_generic()`
        sequencer: always roll back lock in `do_recursive_merge()`
        sequencer: make lockfiles non-static
      787aa97f
    • Junio C Hamano's avatar
      Merge branch 'nd/diff-stat-with-summary' · 868f7d23
      Junio C Hamano authored
      "git diff" and friends learned "--compact-summary" that shows the
      information usually given with the "--summary" option on the same
      line as the diffstat output of the "--stat" option (which saves
      vertical space and keeps info on a single path at the same place).
      
      * nd/diff-stat-with-summary:
        diff: add --compact-summary
        diff.c: refactor pprint_rename() to use strbuf
      868f7d23
  3. Mar 08, 2018
    • SZEDER Gábor's avatar
      t9402-git-cvsserver-refs: don't check the stderr of a subshell · c20bf94a
      SZEDER Gábor authored
      
      Four 'cvs diff' related tests in 't9402-git-cvsserver-refs.sh' fail
      when the test script is run with '-x' tracing (and using a shell other
      than a Bash version supporting BASH_XTRACEFD).  The reason for those
      failures is that the tests check the emptiness of a subshell's stderr,
      which includes the trace of commands executed in that subshell as
      well, throwing off the emptiness check.
      
      Save the stdout and stderr of the invoked 'cvs' command instead of the
      whole subshell, so the latter remains free from tracing output.  (Note
      that changing how stdout is saved is only done for the sake of
      consistency, it's not necessary for correctness.)
      
      After this change t9402 passes with '-x', even when running with
      /bin/sh.
      
      Signed-off-by: default avatarSZEDER Gábor <szeder.dev@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      c20bf94a
    • SZEDER Gábor's avatar
      t9400-git-cvsserver-server: don't rely on the output of 'test_cmp' · 54ce2e9b
      SZEDER Gábor authored
      
      The test 'cvs update (-p)' redirects and checks 'test_cmp's stdout and
      even its stderr.  The commit introducing this test in 6e8937a0
      (cvsserver: Add test for update -p, 2008-03-27) doesn't discuss why,
      in fact its log message only consists of that subject line.  Anyway,
      weird as it is, it kind of made sense due to the way that test was
      structured:
      
      After a bit of preparation, this test updates four files via CVS and
      checks their contents using 'test_cmp', but it does so in a for loop
      iterating over the names of those four files.  Now, the exit status of
      a for loop is the exit status of the last command executed in the
      loop, meaning that the test can't simply rely on the exit code of
      'test_cmp' in the loop's body.  Instead, the test works it around by
      relying on the stdout of 'test_cmp' being silent on success and
      showing the diff on failure, as it appends the stdout of all four
      'test_cmp' invocations to a single file and checks that file's
      emptiness after the loop (with 'test -z "$(cat ...)"', no less; there
      was no 'test_must_be_empty' back then).  Furthermore, the test
      redirects the stderr of those 'test_cmp' invocations to this file,
      too: while 'test_cmp' itself doesn't output anything to stderr, the
      invoked 'diff' or 'cmp' commands do send their error messages there,
      e.g. if they can't open a file because its name was misspelled.
      
      This also makes this test fail when the test script is run with '-x'
      tracing (and using a shell other than a Bash version supporting
      BASH_XTRACEFD), because 'test_cmp's stderr contains the trace of the
      'diff' command executed inside the helper function, throwing off the
      subsequent emptiness check.
      
      Stop relying on 'test_cmp's output and instead run 'test_cmp a b ||
      return 1' in the for loop in order to make 'test_cmp's error code fail
      the test.  Furthermore, add the missing && after the cvs command to
      create a && chain in the loop's body.
      
      After this change t9400 passes with '-x', even when running with
      /bin/sh.
      
      Signed-off-by: default avatarSZEDER Gábor <szeder.dev@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      54ce2e9b
    • Junio C Hamano's avatar
      Eighth batch for 2.17 · d0db9edb
      Junio C Hamano authored
      
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      d0db9edb
    • Junio C Hamano's avatar
      Merge branch 'ag/userdiff-go-funcname' · 077cde91
      Junio C Hamano authored
      "git diff" and friends learned funcname patterns for Go language
      source files.
      
      * ag/userdiff-go-funcname:
        userdiff: add built-in pattern for golang
      077cde91
    • Junio C Hamano's avatar
      Merge branch 'ab/gc-auto-in-commit' · 9bb8eb0c
      Junio C Hamano authored
      "git commit" used to run "gc --auto" near the end, which was lost
      when the command was reimplemented in C by mistake.
      
      * ab/gc-auto-in-commit:
        commit: run git gc --auto just before the post-commit hook
      9bb8eb0c
    • Junio C Hamano's avatar
      Merge branch 'bp/untracked-cache-noflush' · cdda65ac
      Junio C Hamano authored
      Writing out the index file when the only thing that changed in it
      is the untracked cache information is often wasteful, and this has
      been optimized out.
      
      * bp/untracked-cache-noflush:
        untracked cache: use git_env_bool() not getenv() for customization
        dir.c: don't flag the index as dirty for changes to the untracked cache
      cdda65ac
    • Junio C Hamano's avatar
      Merge branch 'rs/perf-repeat-thrice-by-default' · 74735c9c
      Junio C Hamano authored
      Perf test regression fix.
      
      * rs/perf-repeat-thrice-by-default:
        perf: use GIT_PERF_REPEAT_COUNT=3 by default even without config file
      74735c9c
    • Junio C Hamano's avatar
      Merge branch 'mk/doc-pretty-fill' · cd3d56a9
      Junio C Hamano authored
      Docfix.
      
      * mk/doc-pretty-fill:
        docs/pretty-formats: fix typo '% <(<N>)' -> '%<|(<N>)'
      cd3d56a9
    • Junio C Hamano's avatar
      Merge branch 'jc/test-must-be-empty' · a8d45dcf
      Junio C Hamano authored
      Test framework tweak to catch developer thinko.
      
      * jc/test-must-be-empty:
        test_must_be_empty: make sure the file exists, not just empty
      a8d45dcf
    • Junio C Hamano's avatar
      Merge branch 'ds/mark-parents-uninteresting-optim' · d5120dab
      Junio C Hamano authored
      Micro optimization in revision traversal code.
      
      * ds/mark-parents-uninteresting-optim:
        revision.c: reduce object database queries
      d5120dab
    • Junio C Hamano's avatar
      Merge branch 'ds/find-unique-abbrev-optim' · 7519a60f
      Junio C Hamano authored
      While finding unique object name abbreviation, the code may
      accidentally have read beyond the end of the array of object names
      in a pack.
      
      * ds/find-unique-abbrev-optim:
        sha1_name: fix uninitialized memory errors
      7519a60f
    • Junio C Hamano's avatar
      Merge branch 'sg/subtree-signed-commits' · 65ebfec5
      Junio C Hamano authored
      "git subtree" script (in contrib/) scripted around "git log", whose
      output got affected by end-user configuration like log.showsignature
      
      * sg/subtree-signed-commits:
        subtree: fix add and pull for GPG-signed commits
      65ebfec5
    • Junio C Hamano's avatar
      Merge branch 'rv/grep-cleanup' · 5fc4a7ed
      Junio C Hamano authored
      Threaded "git grep" has been optimized to avoid allocation in code
      section that is covered under a mutex.
      
      * rv/grep-cleanup:
        grep: simplify grep_oid and grep_file
        grep: move grep_source_init outside critical section
      5fc4a7ed
    • Junio C Hamano's avatar
      Merge branch 'ot/ref-filter-cleanup' · 9e69a148
      Junio C Hamano authored
      Code cleanup.
      
      * ot/ref-filter-cleanup:
        ref-filter: get rid of goto
        ref-filter: get rid of duplicate code
      9e69a148
    • Junio C Hamano's avatar
      Merge branch 'jh/status-no-ahead-behind' · 4094e47f
      Junio C Hamano authored
      "git status" can spend a lot of cycles to compute the relation
      between the current branch and its upstream, which can now be
      disabled with "--no-ahead-behind" option.
      
      * jh/status-no-ahead-behind:
        status: support --no-ahead-behind in long format
        status: update short status to respect --no-ahead-behind
        status: add --[no-]ahead-behind to status and commit for V2 format.
        stat_tracking_info: return +1 when branches not equal
      4094e47f
    • Junio C Hamano's avatar
      Merge branch 'sg/travis-build-during-script-phase' · c710d182
      Junio C Hamano authored
      Build the executable in 'script' phase in Travis CI integration, to
      follow the established practice, rather than during 'before_script'
      phase.  This allows the CI categorize the failures better ('failed'
      is project's fault, 'errored' is build environment's).
      
      * sg/travis-build-during-script-phase:
        travis-ci: build Git during the 'script' phase
      c710d182
    • Ævar Arnfjörð Bjarmason's avatar
      git manpage: note git-security@googlegroups.com · 2caa7b8d
      Ævar Arnfjörð Bjarmason authored
      Add a mention of the security mailing list to the "Reporting Bugs"
      section. There's a mention of this list at
      https://git-scm.com/community
      
       but none in git.git itself.
      
      The copy is pasted from the git-scm.com website. Let's use the same
      wording in both places.
      
      Signed-off-by: default avatarÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      2caa7b8d
    • Thomas Levesque's avatar
      userdiff.c: add C# async keyword in diff pattern · a12cec99
      Thomas Levesque authored
      
      Currently C# async methods are not shown in diff hunk headers. I just
      added the async keyword to the csharp method pattern so that they are
      properly detected.
      
      Signed-off-by: default avatarThomas Levesque <thomas.levesque@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      a12cec99
  4. Mar 07, 2018
Loading