summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-02-21rebase -i: check labels and refs when parsing todo listPhillip Wood2-1/+61
Check that the argument to the "label" and "update-ref" commands is a valid refname when the todo list is parsed rather than waiting until the command is executed. This means that the user can deal with any errors at the beginning of the rebase rather than having it stop halfway through due to a typo in a label name. The "update-ref" command is changed to reject single level refs as it is all to easy to type "update-ref branch" which is incorrect rather than "update-ref refs/heads/branch" Note that it is not straight forward to check the arguments to "reset" and "merge" commands as they may be any revision, not just a refname and we do not have an equivalent of check_refname_format() for revisions. Helped-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Acked-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-21delta-islands: fix segfault when freeing island marksPatrick Steinhardt2-5/+23
In 647982bb71 (delta-islands: free island_marks and bitmaps, 2023-02-03) we have introduced logic to free `island_marks` in order to reduce heap memory usage in git-pack-objects(1). This commit is causing segfaults in the case where this Git command does not load delta islands at all, e.g. when reading object IDs from standard input. One such crash can be hit when using repacking multi-pack-indices with delta islands enabled. The root cause of this bug is that we unconditionally dereference the `island_marks` variable even in the case where it is a `NULL` pointer, which is fixed by making it conditional. Note that we still leave the logic in place to set the pointer to `-1` to detect use-after-free bugs even when there are no loaded island marks at all. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-18archive: add --mtimeRené Scharfe4-0/+32
Allow users to specify the modification time of archive entries. The new option --mtime uses approxidate() to parse a time specification and overrides the default of using the current time for trees and the commit time for tags and commits. It can be used to create a reproducible archive for a tree, or to use a specific mtime without creating a commit with GIT_COMMITTER_DATE set. This implementation doesn't support the negated form of the new option, i.e. --no-mtime is not accepted. It is not possible to have no mtime at all. We could use the Unix epoch or revert to the default behavior, but since negation is not necessary for the intended use it's left undecided for now. Requested-by: Raul E Rangel <rrangel@chromium.org> Suggested-by: demerphq <demerphq@gmail.com> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-17format.attach: allow empty value to disable multi-part messagesJunio C Hamano3-1/+22
When a lower precedence configuration file (e.g. /etc/gitconfig) defines format.attach in any way, there was no way to disable it in a more specific configuration file (e.g. $HOME/.gitconfig). Change the behaviour of setting it to an empty string. It used to mean that the result is still a multipart message with only dashes used as a multi-part separator, but now it resets the setting to the default (which would be to give an inline patch, unless other command line options are in effect). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-16t0066: drop setup of "dir5"Jeff King1-8/+2
The symlink setup in t0066 makes several directories with links, dir4 through dir6. But ever since dir5 was introduced in fa1da7d2ee (dir-iterator: add flags parameter to dir_iterator_begin, 2019-07-10), it has never actually been used. It was left over from an earlier iteration of the patch which tried to handle recursive symlinks specially, as seen in: https://lore.kernel.org/git/20190502144829.4394-7-matheus.bernardino@usp.br/ It's not hurting any of the existing tests to be there, but the extra setup is confusing to anybody trying to read and understand the tests. Let's drop the extra directory, and we'll rename "dir6" to "dir5" so nobody wonders whether the gap in naming is important. Helped-by: Matheus Tavares Bernardino <matheus.tavb@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-16add basic http proxy testsJeff King4-0/+65
We do not test our http proxy functionality at all in the test suite, so this is a pretty big blind spot. Let's at least add a basic check that we can go through an authenticating proxy to perform a clone. A few notes on the implementation: - I'm using a single apache instance to proxy to itself. This seems to work fine in practice, and we can check with a test that this rather unusual setup is doing what we expect. - I've put the proxy tests into their own script, and it's the only one which loads the apache proxy config. If any platform can't handle this (e.g., doesn't have the right modules), the start_httpd step should fail and gracefully skip the rest of the script (but all the other http tests in existing scripts will continue to run). - I used a separate passwd file to make sure we don't ever get confused between proxy and regular auth credentials. It's using the antiquated crypt() format. This is a terrible choice security-wise in the modern age, but it's what our existing passwd file uses, and should be portable. It would probably be reasonable to switch both of these to bcrypt, but we can do that in a separate patch. - On the client side, we test two situations with credentials: when they are present in the url, and when the username is present but we prompt for the password. I think we should be able to handle the case that _neither_ is present, but an HTTP 407 causes us to prompt for them. However, this doesn't seem to work. That's either a bug, or at the very least an opportunity for a feature, but I punted on it for now. The point of this patch is just getting basic coverage, and we can explore possible deficiencies later. - this doesn't work with LIB_HTTPD_SSL. This probably would be valuable to have, as https over an http proxy is totally different (it uses CONNECT to tunnel the session). But adding in mod_proxy_connect and some basic config didn't seem to work for me, so I punted for now. Much of the rest of the test suite does not currently work with LIB_HTTPD_SSL either, so we shouldn't be making anything much worse here. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-16dir-iterator: drop unused `DIR_ITERATOR_FOLLOW_SYMLINKS`Taylor Blau4-66/+6
The `FOLLOW_SYMLINKS` flag was added to the dir-iterator API in fa1da7d2ee (dir-iterator: add flags parameter to dir_iterator_begin, 2019-07-10) in order to follow symbolic links while traversing through a directory. `FOLLOW_SYMLINKS` gained its first caller in ff7ccc8c9a (clone: use dir-iterator to avoid explicit dir traversal, 2019-07-10), but it was subsequently removed in 6f054f9fb3 (builtin/clone.c: disallow `--local` clones with symlinks, 2022-07-28). Since then, we've held on to the code for `DIR_ITERATOR_FOLLOW_SYMLINKS` in the name of making minimally invasive changes during a security embargo. In fact, we even changed the dir-iterator API in bffc762f87 (dir-iterator: prevent top-level symlinks without FOLLOW_SYMLINKS, 2023-01-24) without having any non-test callers of that flag. Now that we're past those security embargo(s), let's finalize our cleanup of the `DIR_ITERATOR_FOLLOW_SYMLINKS` code and remove its implementation since there are no remaining callers. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-16test-genzeros: avoid raw write(2)Junio C Hamano1-5/+6
This test helper feeds 256kB of data at once to a single invocation of the write(2) system call, which may be too much for some platforms. Call our xwrite() wrapper that knows to honor MAX_IO_SIZE limit and cope with short writes due to EINTR instead, and die a bit more loudly by calling die_errno() when xwrite() indicates an error. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15rev-list: clarify git-log default date formatJunio C Hamano1-5/+5
The documentation mistakenly said that the default format was similar to RFC 2822 format and tried to specify it by enumerating differences, which had two problems: * There are some more differences from the 2822 format that are not mentioned; worse yet * The default format is not modeled after RFC 2822 format at all. As can be seen in f80cd783 (date.c: add "show_date()" function., 2005-05-06), it is a derivative of ctime(3) format. Stop saying that it is similar to RFC 2822, and rewrite the description to explain the format without requiring the reader to know any other format. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15The sixteenth batchJunio C Hamano1-33/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15Merge branch 'cw/doc-pushurl-vs-url'Junio C Hamano2-1/+11
Doc update. * cw/doc-pushurl-vs-url: Documentation: clarify multiple pushurls vs urls
2023-02-15Merge branch 'ab/config-h-remove-unused'Junio C Hamano1-9/+0
Code clean-up. * ab/config-h-remove-unused: config.h: remove unused git_configset_add_parameters()
2023-02-15Merge branch 'ab/retire-scripted-add-p'Junio C Hamano19-2023/+50
Finally retire the scripted "git add -p/-i" implementation and have everybody use the one reimplemented in C. * ab/retire-scripted-add-p: docs & comments: replace mentions of "git-add--interactive.perl" add API: remove run_add_interactive() wrapper function add: remove "add.interactive.useBuiltin" & Perl "git add--interactive"
2023-02-15Merge branch 'rs/size-t-fixes'Junio C Hamano3-16/+16
Type fixes. * rs/size-t-fixes: pack-objects: use strcspn(3) in name_cmp_len() read-cache: use size_t for {base,df}_name_compare()
2023-02-15Merge branch 'kf/t5000-modernise'Junio C Hamano1-5/+5
Test clean-up. * kf/t5000-modernise: t5000: modernise archive and :(glob) test
2023-02-15Merge branch 'wl/new-command-doc'Junio C Hamano1-2/+2
Comment fix. * wl/new-command-doc: new-command.txt: update reference to builtin docs
2023-02-15Merge branch 'ar/userdiff-java-update'Junio C Hamano16-2/+95
Userdiff regexp update for Java language. * ar/userdiff-java-update: userdiff: support Java sealed classes userdiff: support Java record types userdiff: support Java type parameters
2023-02-15Merge branch 'po/attributes-text'Junio C Hamano1-11/+11
In-tree .gitattributes update to match the way we recommend our users to mark a file as text. * po/attributes-text: .gitattributes: include `text` attribute for eol attributes
2023-02-15Merge branch 'ab/sequencer-unleak'Junio C Hamano23-33/+61
Plug leaks in sequencer subsystem and its users. * ab/sequencer-unleak: commit.c: free() revs.commit in get_fork_point() builtin/rebase.c: free() "options.strategy_opts" sequencer.c: always free() the "msgbuf" in do_pick_commit() builtin/rebase.c: fix "options.onto_name" leak builtin/revert.c: move free-ing of "revs" to replay_opts_release() sequencer API users: fix get_replay_opts() leaks sequencer.c: split up sequencer_remove_state() rebase: use "cleanup" pattern in do_interactive_rebase()
2023-02-15Merge branch 'ds/bundle-uri-5'Junio C Hamano13-57/+1149
The bundle-URI subsystem adds support for creation-token heuristics to help incremental fetches. * ds/bundle-uri-5: bundle-uri: test missing bundles with heuristic bundle-uri: store fetch.bundleCreationToken fetch: fetch from an external bundle URI bundle-uri: drop bundle.flag from design doc clone: set fetch.bundleURI if appropriate bundle-uri: download in creationToken order bundle-uri: parse bundle.<id>.creationToken values bundle-uri: parse bundle.heuristic=creationToken t5558: add tests for creationToken heuristic bundle: verify using check_connected() bundle: test unbundling with incomplete history
2023-02-15Merge branch 'cb/grep-fallback-failing-jit'Junio C Hamano1-2/+48
In an environment where dynamically generated code is prohibited to run (e.g. SELinux), failure to JIT pcre patterns is expected. Fall back to interpreted execution in such a case. * cb/grep-fallback-failing-jit: grep: fall back to interpreter if JIT memory allocation fails
2023-02-15gpg: do show gpg's error message upon failureJohannes Schindelin2-3/+15
There are few things more frustrating when signing a commit fails than reading a terse "error: gpg failed to sign the data" message followed by the unsurprising "fatal: failed to write commit object" message. In many cases where signing a commit or tag fails, `gpg` actually said something helpful, on its stderr, and Git even consumed that, but then keeps mum about it. Teach Git to stop withholding that rather important information. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15t7510: add a test case that does not need gpgJohannes Schindelin1-0/+36
This test case not only increases test coverage in setups without working gpg, but also prepares for verifying that the error message of `gpg.program` is shown upon failure. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15shorten_unambiguous_ref(): avoid sscanf()Jeff King2-35/+77
To shorten a fully qualified ref (e.g., taking "refs/heads/foo" to just "foo"), we munge the usual lookup rules ("refs/heads/%.*s", etc) to drop the ".*" modifier (so "refs/heads/%s"), and then use sscanf() to match that against the refname, pulling the "%s" content into a separate buffer. This has a few downsides: - sscanf("%s") reportedly misbehaves on macOS with some input and locale combinations, returning a partial or garbled string. See this thread: https://lore.kernel.org/git/CAGF3oAcCi+fG12j-1U0hcrWwkF5K_9WhOi6ZPHBzUUzfkrZDxA@mail.gmail.com/ - scanf's matching of "%s" is greedy. So the "refs/remotes/%s/HEAD" rule would never pull "origin" out of "refs/remotes/origin/HEAD". Instead it always produced "origin/HEAD", which is redundant with the "refs/remotes/%s" rule. - scanf in general is an error-prone interface. For example, scanning for "%s" will copy bytes into a destination string, which must have been correctly sized ahead of time to avoid a buffer overflow. In this case, the code is OK (the buffer is pessimistically sized to match the original string, which should give us a maximum). But in general, we do not want to encourage people to use scanf at all. So instead, let's note that our lookup rules are not arbitrary format strings, but all contain exactly one "%.*s" placeholder. We already rely on this, both for lookup (we feed the lookup format along with exactly one int/ptr combo to snprintf, etc) and for shortening (we munge "%.*s" to "%s", and then insist that sscanf() finds exactly one result). We can parse this manually by just matching the bytes that occur before and after the "%.*s" placeholder. While we have a few extra lines of parsing code, the result is arguably simpler, as can skip the preprocessing step and its tricky memory management entirely. The in-code comments should explain the parsing strategy, but there's one subtle change here. The original code allocated a single buffer, and then overwrote it in each loop iteration, since that's the only option sscanf() gives us. But our parser can actually return a ptr/len combo for the matched string, which is all we need (since we just feed it back to the lookup rules with "%.*s"), and then copy it only when returning to the caller. There are a few new tests here, all using symbolic-ref (the code can be triggered in many ways, but symrefs are convenient in that we don't need to create a real ref, which avoids any complications from the filesystem munging the name): - the first covers the real-world case which misbehaved on macOS. Setting LC_ALL is required to trigger the problem there (since otherwise our tests use LC_ALL=C), and hopefully is at worst simply ignored on other systems (and doesn't cause libc to complain, etc, on systems without that locale). - the second covers the "origin/HEAD" case as discussed above, which is now fixed - the remainder are for "weird" cases that work both before and after this patch, but would be easy to get wrong with off-by-one problems in the parsing (and came out of discussions and earlier iterations of the patch that did get them wrong). - absent here are tests of boring, expected-to-work cases like "refs/heads/foo", etc. Those are covered all over the test suite both explicitly (for-each-ref's refname:short) and implicitly (in the output of git-status, etc). Reported-by: 孟子易 <mengziyi540841@gmail.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15shorten_unambiguous_ref(): use NUM_REV_PARSE_RULES constantJeff King1-14/+8
The ref_rev_parse_rules[] array is terminated with a NULL entry, and we count it and store the result in the local nr_rules variable. But we don't need to do so; since the array is a constant, we can compute its size directly. The original code probably didn't do that because it was written as part of for-each-ref, and saw the array only as a pointer. It was migrated in 7c2b3029df (make get_short_ref a public function, 2009-04-07) and could have been updated then, but that subtlety was not noticed. We even have a constant that represents this value already, courtesy of 60650a48c0 (remote: make refspec follow the same disambiguation rule as local refs, 2018-08-01), though again, nobody noticed at the time that it could be used here, too. The current count-up isn't a big deal, as we need to preprocess that array anyway. But it will become more cumbersome as we refactor the shortening code. So let's get rid of it and just use the constant everywhere. Note that there are two things here that aren't just simple text replacements: 1. We also use nr_rules to see if a previous call has initialized the static pre-processing variables. We can just use the scanf_fmts pointer to do the same thing, as it is non-NULL only after we've done that initialization. 2. If nr_rules is zero after we've counted it up, we bail from the function. This code is unreachable, though, as the set of rules is hard-coded and non-empty. And that becomes even more apparent now that we are using the constant. So we can drop this conditional completely (and ironically, the code would have the same output if it _did_ trigger, as we'd simply skip the loop entirely and return the whole refname). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-15shorten_unambiguous_ref(): avoid integer truncationJeff King1-2/+3
We parse the shortened name "foo" out of the full refname "refs/heads/foo", and then assign the result of strlen(short_name) to an int, which may truncate or wrap to negative. In practice, this should never happen, as it requires a 2GB refname. And even somebody trying to do something malicious should at worst end up with a confused answer (we use the size only to feed back as a placeholder length to strbuf_addf() to see if there are any collisions in the lookup rules). And it may even be impossible to trigger this, as we parse the string with sscanf(), and stdio formatting functions are not known for handling large strings well. I didn't test, but I wouldn't be surprised if sscanf() on many platforms simply reports no match here. But even if it is not a problem in practice so far, it is worth fixing for two reasons: 1. We'll shortly be replacing the sscanf() call with a real parser which will handle arbitrary-sized strings. 2. Assigning strlen() to an int is an anti-pattern that requires people to look twice when auditing for real overflow problems. So we'll make this a size_t. Unfortunately we still have to cast to int eventually for the strbuf_addf() call, but at least we can localize the cast there, and check that it will be valid. I used our new cast helper here, which will just bail completely. That should be OK, as anybody with a 2GB refname is up to no good, but if we really wanted to, we could detect it manually and just refuse to shorten the refname. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-14Sync with 'maint'Junio C Hamano1-0/+58
2023-02-14Prepare for 2.39.3 just in caseJunio C Hamano3-2/+60
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-14Merge branch 'sk/remove-duplicate-includes' into maint-2.39Junio C Hamano3-3/+0
Code clean-up. * sk/remove-duplicate-includes: git: remove duplicate includes
2023-02-14Merge branch 'rs/clarify-error-in-write-loose-object' into maint-2.39Junio C Hamano1-9/+2
Code clean-up. * rs/clarify-error-in-write-loose-object: object-file: inline write_buffer()
2023-02-14Merge branch 'rs/reflog-expiry-cleanup' into maint-2.39Junio C Hamano1-1/+3
Code clean-up. * rs/reflog-expiry-cleanup: reflog: clear leftovers in reflog_expiry_cleanup()
2023-02-14Merge branch 'rs/clear-commit-marks-cleanup' into maint-2.39Junio C Hamano1-2/+4
Code clean-up. * rs/clear-commit-marks-cleanup: commit: skip already cleared parents in clear_commit_marks_1()
2023-02-14Merge branch 'rs/am-parse-options-cleanup' into maint-2.39Junio C Hamano1-1/+11
Code clean-up. * rs/am-parse-options-cleanup: am: don't pass strvec to apply_parse_options()
2023-02-14Merge branch 'jk/server-supports-v2-cleanup' into maint-2.39Junio C Hamano3-16/+20
Code clean-up. * jk/server-supports-v2-cleanup: server_supports_v2(): use a separate function for die_on_error
2023-02-14Merge branch 'jk/unused-post-2.39' into maint-2.39Junio C Hamano30-108/+90
Code clean-up around unused function parameters. * jk/unused-post-2.39: userdiff: mark unused parameter in internal callback list-objects-filter: mark unused parameters in virtual functions diff: mark unused parameters in callbacks xdiff: mark unused parameter in xdl_call_hunk_func() xdiff: drop unused parameter in def_ff() ws: drop unused parameter from ws_blank_line() list-objects: drop process_gitlink() function blob: drop unused parts of parse_blob_buffer() ls-refs: use repository parameter to iterate refs
2023-02-14Merge branch 'rj/branch-copy-and-rename' into maint-2.39Junio C Hamano2-3/+13
Fix a pair of bugs in 'git branch'. * rj/branch-copy-and-rename: branch: force-copy a branch to itself via @{-1} is a no-op
2023-02-14Merge branch 'rs/t3920-crlf-eating-grep-fix' into maint-2.39Junio C Hamano1-1/+1
Test fix. * rs/t3920-crlf-eating-grep-fix: t3920: support CR-eating grep
2023-02-14Merge branch 'js/t3920-shell-and-or-fix' into maint-2.39Junio C Hamano1-1/+1
Test fix. * js/t3920-shell-and-or-fix: t3920: don't ignore errors of more than one command with `|| true`
2023-02-14Merge branch 'ab/t4023-avoid-losing-exit-status-of-diff' into maint-2.39Junio C Hamano1-6/+6
Test fix. * ab/t4023-avoid-losing-exit-status-of-diff: t4023: fix ignored exit codes of git
2023-02-14Merge branch 'ab/t7600-avoid-losing-exit-status-of-git' into maint-2.39Junio C Hamano1-1/+1
Test fix. * ab/t7600-avoid-losing-exit-status-of-git: t7600: don't ignore "rev-parse" exit code in helper
2023-02-14Merge branch 'ab/t5314-avoid-losing-exit-status' into maint-2.39Junio C Hamano1-7/+10
Test fix. * ab/t5314-avoid-losing-exit-status: t5314: check exit code of "git"
2023-02-14Merge branch 'rs/plug-pattern-list-leak-in-lof' into maint-2.39Junio C Hamano1-0/+1
Leak fix. * rs/plug-pattern-list-leak-in-lof: list-objects-filter: plug pattern_list leak
2023-02-14Merge branch 'rs/t4205-do-not-exit-in-test-script' into maint-2.39Junio C Hamano1-1/+1
Test fix. * rs/t4205-do-not-exit-in-test-script: t4205: don't exit test script on failure
2023-02-14Merge branch 'jc/doc-checkout-b' into maint-2.39Junio C Hamano1-6/+8
Clarify how "checkout -b/-B" and "git branch [-f]" are similar but different in the documentation. * jc/doc-checkout-b: checkout: document -b/-B to highlight the differences from "git branch"
2023-02-14Merge branch 'jc/doc-branch-update-checked-out-branch' into maint-2.39Junio C Hamano1-0/+4
Document that "branch -f <branch>" disables only the safety to avoid recreating an existing branch. * jc/doc-branch-update-checked-out-branch: branch: document `-f` and linked worktree behaviour
2023-02-14Merge branch 'rs/ls-tree-path-expansion-fix' into maint-2.39Junio C Hamano2-8/+11
"git ls-tree --format='%(path) %(path)' $tree $path" showed the path three times, which has been corrected. * rs/ls-tree-path-expansion-fix: ls-tree: remove dead store and strbuf for quote_c_style() ls-tree: fix expansion of repeated %(path)
2023-02-14Merge branch 'pb/doc-orig-head' into maint-2.39Junio C Hamano5-4/+14
Document ORIG_HEAD a bit more. * pb/doc-orig-head: git-rebase.txt: add a note about 'ORIG_HEAD' being overwritten revisions.txt: be explicit about commands writing 'ORIG_HEAD' git-merge.txt: mention 'ORIG_HEAD' in the Description git-reset.txt: mention 'ORIG_HEAD' in the Description git-cherry-pick.txt: do not use 'ORIG_HEAD' in example
2023-02-14Merge branch 'es/hooks-and-local-env' into maint-2.39Junio C Hamano1-0/+12
Doc update for environment variables set when hooks are invoked. * es/hooks-and-local-env: githooks: discuss Git operations in foreign repositories
2023-02-14Merge branch 'ws/single-file-cone' into maint-2.39Junio C Hamano2-1/+17
The logic to see if we are using the "cone" mode by checking the sparsity patterns has been tightened to avoid mistaking a pattern that names a single file as specifying a cone. * ws/single-file-cone: dir: check for single file cone patterns
2023-02-14Merge branch 'jk/ext-diff-with-relative' into maint-2.39Junio C Hamano2-17/+42
"git diff --relative" did not mix well with "git diff --ext-diff", which has been corrected. * jk/ext-diff-with-relative: diff: drop "name" parameter from prepare_temp_file() diff: clean up external-diff argv setup diff: use filespec path to set up tempfiles for ext-diff