summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-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-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
2023-07-27Merge branch 'jc/transport-parseopt-fix'Junio C Hamano
Command line parser fixes. * jc/transport-parseopt-fix: fetch: reject --no-ipv[46] parse-options: introduce OPT_IPVERSION()
2023-07-27Merge branch 'jc/gitignore-doc-pattern-markup'Junio C Hamano
Doc mark-up update. * jc/gitignore-doc-pattern-markup: gitignore.txt: mark up explanation of patterns consistently
2023-07-27SubmittingPatches: use of older maintenance tracks is an exceptionJunio C Hamano
While we could technically fix each and every bug on top of the commit that introduced it, it is not necessarily practical. For trivial and low-value bugfixes, it often is simpler and sufficient to just fix it in the current maintenance track, leaving the bug unfixed in the older maintenance tracks. Demote the "use older maintenance track to fix old bugs" as a side note, and explain that the choice is used only in exceptional cases. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-27SubmittingPatches: explain why 'next' and above are inappropriate baseJunio C Hamano
The 'next' branch is primarily meant to be a testing ground to make sure that topics that are reasonably well done work well together. Building a new work on it would mean everything that was already in 'next' must have graduated to 'master' before the new work can also be merged to 'master', and that is why we do not encourage basing new work on 'next'. Helped-by: Linus Arver <linusa@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-26t2400: rewrite regex to avoid unintentional PCREJacob Abel
Replace all cases of `\s` with ` ` as it is not part of POSIX BRE or ERE and therefore not all versions of grep handle it. For the same reason all cases of `\S` are replaced with `[^ ]`. It is not an exact replacement but it is close enough for this use case. Also, do not write `\+` in BRE and expect it to mean 1 or more; it is a GNU extension that may not work everywhere. Remove `.*` from the end of a pattern that is not right-anchored. Signed-off-by: Jacob Abel <jacobabel@nullpo.dev> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-26builtin/worktree.c: convert tab in advice to spaceJacob Abel
Signed-off-by: Jacob Abel <jacobabel@nullpo.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-26t2400: drop no-op `--sq` from rev-parse callJacob Abel
Signed-off-by: Jacob Abel <jacobabel@nullpo.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-26The fifteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-26Merge branch 'jc/branch-parseopt-fix'Junio C Hamano
Command line parser fixes. * jc/branch-parseopt-fix: branch: reject "--no-all" and "--no-remotes" early
2023-07-26Merge branch 'jc/am-parseopt-fix'Junio C Hamano
Code simplification. * jc/am-parseopt-fix: am: simplify parsing of "--[no-]keep-cr"
2023-07-26Merge branch 'rs/ls-tree-no-full-name-fix'Junio C Hamano
Command line parser fix. * rs/ls-tree-no-full-name-fix: ls-tree: fix --no-full-name
2023-07-26Merge branch 'jr/gitignore-doc-example-markup'Junio C Hamano
Doc update. * jr/gitignore-doc-example-markup: gitignore.txt: use backticks instead of double quotes
2023-07-26SubmittingPatches: choice of base for fixing an older maintenance trackJunio C Hamano
When working on an high-value bugfix that must be given to ancient maintenance tracks, a starting point that is older than `maint` may have to be chosen. Helped-by: Linus Arver <linusa@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-25doc: highlight that .gitmodules does not support !commandPetar Vutov
Bugfix for fc01a5d2 (submodule update documentation: don't repeat ourselves, 2016-12-27). The `custom command` and `none` options are described as sharing the same limitations, but one is allowed in .gitmodules and the other is not. Rewrite the description for custom commands to be more precise, and make it easier for readers to notice that custom commands cannot be used in the .gitmodules file. Signed-off-by: Petar Vutov <pvutov@imap.cc> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-25The fourteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-25Merge branch 'jk/nested-points-at'Junio C Hamano
"git tag --list --points-at X" showed tags that directly refers to object X, but did not list a tag that points at such a tag, which has been corrected. * jk/nested-points-at: ref-filter: simplify return type of match_points_at ref-filter: avoid parsing non-tags in match_points_at() ref-filter: avoid parsing tagged objects in match_points_at() ref-filter: handle nested tags in --points-at option
2023-07-25Merge branch 'rs/strbuf-addftime-simplify'Junio C Hamano
Code clean-up. * rs/strbuf-addftime-simplify: strbuf: use skip_prefix() in strbuf_addftime()
2023-07-25Merge branch 'rs/ref-filter-signature-fix'Junio C Hamano
Test fix. * rs/ref-filter-signature-fix: t6300: fix setup with GPGSSH but without GPG
2023-07-25Merge branch 'jk/unused-parameter'Junio C Hamano
Mark-up unused parameters in the code so that we can eventually enable -Wunused-parameter by default. * jk/unused-parameter: t/helper: mark unused callback void data parameters tag: mark unused parameters in each_tag_name_fn callbacks rev-parse: mark unused parameter in for_each_abbrev callback replace: mark unused parameter in each_mergetag_fn callback replace: mark unused parameter in ref callback merge-tree: mark unused parameter in traverse callback fsck: mark unused parameters in various fsck callbacks revisions: drop unused "opt" parameter in "tweak" callbacks count-objects: mark unused parameter in alternates callback am: mark unused keep_cr parameters http-push: mark unused parameter in xml callback http: mark unused parameters in curl callbacks do_for_each_ref_helper(): mark unused repository parameter test-ref-store: drop unimplemented reflog-expire command
2023-07-25Merge branch 'dk/bundle-i18n-more'Junio C Hamano
Update message mark-up for i18n in "git bundle". * dk/bundle-i18n-more: i18n: mark more bundle.c strings for translation
2023-07-25Merge branch 'mh/mingw-case-sensitive-build'Junio C Hamano
Names of MinGW header files are spelled in mixed case in some source files, but the build host can be using case sensitive filesystem with header files with their name spelled in all lowercase. * mh/mingw-case-sensitive-build: mingw: use lowercase includes for some Windows headers
2023-07-25Merge branch 'dk/t4002-syntaxo-fix'Junio C Hamano
Test fix. * dk/t4002-syntaxo-fix: t4002: fix "diff can read from stdin" syntax
2023-07-25Merge branch 'tb/object-access-overflow-protection'Junio C Hamano
Various offset computation in the code that accesses the packfiles and other data in the object layer has been hardened against arithmetic overflow, especially on 32-bit systems. * tb/object-access-overflow-protection: commit-graph.c: prevent overflow in `verify_commit_graph()` commit-graph.c: prevent overflow in `write_commit_graph()` commit-graph.c: prevent overflow in `merge_commit_graph()` commit-graph.c: prevent overflow in `split_graph_merge_strategy()` commit-graph.c: prevent overflow in `load_tree_for_commit()` commit-graph.c: prevent overflow in `fill_commit_in_graph()` commit-graph.c: prevent overflow in `fill_commit_graph_info()` commit-graph.c: prevent overflow in `load_oid_from_graph()` commit-graph.c: prevent overflow in add_graph_to_chain() commit-graph.c: prevent overflow in `write_commit_graph_file()` pack-bitmap.c: ensure that eindex lookups don't overflow midx.c: prevent overflow in `fill_included_packs_batch()` midx.c: prevent overflow in `write_midx_internal()` midx.c: store `nr`, `alloc` variables as `size_t`'s midx.c: prevent overflow in `nth_midxed_offset()` midx.c: prevent overflow in `nth_midxed_object_oid()` midx.c: use `size_t`'s for fanout nr and alloc packfile.c: use checked arithmetic in `nth_packed_object_offset()` packfile.c: prevent overflow in `load_idx()` packfile.c: prevent overflow in `nth_packed_object_id()`
2023-07-25Merge branch 'ah/advise-force-pushing'Junio C Hamano
Help newbies by suggesting that there are cases where force-pushing is a valid and sensible thing to update a branch at a remote repository, rather than reconciling with merge/rebase. * ah/advise-force-pushing: push: don't imply that integration is always required before pushing remote: don't imply that integration is always required before pushing wt-status: don't show divergence advice when committing
2023-07-24hex: retire get_sha1_hex()Junio C Hamano
The naming convention around get_sha1_hex() and its friends is awkward these days, after "struct object_id" was introduced. There are three public functions around this area: * get_sha1_hex() - use the implied the_hash_algo, fill uchar * * get_oid_hex() - use the implied the_hash_algo, fill oid * * get_oid_hex_algop() - use the passed algop, fill oid * Between the latter two, the "_algop" suffix signals whether the the_hash_algo is used as the implied algorithm or the caller should pass an algorithm explicitly. That is very much understandable and is a good convention. Between the former two, however, the "SHA1" vs "OID" in the names differentiate in what type of variable the result is stored. We could argue that it makes sense to use "SHA1" to mean "flat byte buffer" to honor the historical practice in the days before "struct object_id" was invented, but the natural fourth friend of the above group would take an algop and fill a flat byte buffer, and it would be strange to name it get_sha1_hex_algop(). Do we use the passed in algo, or are we limited to SHA-1 ;-)? In fact, such a function exists, albeit as a private helper function used by the implementation of these functions, and is named a lot more sensibly: get_hash_hex_algop(). Correct the misnomer of get_sha1_hex() and use "hash", instead of "sha1", as "flat byte buffer that stores binary (as opposed to hexadecimal) representation of the hash". The four (2x2) friends now become: * get_hash_hex() - use the implied the_hash_algo, fill uchar * * get_oid_hex() - use the implied the_hash_algo, fill oid * * get_hash_hex_algop() - use the passed algop, fill uchar * * get_oid_hex_algop() - use the passed algop, fill oid * As there are only two remaining calls to get_sha1_hex() in the codebase right now, the blast radious of this change is fairly small. Signed-off-by: Junio C Hamano <gitster@pobox.com>