summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-02-03 16:12:33 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-03 16:12:33 -0800
commite5a0d5d8bbeed7d0cb21533f9727591e110f50b8 (patch)
treed832eac70fdd06842f431101c655390396fa05ce /diff.c
parent0cb454c0727efc1e7ef3ea23d7d6391a80769118 (diff)
parentbc204b742735ae06f65bb20291c95985c9633b7f (diff)
Merge branch 'master' into ds/backfill
* master: (446 commits) The seventh batch The sixth batch The fifth batch The fourth batch refs/reftable: fix uninitialized memory access of `max_index` remote: announce removal of "branches/" and "remotes/" The third batch hash.h: drop unsafe_ function variants csum-file: introduce hashfile_checkpoint_init() t/helper/test-hash.c: use unsafe_hash_algo() csum-file.c: use unsafe_hash_algo() hash.h: introduce `unsafe_hash_algo()` csum-file.c: extract algop from hashfile_checksum_valid() csum-file: store the hash algorithm as a struct field t/helper/test-tool: implement sha1-unsafe helper trace2: prevent segfault on config collection with valueless true refs: fix creation of reflog entries for symrefs ci: wire up Visual Studio build with Meson ci: raise error when Meson generates warnings meson: fix compilation with Visual Studio ...
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index dceac20d18..0822ae4433 100644
--- a/diff.c
+++ b/diff.c
@@ -3,6 +3,7 @@
*/
#define USE_THE_REPOSITORY_VARIABLE
+#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
#include "abspath.h"
@@ -4041,7 +4042,8 @@ static int reuse_worktree_file(struct index_state *istate,
* objects however would tend to be slower as they need
* to be individually opened and inflated.
*/
- if (!FAST_WORKING_DIRECTORY && !want_file && has_object_pack(oid))
+ if (!FAST_WORKING_DIRECTORY && !want_file &&
+ has_object_pack(istate->repo, oid))
return 0;
/*
@@ -7384,6 +7386,6 @@ void setup_diff_pager(struct diff_options *opt)
* --exit-code" in hooks and other scripts, we do not do so.
*/
if (!opt->flags.exit_with_status &&
- check_pager_config("diff") != 0)
- setup_pager();
+ check_pager_config(the_repository, "diff") != 0)
+ setup_pager(the_repository);
}