summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-19Merge branch 'bc/sha-256-doc-updates'Libravatar Junio C Hamano2-16/+22
Further update of docs to adjust to the recent SHA-256 work. * bc/sha-256-doc-updates: docs: fix step in transition plan docs: document SHA-256 pack and indices
2020-08-19Merge branch 'pb/set-url-docfix'Libravatar Junio C Hamano1-1/+1
Doc fix. * pb/set-url-docfix: fetch, pull doc: correct description of '--set-upstream'
2020-08-19Merge branch 'pb/userdiff-fortran-update'Libravatar Junio C Hamano11-1/+100
The regexp to identify the function boundary for FORTRAN programs has been updated. * pb/userdiff-fortran-update: userdiff: improve Fortran xfuncname regex userdiff: add tests for Fortran xfuncname regex
2020-08-19Merge branch 'jb/commit-graph-doc-fix'Libravatar Junio C Hamano1-3/+3
Docfix. * jb/commit-graph-doc-fix: docs: commit-graph: fix some whitespace in the diagram
2020-08-19Merge branch 'jk/blame-coalesce-fix'Libravatar Junio C Hamano2-9/+20
When given more than one target line ranges, "git blame -La,b -Lc,d" was over-eager to coalesce groups of original lines and showed incorrect results, which has been corrected. * jk/blame-coalesce-fix: blame: only coalesce lines that are adjacent in result t8003: factor setup out of coalesce test t8003: check output of coalesced blame
2020-08-19Merge branch 'ak/sequencer-fix-find-uniq-abbrev'Libravatar Junio C Hamano2-2/+9
Ring buffer with size 4 used for bin-hex translation resulted in a wrong object name in the sequencer's todo output, which has been corrected. * ak/sequencer-fix-find-uniq-abbrev: rebase -i: fix possibly wrong onto hash in todo
2020-08-19Merge branch 'en/sequencer-merge-labels'Libravatar Junio C Hamano3-12/+12
The commit labels used to explain each side of conflicted hunks placed by the sequencer machinery have been made more readable by humans. * en/sequencer-merge-labels: sequencer: avoid garbled merge machinery messages due to commit labels
2020-08-19Merge branch 'rs/preserve-merges-unused-code-removal'Libravatar Junio C Hamano1-10/+0
Code clean-up. * rs/preserve-merges-unused-code-removal: rebase: remove unused function reschedule_last_action
2020-08-19Merge branch 'rs/upload-pack-sigchain-fix'Libravatar Junio C Hamano1-1/+0
Code clean-up. * rs/upload-pack-sigchain-fix: upload-pack: remove superfluous sigchain_pop() call
2020-08-19Merge branch 'rp/ita-diff-modefix'Libravatar Junio C Hamano1-1/+2
"git diff [<tree-ish>] $path" for a $path that is marked with i-t-a bit was not showing the mode bits from the working tree. * rp/ita-diff-modefix: diff-lib: use worktree mode in diffs from i-t-a entries
2020-08-19Merge branch 'en/merge-tests'Libravatar Junio C Hamano35-48/+71
Updates to "git merge" tests, in preparation for a new merge strategy backend. * en/merge-tests: t6425: be more flexible with rename/delete conflict messages t642[23]: be more flexible for add/add conflicts involving pair renames t6422, t6426: be more flexible for add/add conflicts involving renames t6423: add an explanation about why one of the tests does not pass t6416, t6423: clarify some comments and fix some typos t6422: fix multiple errors with the mod6 test expectations t6423: fix test setup for a couple tests t6416, t6422: fix incorrect untracked file count t6422: fix bad check against missing file t6418: tighten delete/normalize conflict testcase Collect merge-related tests to t64xx
2020-08-17Eighth batchLibravatar Junio C Hamano1-0/+36
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-17Merge branch 'so/log-diff-merges-opt'Libravatar Junio C Hamano5-2/+171
Earlier, to countermand the implicit "-m" option when the "--first-parent" option is used with "git log", we added the "--[no-]diff-merges" option in the jk/log-fp-implies-m topic. To leave the door open to allow the "--diff-merges" option to take values that instructs how patches for merge commits should be computed (e.g. "cc"? "-p against first parent?"), redefine "--diff-merges" to take non-optional value, and implement "off" that means the same thing as "--no-diff-merges". * so/log-diff-merges-opt: t/t4013: add test for --diff-merges=off doc/git-log: describe --diff-merges=off revision: change "--diff-merges" option to require parameter
2020-08-17Merge branch 'jk/log-fp-implies-m'Libravatar Junio C Hamano9-55/+158
"git log --first-parent -p" showed patches only for single-parent commits on the first-parent chain; the "--first-parent" option has been made to imply "-m". Use "--no-diff-merges" to restore the previous behaviour to omit patches for merge commits. * jk/log-fp-implies-m: doc/git-log: clarify handling of merge commit diffs doc/git-log: move "-t" into diff-options list doc/git-log: drop "-r" diff option doc/git-log: move "Diff Formatting" from rev-list-options log: enable "-m" automatically with "--first-parent" revision: add "--no-diff-merges" option to counteract "-m" log: drop "--cc implies -m" logic
2020-08-17Merge branch 'ma/stop-progress-null-fix'Libravatar Junio C Hamano1-2/+10
NULL dereference fix. * ma/stop-progress-null-fix: progress: don't dereference before checking for NULL
2020-08-17Merge branch 'es/test-cmp-typocatcher'Libravatar Junio C Hamano1-2/+14
Test framework update. * es/test-cmp-typocatcher: test_cmp: diagnose incorrect arguments
2020-08-17Merge branch 'rp/apply-cached-with-i-t-a'Libravatar Junio C Hamano2-4/+77
Recent versions of "git diff-files" shows a diff between the index and the working tree for "intent-to-add" paths as a "new file" patch; "git apply --cached" should be able to take "git diff-files" and should act as an equivalent to "git add" for the path, but the command failed to do so for such a path. * rp/apply-cached-with-i-t-a: t4140: test apply with i-t-a paths apply: make i-t-a entries never match worktree apply: allow "new file" patches on i-t-a entries
2020-08-17Merge branch 'al/bisect-first-parent'Libravatar Junio C Hamano11-103/+195
"git bisect" learns the "--first-parent" option to find the first breakage along the first-parent chain. * al/bisect-first-parent: bisect: combine args passed to find_bisection() bisect: introduce first-parent flag cmd_bisect__helper: defer parsing no-checkout flag rev-list: allow bisect and first-parent flags t6030: modernize "git bisect run" tests
2020-08-17Merge branch 'jk/sideband-error-l10n'Libravatar Junio C Hamano1-1/+1
Mark error message for i18n. * jk/sideband-error-l10n: sideband: mark "remote error:" prefix for translation
2020-08-17Merge branch 'jc/noop-with-static-inline'Libravatar Junio C Hamano1-5/+15
A no-op replacement function implemented as a C preprocessor macro does not perform as good a job as one implemented as a "static inline" function in catching errors in parameters; replace the former with the latter in <git-compat-util.h> header. * jc/noop-with-static-inline: compat-util: type-check parameters of no-op replacement functions
2020-08-17Merge branch 'pd/mergetool-nvimdiff'Libravatar Junio C Hamano9-18/+51
The existing backends for "git mergetool" based on variants of vim have been refactored and then support for "nvim" has been added. * pd/mergetool-nvimdiff: mergetools: add support for nvimdiff (neovim) family mergetool--lib: improve support for vimdiff-style tool variants
2020-08-17Merge branch 'hn/reftable-prep-part-2'Libravatar Junio C Hamano4-139/+36
Further preliminary change to refs API. * hn/reftable-prep-part-2: Make HEAD a PSEUDOREF rather than PER_WORKTREE. Modify pseudo refs through ref backend storage t1400: use git rev-parse for testing PSEUDOREF existence
2020-08-17Merge branch 'dd/send-email-config'Libravatar Junio C Hamano4-0/+68
Stop when "sendmail.*" configuration variables are defined, which could be a mistaken attempt to define "sendemail.*" variables. * dd/send-email-config: git-send-email: die if sendmail.* config is set
2020-08-17Merge branch 'ps/ref-transaction-hook'Libravatar Junio C Hamano2-1/+28
The logic to find the ref transaction hook script attempted to cache the path to the found hook without realizing that it needed to keep a copied value, as the API it used returned a transitory buffer space. This has been corrected. * ps/ref-transaction-hook: t1416: avoid hard-coded sha1 ids refs: fix interleaving hook calls with reference-transaction hook
2020-08-14sequencer: avoid garbled merge machinery messages due to commit labelsLibravatar Elijah Newren3-12/+12
sequencer's get_message() exists to provide good labels on conflict hunks; see commits d68565402a ("revert: clarify label on conflict hunks", 2010-03-20) bf975d379d ("cherry-pick, revert: add a label for ancestor", 2010-03-20) 043a4492b3 ("sequencer: factor code out of revert builtin", 2012-01-11). for background on this function. These labels are of the form <commitID>... <commit summary> or parent of <commitID>... <commit summary> These labels are then passed as branch names to the merge machinery. However, these labels, as formatted, often also serve to confuse. For example, if we have a rename involved in a content merge, then it results in text such as the following: <<<<<<<< HEAD:foo.c int j; ======== int counter; >>>>>>>> b01dface... Removed unnecessary stuff:bar.c Or in various conflict messages, it can make it very difficult to read: CONFLICT (rename/delete): foo.c deleted in b01dface... Removed unnecessary stuff and renamed in HEAD. Version HEAD of foo.c left in tree. CONFLICT (file location): dir1/foo.c added in b01dface... Removed unnecessary stuff inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to dir2/foo.c. Make a minor change to remove the ellipses and add parentheses around the commit summary; this makes all three examples much easier to read: <<<<<<<< HEAD:foo.c int j; ======== int counter; >>>>>>>> b01dface (Removed unnecessary stuff):bar.c CONFLICT (rename/delete): foo.c deleted in b01dface (Removed unnecessary stuff) and renamed in HEAD. Version HEAD of foo.c left in tree. CONFLICT (file location): dir1/foo.c added in b01dface (Removed unnecessary stuff) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to dir2/foo.c. Signed-off-by: Elijah Newren <newren@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13docs: fix step in transition planLibravatar brian m. carlson1-1/+1
One of the required steps for the objectFormat extension is to implement the loose object index. However, without support for compatObjectFormat, we don't even know if the loose object index is needed, so it makes sense to move that step to the compatObjectFormat section. Do so. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13docs: document SHA-256 pack and indicesLibravatar brian m. carlson1-15/+21
Now that we have SHA-256 support for packs and indices, let's document that in SHA-256 repositories, we use SHA-256 instead of SHA-1 for object names and checksums. Instead of duplicating this information throughout the document, let's just document that in SHA-1 repositories, we use SHA-1 for these purposes, and in SHA-256 repositories, we use SHA-256. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13Seventh batchLibravatar Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13Merge branch 'rp/blame-first-parent-doc'Libravatar Junio C Hamano1-0/+6
The "git blame --first-parent" option was not documented, but now it is. * rp/blame-first-parent-doc: blame-options.txt: document --first-parent option
2020-08-13Merge branch 'ma/test-quote-cleanup'Libravatar Junio C Hamano18-80/+53
Test cleanup. * ma/test-quote-cleanup: t4104: modernize and simplify quoting t: don't spuriously close and reopen quotes
2020-08-13Merge branch 'jt/has_object'Libravatar Junio C Hamano7-10/+62
A new helper function has_object() has been introduced to make it easier to mark object existence checks that do and don't want to trigger lazy fetches, and a few such checks are converted using it. * jt/has_object: fsck: do not lazy fetch known non-promisor object pack-objects: no fetch when allow-{any,promisor} apply: do not lazy fetch when applying binary sha1-file: introduce no-lazy-fetch has_object()
2020-08-13Merge branch 'bc/sha-256-cvs-svn-updates'Libravatar Junio C Hamano1-1/+1
Portability fix. * bc/sha-256-cvs-svn-updates: git-cvsexportcommit: support Perl before 5.10.1
2020-08-13rebase -i: fix possibly wrong onto hash in todoLibravatar Antti Keränen2-2/+9
'todo_list_write_to_file' may overwrite the static buffer, originating from 'find_unique_abbrev', that was used to store the short commit hash 'c' for "# Rebase a..b onto c" message in the todo editor. This is because the buffer that is returned from 'find_unique_abbrev' is valid until 4 more calls to `find_unique_abbrev` are made. As 'todo_list_write_to_file' calls 'find_unique_abbrev' for each rebased commit, the hash for 'c' is overwritten if there are 4 or more commits in the rebase. This behavior has been broken since its introduction. Fix by storing the short onto commit hash in a different buffer that remains valid, before calling 'todo_list_write_to_file'. Found-by: Jussi Keränen <jussike@gmail.com> Signed-off-by: Antti Keränen <detegr@rbx.email> Acked-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13userdiff: improve Fortran xfuncname regexLibravatar Philippe Blain2-2/+1
The third part of the Fortran xfuncname regex wants to match the beginning of a subroutine or function, so it allows for all characters except `'`, `"` or whitespace before the keyword 'function' or 'subroutine'. This is meant to match the 'recursive', 'elemental' or 'pure' keywords, as well as function return types, and to prevent matches inside strings. However, the negated set does not contain the `!` comment character, so a line with an end-of-line comment containing the keyword 'function' or 'subroutine' followed by another word is mistakenly chosen as a hunk header. Improve the regex by adding `!` to the negated set. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13userdiff: add tests for Fortran xfuncname regexLibravatar Philippe Blain11-0/+100
The Fortran userdiff patterns, introduced in 909a5494f8 (userdiff.c: add builtin fortran regex patterns, 2010-09-10), predate the test infrastructure for xfuncname patterns, introduced in bfa7d01413 (t4018: an infrastructure to test hunk headers, 2014-03-21). Add tests for the Fortran xfuncname patterns. The test 't/t4018/fortran-comment-keyword' documents a shortcoming of the regex that is fixed in a subsequent commit. While at it, add descriptive comments for the different parts of the regex. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13fetch, pull doc: correct description of '--set-upstream'Libravatar Philippe Blain1-1/+1
The '--set-upstream' option to `git fetch` (which is also accepted by `git pull` and passed through to the underlying `git fetch`) allows setting the upstream configuration for the current branch. This was added in 24bc1a1292 (pull, fetch: add --set-upstream option, 2019-08-19). However, the documentation for that option describes its action as 'If the remote is fetched successfully, pull and add upstream (tracking) reference [...]', which is wrong because this option does not cause neither `git fetch` nor `git pull` to pull: `git fetch` does not pull and `git pull` always pulls. Fix the description of that option. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13docs: commit-graph: fix some whitespace in the diagramLibravatar Johannes Berg1-3/+3
In the merge diagram, some whitespace is missing which makes it a bit confusing, fix that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13blame: only coalesce lines that are adjacent in resultLibravatar Jeff King2-0/+10
After blame has finished but before we produce any output, we coalesce groups of lines that were adjacent in the original suspect (which may have been split apart by lines in intermediate commits which went away). However, this can cause incorrect output if the lines are not also adjacent in the result. For instance, the case in t8003 has: ABC DEF which becomes ABC SPLIT DEF Blaming only lines 1 and 3 in the result yields two blame groups (one for each line) that were adjacent in the original. That's enough for us to coalesce them into a single group, but that loses information: our output routines assume they're adjacent in the result as well, and we output: <oid> 1) ABC <oid> 2) SPLIT This is nonsense for two reasons: - we were asked about line 3, not line 2; we should not output the SPLIT line at all - commit <oid> did not touch the SPLIT line at all! We found the correct blame for line 3, but the bug is actually in the output stage, which is showing the wrong line number and content from the final file. We can fix this by only coalescing when both the suspect and result lines are adjacent. That fixes this bug, but keeps coalescing in cases where want it (e.g., the existing test in t8003 where SPLIT goes away, and the lines really are adjacent in the result). Reported-by: Nuthan Munaiah <nm6061@rit.edu> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13t8003: factor setup out of coalesce testLibravatar Jeff King1-6/+10
In preparation for adding more tests of blame's coalesce code, let's split the setup out from the first test, and give each of the commits a more meaningful name: - $orig for the original source that added the lines - $split for the version where they are split apart - $final for the final version that re-joins them That's not strictly necessary, but makes the follow-on tests less brittle than relying on HEAD^, etc, to name the commits. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13t8003: check output of coalesced blameLibravatar Jeff King1-7/+4
Commit f0cbe742f4 (blame: add a test to cover blame_coalesce(), 2019-06-20) added a test case where blame can usefully coalesce two groups of lines. But since it relies on the normal blame output, it only exercises the code and can't tell whether the lines were actually joined into a single group. However, by using --porcelain output, we can see how git-blame considers the groupings (and likewise how the coalescing might have a real user-visible impact for a tool that uses the porcelain-output groupings). This lets us confirm that we are indeed coalescing correctly (and the fact that this test case requires coalescing can be verified by dropping the call to blame_coalesce(), causing the test to fail). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-12rebase: remove unused function reschedule_last_actionLibravatar René Scharfe1-10/+0
The only caller of reschedule_last_action was removed by ef64bb328df (rebase: strip unused code in git-rebase--preserve-merges.sh, 2018-05-28); remove this unused shell function as well. Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-11Sixth batchLibravatar Junio C Hamano1-0/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-11Merge branch 'ss/cmake-build'Libravatar Junio C Hamano2-15/+1024
CMake support to build with MSVC for Windows bypassing the Makefile. * ss/cmake-build: ci: modification of main.yml to use cmake for vs-build job cmake: support for building git on windows with msvc and clang. cmake: support for building git on windows with mingw cmake: support for testing git when building out of the source tree cmake: support for testing git with ctest cmake: installation support for git cmake: generate the shell/perl/python scripts and templates, translations Introduce CMake support for configuring Git
2020-08-11Merge branch 'tb/upload-pack-filters'Libravatar Junio C Hamano5-0/+184
The component to respond to "git fetch" request is made more configurable to selectively allow or reject object filtering specification used for partial cloning. * tb/upload-pack-filters: t5616: use test_i18ngrep for upload-pack errors upload-pack.c: introduce 'uploadpackfilter.tree.maxDepth' upload-pack.c: allow banning certain object filter(s) list_objects_filter_options: introduce 'list_object_filter_config_name'
2020-08-11Merge branch 'es/worktree-doc-cleanups'Libravatar Junio C Hamano1-61/+62
Doc cleanup around "worktree". * es/worktree-doc-cleanups: git-worktree.txt: link to man pages when citing other Git commands git-worktree.txt: make start of new sentence more obvious git-worktree.txt: fix minor grammatical issues git-worktree.txt: consistently use term "working tree" git-worktree.txt: employ fixed-width typeface consistently
2020-08-11Merge branch 'bc/sha-256-part-3'Libravatar Junio C Hamano74-351/+633
The final leg of SHA-256 transition. * bc/sha-256-part-3: (39 commits) t: remove test_oid_init in tests docs: add documentation for extensions.objectFormat ci: run tests with SHA-256 t: make SHA1 prerequisite depend on default hash t: allow testing different hash algorithms via environment t: add test_oid option to select hash algorithm repository: enable SHA-256 support by default setup: add support for reading extensions.objectformat bundle: add new version for use with SHA-256 builtin/verify-pack: implement an --object-format option http-fetch: set up git directory before parsing pack hashes t0410: mark test with SHA1 prerequisite t5308: make test work with SHA-256 t9700: make hash size independent t9500: ensure that algorithm info is preserved in config t9350: make hash size independent t9301: make hash size independent t9300: use $ZERO_OID instead of hard-coded object ID t9300: abstract away SHA-1-specific constants t8011: make hash size independent ...
2020-08-11t/t4013: add test for --diff-merges=offLibravatar Sergey Organov3-0/+158
Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-11doc/git-log: describe --diff-merges=offLibravatar Sergey Organov1-1/+5
Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-11revision: change "--diff-merges" option to require parameterLibravatar Sergey Organov1-1/+8
--diff-merges=off is the only accepted form for now, a synonym for --no-diff-merges. This patch is a preparation for adding more values, as well as supporting --diff-merges=<parent>, where <parent> is single parent number to output diff against. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-11t1416: avoid hard-coded sha1 idsLibravatar Jeff King1-2/+3
The test added by e5256c82e5 (refs: fix interleaving hook calls with reference-transaction hook, 2020-08-07) uses hard-coded sha1 object ids in its expected output. This causes it to fail when run with GIT_TEST_DEFAULT_HASH=sha256. Let's make use of the oid variables we define earlier, as the rest of the nearby tests do. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>