Merge branch 'ps/the-repository'

More code paths have a repository passed through the callchain,
instead of assuming the primary the_repository object.

* ps/the-repository:
  match-trees: stop using `the_repository`
  graph: stop using `the_repository`
  add-interactive: stop using `the_repository`
  tmp-objdir: stop using `the_repository`
  resolve-undo: stop using `the_repository`
  credential: stop using `the_repository`
  mailinfo: stop using `the_repository`
  diagnose: stop using `the_repository`
  server-info: stop using `the_repository`
  send-pack: stop using `the_repository`
  serve: stop using `the_repository`
  trace: stop using `the_repository`
  pager: stop using `the_repository`
  progress: stop using `the_repository`
This commit is contained in:
Junio C Hamano
2025-01-21 08:44:54 -08:00
74 changed files with 407 additions and 299 deletions

View File

@ -17,10 +17,14 @@
*
* See 't0500-progress-display.sh' for examples.
*/
#define USE_THE_REPOSITORY_VARIABLE
#define GIT_TEST_PROGRESS_ONLY
#include "test-tool.h"
#include "parse-options.h"
#include "progress.h"
#include "repository.h"
#include "strbuf.h"
#include "string-list.h"
@ -64,7 +68,7 @@ int cmd__progress(int argc, const char **argv)
else
die("invalid input: '%s'", line.buf);
progress = start_progress(title, total);
progress = start_progress(the_repository, title, total);
} else if (skip_prefix(line.buf, "progress ", (const char **) &end)) {
uint64_t item_count = strtoull(end, &end, 10);
if (*end != '\0')

View File

@ -1,6 +1,9 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "test-tool.h"
#include "gettext.h"
#include "parse-options.h"
#include "repository.h"
#include "serve.h"
#include "setup.h"
@ -28,9 +31,9 @@ int cmd__serve_v2(int argc, const char **argv)
PARSE_OPT_KEEP_UNKNOWN_OPT);
if (advertise_capabilities)
protocol_v2_advertise_capabilities();
protocol_v2_advertise_capabilities(the_repository);
else
protocol_v2_serve_loop(stateless_rpc);
protocol_v2_serve_loop(the_repository, stateless_rpc);
return 0;
}