summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-09Git 2.42-rc1v2.42.0-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-09Merge branch 'pw/rebase-skip-commit-message-fix'Junio C Hamano
"git rebase -i" with a series of squash/fixup, when one of the steps stopped in conflicts and ended up getting skipped, did not handle the accumulated commit log messages, which has been corrected. * pw/rebase-skip-commit-message-fix: rebase --skip: fix commit message clean up when skipping squash
2023-08-09Merge branch 'ma/locate-in-path-for-windows'Junio C Hamano
"git bisect visualize" stopped running "gitk" on Git for Windows when the command was reimplemented in C around Git 2.34 timeframe. This has been corrected. * ma/locate-in-path-for-windows: docs: update when `git bisect visualize` uses `gitk` compat/mingw: implement a native locate_in_PATH() run-command: conditionally define locate_in_PATH()
2023-08-09Merge branch 'bc/ignore-clangd-cache'Junio C Hamano
.gitignore update. * bc/ignore-clangd-cache: gitignore: ignore clangd .cache directory
2023-08-09Merge branch 'bc/ident-dot-is-no-longer-crud-letter'Junio C Hamano
Exclude "." from the set of characters to be removed from the beginning and the end of the human-readable name. * bc/ident-dot-is-no-longer-crud-letter: ident: don't consider '.' a crud
2023-08-09Merge branch 'ew/hash-with-openssl-evp'Junio C Hamano
Adjust to OpenSSL 3+, which deprecates its SHA-1 functions based on its traditional API, by using its EVP API instead. * ew/hash-with-openssl-evp: avoid SHA-1 functions deprecated in OpenSSL 3+ sha256: avoid functions deprecated in OpenSSL 3+
2023-08-07A few more topics before -rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-07mailmap: change primary address for Glen ChooGlen Choo
Glen will lose access to his work email soon. Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-07Merge branch 'ew/sha256-gcrypt-leak-fixes'Junio C Hamano
Leakfixes. * ew/sha256-gcrypt-leak-fixes: sha256/gcrypt: die on gcry_md_open failures sha256/gcrypt: fix memory leak with SHA-256 repos sha256/gcrypt: fix build with SANITIZE=leak
2023-08-07Merge branch 'rs/bundle-parseopt-cleanup'Junio C Hamano
Code clean-up. * rs/bundle-parseopt-cleanup: bundle: use OPT_PASSTHRU_ARGV
2023-08-07Merge branch 'am/doc-sha256'Junio C Hamano
Tone down the warning on SHA-256 repositories being an experimental curiosity. We do not have support for them to interoperate with traditional SHA-1 repositories, but at this point, we do not plan to make breaking changes to SHA-256 repositories and there is no longer need for such a strongly phrased warning. * am/doc-sha256: doc: sha256 is no longer experimental
2023-08-07Merge branch 'tb/commit-graph-tests'Junio C Hamano
Test updates. * tb/commit-graph-tests: t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()` t5328: avoid top-level directory changes t5318: avoid top-level directory changes t/lib-commit-graph.sh: avoid directory change in `graph_git_behavior()` t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directories
2023-08-04gitignore: ignore clangd .cache directorybrian m. carlson
In at least some versions of clangd, including version 15 in Ubuntu 23.04, a directory, .cache, is written in the root of the repository with index information about the files in the repository. Since clangd is the most common language server protocol (LSP) implementation for C, and we already support it using the GENERATE_COMPILATION_DATABASE flags to make it functional, it's likely many users are using or will want to use it. As a result, ignore the ".cache" directory to help avoid users accidentally committing the data. Signed-off-by: brian m. carlson <bk2204@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-04Git 2.42-rc0v2.42.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-04Merge branch 'jc/branch-in-use-error-message'Junio C Hamano
"git branch -f X" to repoint the branch X said that X was "checked out" in another worktree, even when branch X was not and instead being bisected or rebased. The message was reworded to say the branch was "in use". * jc/branch-in-use-error-message: branch: update the message to refuse touching a branch in-use
2023-08-04Merge branch 'hy/blame-in-bare-with-contents'Junio C Hamano
"git blame --contents=file" has been taught to work in a bare repository. * hy/blame-in-bare-with-contents: blame: allow --contents to work with bare repo
2023-08-04Merge branch 'jc/parse-options-short-help'Junio C Hamano
Command line parser fix, and a small parse-options API update. * jc/parse-options-short-help: short help: allow a gap smaller than USAGE_GAP remote: simplify "remote add --tags" help text short help: allow multi-line opthelp
2023-08-04Merge branch 'jc/doc-sent-patch-now-what'Junio C Hamano
Process document update. * jc/doc-sent-patch-now-what: MyFirstContribution: refrain from self-iterating too much
2023-08-04Merge branch 'la/doc-choose-starting-point-fixup'Junio C Hamano
Clarify how to pick a starting point for a new topic in the SubmittingPatches document. * la/doc-choose-starting-point-fixup: SubmittingPatches: use of older maintenance tracks is an exception SubmittingPatches: explain why 'next' and above are inappropriate base SubmittingPatches: choice of base for fixing an older maintenance track
2023-08-04Merge branch 'pv/doc-submodule-update-settings'Junio C Hamano
Rewrite the description of giving a custom command to the submodule.<name>.update configuration variable. * pv/doc-submodule-update-settings: doc: highlight that .gitmodules does not support !command
2023-08-04Merge branch 'ja/worktree-orphan-fix'Junio C Hamano
Fix tests with unportable regex patterns. * ja/worktree-orphan-fix: t2400: rewrite regex to avoid unintentional PCRE builtin/worktree.c: convert tab in advice to space t2400: drop no-op `--sq` from rev-parse call
2023-08-04Merge branch 'jc/retire-get-sha1-hex'Junio C Hamano
The implementation of "get_sha1_hex()" that reads a hexadecimal string that spells a full object name has been extended to cope with any hash function used in the repository, but the "sha1" in its name survived. Rename it to get_hash_hex(), a name that is more consistent within its friends like get_hash_hex_algop(). * jc/retire-get-sha1-hex: hex: retire get_sha1_hex()
2023-08-04Merge branch 'la/doc-choose-starting-point'Junio C Hamano
Clarify how to choose the starting point for a new topic in developer guidance document. * la/doc-choose-starting-point: SubmittingPatches: simplify guidance for choosing a starting point SubmittingPatches: emphasize need to communicate non-default starting points SubmittingPatches: de-emphasize branches as starting points SubmittingPatches: discuss subsystems separately from git.git SubmittingPatches: reword awkward phrasing
2023-08-04docs: update when `git bisect visualize` uses `gitk`Matthias Aßhauer
This check has involved more environment variables than just `DISPLAY` since 508e84a790 (bisect view: check for MinGW32 and MacOSX in addition to X11, 2008-02-14), so let's update the documentation accordingly. Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-03compat/mingw: implement a native locate_in_PATH()Matthias Aßhauer
since 5e1f28d (bisect--helper: reimplement `bisect_visualize()` shell function in C, 2021-09-13) `git bisect visualize` uses exists_in_PATH() to check wether it should call `gitk`, but exists_in_PATH() relies on locate_in_PATH() which currently only understands POSIX-ish PATH variables (a list of paths, separated by colons) on native Windows executables we encounter Windows PATH variables (a list of paths that often contain drive letters (and thus colons), separated by semicolons). Luckily we do already have a function that can lookup executables on windows PATHs: path_lookup(). Implement a small replacement for the existing locate_in_PATH() based on path_lookup(). Reported-by: Louis Strous <Louis.Strous@intellimagic.com> Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-03run-command: conditionally define locate_in_PATH()Matthias Aßhauer
This commit doesn't change any behaviour by itself, but allows us to easily define compat replacements for locate_in_PATH(). It prepares us for the next commit that adds a native Windows implementation of locate_in_PATH(). Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-03rebase --skip: fix commit message clean up when skipping squashPhillip Wood
During a series of "fixup" and/or "squash" commands, the interactive rebase accumulates a commit message from all the commits that are being squashed together. If one of the commits has conflicts when it is picked and the user chooses to skip that commit then we need to remove that commit's message from accumulated messages. To do this 15ef69314d5 (rebase --skip: clean up commit message after a failed fixup/squash, 2018-04-27) updated commit_staged_changes() to reset the accumulated message to the commit message of HEAD (which does not contain the message from the skipped commit) when the last command was "fixup" or "squash" and there are no staged changes. Unfortunately the code to do this contains two bugs. (1) If parse_head() fails we pass an invalid pointer to unuse_commit_buffer(). (2) The reconstructed message uses the entire commit buffer from HEAD including the headers, rather than just the commit message. The first issue is fixed by splitting up the "if" condition into several statements each with its own error handling. The second issue is fixed by finding the start of the commit message within the commit buffer using find_commit_subject(). The existing test added by 15ef69314d5 is modified to show the effect of this bug. The bug is triggered when skipping the first command in the chain (as the test does before this commit) but the effect is hidden because opts->current_fixup_count is set to zero which leads update_squash_messages() to recreate the squash message file from scratch overwriting the bad message created by commit_staged_changes(). The test is also updated to explicitly check the commit messages rather than relying on grep to ensure they do not contain any stray commit headers. To check the commit message the function test_commit_message() is moved from t3437-rebase-fixup-options.sh to test-lib.sh. As the function is now publicly available it is updated to provide better error detection and avoid overwriting the commonly used files "actual" and "expect". Support for reading the expected commit message from stdin is also added. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-02ident: don't consider '.' a crudbrian m. carlson
When we process a user's name (as in user.name), we strip all leading and trailing crud from it. Right now, we consider a dot a crud character, and strip it off. However, this is unsuitable for many personal names because humans frequently have abbreviated suffixes, such as "Jr." or "Sr." at the end of their names, and this corrupts them. Some other users may wish to use an abbreviated name or initial, which will pose a problem especially in cultures that write the family name first, followed by the personal name. Since the current approach causes lots of practical problems, let's avoid it by no longer considering a dot to be crud. Note that "." in the name forces the entire name to be quoted to please mailers, but stripping "." only at the beginning and the end does not help a name with "." in the middle (like "brian m. carlson") so this change will not make it much worse. A name like "Given Family, Jr." that did not have to be quoted now would need to be, in order to be placed on the e-mail headers, though. This is based on a weather-balloon patch by Jeff King sent in Aug 2021 https://lore.kernel.org/git/YSKm8Q8nyTavQaox@coredump.intra.peff.net/ Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-02The eighteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-02Documentation/RelNotes/2.42.0.txt: typofixTaylor Blau
Fix a typo introduced in aa9166bcc0 (The ninth batch, 2023-07-08). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-02Merge branch 'ks/ref-filter-describe'Junio C Hamano
"git branch --list --format=<format>" and friends are taught a new "%(describe)" placeholder. * ks/ref-filter-describe: ref-filter: add new "describe" atom ref-filter: add multiple-option parsing functions
2023-08-02Merge branch 'ah/sequencer-rewrite-todo-fix'Junio C Hamano
When the user edits "rebase -i" todo file so that it starts with a "fixup", which would make it invalid, the command truncated the rest of the file before giving an error and returning the control back to the user. Stop truncating to make it easier to correct such a malformed todo file. * ah/sequencer-rewrite-todo-fix: sequencer: finish parsing the todo list despite an invalid first line
2023-08-02Merge branch 'bb/use-trace2-counters-for-fsync-stats'Junio C Hamano
Instead of inventing a custom counter variables for debugging, use existing trace2 facility in the fsync customization codepath. * bb/use-trace2-counters-for-fsync-stats: wrapper: use trace2 counters to collect fsync stats
2023-08-02Merge branch 'ah/autoconf-fixes'Junio C Hamano
"./configure --with-expat=no" did not work as a way to refuse use of the expat library on a system with the library installed, which has been corrected. * ah/autoconf-fixes: configure.ac: always save NO_ICONV to config.status configure.ac: don't overwrite NO_CURL option configure.ac: don't overwrite NO_EXPAT option
2023-08-02Merge branch 'jc/tree-walk-drop-base-offset'Junio C Hamano
Code simplification. * jc/tree-walk-drop-base-offset: tree-walk: drop unused base_offset from do_match() tree-walk: lose base_offset that is never used in tree_entry_interesting
2023-08-01avoid SHA-1 functions deprecated in OpenSSL 3+Eric Wong
OpenSSL 3+ deprecates the SHA1_Init, SHA1_Update, and SHA1_Final functions, leading to errors when building with `DEVELOPER=1'. Use the newer EVP_* API with OpenSSL 3+ (only) despite being more error-prone and less efficient due to heap allocations. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-01sha256: avoid functions deprecated in OpenSSL 3+Eric Wong
OpenSSL 3+ deprecates the SHA256_Init, SHA256_Update, and SHA256_Final functions, leading to errors when building with `DEVELOPER=1'. Use the newer EVP_* API with OpenSSL 3+ despite being more error-prone and less efficient due to heap allocations. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-31doc: sha256 is no longer experimentalAdam Majer
Remove scary wording that basically stops people using sha256 repositories not because of interoperability issues with sha1 repositories, but from fear that their work will suddenly become incompatible in some future version of git. We should be clear that currently sha256 repositories will not work with sha1 repositories but stop the scary words. Signed-off-by: Adam Majer <adamm@zombino.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-31sha256/gcrypt: die on gcry_md_open failuresEric Wong
`gcry_md_open' allocates memory and must (like all allocation functions) be checked for failure. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-31sha256/gcrypt: fix memory leak with SHA-256 reposEric Wong
`gcry_md_open' needs to be paired with `gcry_md_close' to ensure resources are released. Since our internal APIs don't have separate close/release callbacks, sticking it into the finalization callback seems appropriate. Building with SANITIZE=leak and running `git fsck' on a SHA-256 repository no longer reports leaks. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-31sha256/gcrypt: fix build with SANITIZE=leakEric Wong
Non-static functions cause `undefined reference' errors when building with `SANITIZE=leak' due to the lack of prototypes. Mark all these functions as `static inline' as we do in sha256/nettle.h to avoid the need to maintain prototypes. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-31bundle: use OPT_PASSTHRU_ARGVRené Scharfe
"git bundle" passes the progress control options to "git pack-objects" by parsing and then recreating them explicitly. Simplify that process by using OPT_PASSTHRU_ARGV instead. This also fixes --no-quiet, which has been doing the same as --quiet since its introduction by 79862b6b77 (bundle-create: progress output control, 2019-11-10) because it had been defined using OPT_SET_INT with a value of 0, which sets 0 when negated as well. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-28The seventeenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-28Merge branch 'rs/pack-objects-parseopt-fix'Junio C Hamano
Command line parser fix. * rs/pack-objects-parseopt-fix: pack-objects: fix --no-quiet pack-objects: fix --no-keep-true-parents
2023-07-28Merge branch 'rs/describe-parseopt-fix'Junio C Hamano
Command line parser fix. * rs/describe-parseopt-fix: describe: fix --no-exact-match
2023-07-28Merge branch 'bb/trace2-comment-fix'Junio C Hamano
In-code comment fix. * bb/trace2-comment-fix: trace2: fix a comment
2023-07-27MyFirstContribution: refrain from self-iterating too muchJunio C Hamano
Finding mistakes in and improving your own patches is a good idea, but doing so too quickly is being inconsiderate to reviewers who have just seen the initial iteration and taking their time to review it. Encourage new developers to perform such a self review before they send out their patches, not after. After sending a patch that they immediately found mistakes in, they are welcome to comment on them, mentioning what and how they plan to improve them in an updated version, before sending out their updates. Helped-by: Torsten Bögershausen <tboegi@web.de> Helped-by: Linus Arver <linusa@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-27The sixteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-27Merge branch 'jc/parse-options-reset'Junio C Hamano
Command line parser fix. * jc/parse-options-reset: reset: reject --no-(mixed|soft|hard|merge|keep) option
2023-07-27Merge branch 'jc/parse-options-show-branch'Junio C Hamano
Command line parser fixes. * jc/parse-options-show-branch: show-branch: reject --[no-](topo|date)-order show-branch: --no-sparse should give dense output