Git development
 help / color / mirror / Atom feed
* [Outreachy PATCH] negotiator/default: stop using the_repository
@ 2026-10-27 15:34 Okhuomon Ajayi
  2026-11-03 11:50 ` Christian Couder
  2026-11-03 15:50 ` [Outreachy PATCH v2] " Okhuomon Ajayi
  0 siblings, 2 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-10-27 15:34 UTC (permalink / raw)
  To: git
  Cc: christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam, Okhuomon Ajayi

The default negotiator uses the_repository to parse commits,
clear marks, and walk refs. fetch_negotiator_init() already
has the repository but does not pass it down.

Give default_negotiator_init() a repository parameter, store
it on the negotiation state, and use it for those calls.
clear_marks() receives the repository through its callback
data. Drop USE_THE_REPOSITORY_VARIABLE.

Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
 fetch-negotiator.c   |  2 +-
 negotiator/default.c | 26 +++++++++++++++-----------
 negotiator/default.h |  4 +++-
 3 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/fetch-negotiator.c b/fetch-negotiator.c
index be383367f5..1a2cf3f384 100644
--- a/fetch-negotiator.c
+++ b/fetch-negotiator.c
@@ -19,7 +19,7 @@ void fetch_negotiator_init(struct repository *r,
 		return;
 
 	case FETCH_NEGOTIATION_CONSECUTIVE:
-		default_negotiator_init(negotiator);
+		default_negotiator_init(negotiator, r);
 		return;
 	}
 }
diff --git a/negotiator/default.c b/negotiator/default.c
index 19cdf3808c..4684bed796 100644
--- a/negotiator/default.c
+++ b/negotiator/default.c
@@ -1,5 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
-
 #include "git-compat-util.h"
 #include "default.h"
 #include "../commit.h"
@@ -18,6 +16,7 @@
 static int marked;
 
 struct negotiation_state {
+	struct repository *repo;
 	struct prio_queue rev_list;
 	int non_common_revs;
 };
@@ -28,7 +27,7 @@ static void rev_list_push(struct negotiation_state *ns,
 	if (!(commit->object.flags & mark)) {
 		commit->object.flags |= mark;
 
-		if (repo_parse_commit(the_repository, commit))
+		if (repo_parse_commit(ns->repo, commit))
 			return;
 
 		prio_queue_put(&ns->rev_list, commit);
@@ -38,9 +37,10 @@ static void rev_list_push(struct negotiation_state *ns,
 	}
 }
 
-static int clear_marks(const struct reference *ref, void *cb_data UNUSED)
+static int clear_marks(const struct reference *ref, void *cb_data)
 {
-	struct object *o = deref_tag(the_repository, parse_object(the_repository, ref->oid),
+	struct repository *r = cb_data;
+	struct object *o = deref_tag(r, parse_object(r, ref->oid),
 				     ref->name, 0);
 
 	if (o && o->type == OBJ_COMMIT)
@@ -78,7 +78,7 @@ static void mark_common(struct negotiation_state *ns, struct commit *commit,
 			struct commit_list *parents;
 
 			if (!o->parsed && !dont_parse)
-				if (repo_parse_commit(the_repository, commit))
+				if (repo_parse_commit(ns->repo, commit))
 					continue;
 
 			for (parents = commit->parents;
@@ -119,7 +119,7 @@ static const struct object_id *get_rev(struct negotiation_state *ns)
 		commit = prio_queue_get(&ns->rev_list);
 		if (!commit)
 			return NULL;
-		repo_parse_commit(the_repository, commit);
+		repo_parse_commit(ns->repo, commit);
 		parents = commit->parents;
 
 		commit->object.flags |= POPPED;
@@ -179,7 +179,9 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
 
 static void have_sent(struct fetch_negotiator *n, struct commit *c)
 {
-	if (repo_parse_commit(the_repository, c))
+	struct negotiation_state *ns = n->data;
+
+	if (repo_parse_commit(ns->repo, c))
 		return;
 	mark_common(n->data, c, 0, 0);
 }
@@ -190,7 +192,8 @@ static void release(struct fetch_negotiator *n)
 	FREE_AND_NULL(n->data);
 }
 
-void default_negotiator_init(struct fetch_negotiator *negotiator)
+void default_negotiator_init(struct fetch_negotiator *negotiator,
+			     struct repository *r)
 {
 	struct negotiation_state *ns;
 	negotiator->known_common = known_common;
@@ -200,10 +203,11 @@ void default_negotiator_init(struct fetch_negotiator *negotiator)
 	negotiator->have_sent = have_sent;
 	negotiator->release = release;
 	negotiator->data = CALLOC_ARRAY(ns, 1);
+	ns->repo = r;
 	ns->rev_list.compare = compare_commits_by_commit_date;
 
 	if (marked)
-		refs_for_each_ref(get_main_ref_store(the_repository),
-				  clear_marks, NULL);
+		refs_for_each_ref(get_main_ref_store(r),
+				  clear_marks, r);
 	marked = 1;
 }
diff --git a/negotiator/default.h b/negotiator/default.h
index d23a8f2fb8..bd998eb32e 100644
--- a/negotiator/default.h
+++ b/negotiator/default.h
@@ -2,7 +2,9 @@
 #define NEGOTIATOR_DEFAULT_H
 
 struct fetch_negotiator;
+struct repository;
 
-void default_negotiator_init(struct fetch_negotiator *negotiator);
+void default_negotiator_init(struct fetch_negotiator *negotiator,
+			     struct repository *r);
 
 #endif

base-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH] negotiator/default: stop using the_repository
  2026-10-27 15:34 [Outreachy PATCH] negotiator/default: stop using the_repository Okhuomon Ajayi
@ 2026-11-03 11:50 ` Christian Couder
  2026-11-03 12:12   ` Okhuomon Ajayi
  2026-11-03 15:50 ` [Outreachy PATCH v2] " Okhuomon Ajayi
  1 sibling, 1 reply; 8+ messages in thread
From: Christian Couder @ 2026-11-03 11:50 UTC (permalink / raw)
  To: Okhuomon Ajayi
  Cc: git, usmanakinyemi202, siddharthasthana31, kaartic.sivaraam

On Tue, Oct 27, 2026 at 4:37 PM Okhuomon Ajayi
<okhuomonajayi54@gmail.com> wrote:

>  static void have_sent(struct fetch_negotiator *n, struct commit *c)
>  {
> -       if (repo_parse_commit(the_repository, c))
> +       struct negotiation_state *ns = n->data;
> +
> +       if (repo_parse_commit(ns->repo, c))
>                 return;
>         mark_common(n->data, c, 0, 0);

As you introduced `ns`, you might use it to simplify the above line using:

         mark_common(ns, c, 0, 0);
>  }

[...]

> -void default_negotiator_init(struct fetch_negotiator *negotiator);
> +void default_negotiator_init(struct fetch_negotiator *negotiator,
> +                            struct repository *r);

Many functions have their `struct repository *r` argument as their
first argument. Is there a reason why you prefered to have it as the
second argument?

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH] negotiator/default: stop using the_repository
  2026-11-03 11:50 ` Christian Couder
@ 2026-11-03 12:12   ` Okhuomon Ajayi
  0 siblings, 0 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-11-03 12:12 UTC (permalink / raw)
  To: Christian Couder
  Cc: git, usmanakinyemi202, siddharthasthana31, kaartic.sivaraam

On Tue, Nov 3, 2026 at 12:50 PM Christian Couder
<christian.couder@gmail.com> wrote:
> As you introduced `ns`, you might use it to simplify the above line using:
>
>          mark_common(ns, c, 0, 0);


Good point. I'll make that change in the next version.

> Many functions have their `struct repository *r` argument as their
> first argument. Is there a reason why you prefered to have it as the
> second argument?


No particular reason. I'll put the repository argument first in the
next version.

Thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Outreachy PATCH v2] negotiator/default: stop using the_repository
  2026-10-27 15:34 [Outreachy PATCH] negotiator/default: stop using the_repository Okhuomon Ajayi
  2026-11-03 11:50 ` Christian Couder
@ 2026-11-03 15:50 ` Okhuomon Ajayi
  2026-11-23  9:29   ` Okhuomon Ajayi
  2026-11-24  8:41   ` Christian Couder
  1 sibling, 2 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-11-03 15:50 UTC (permalink / raw)
  To: git
  Cc: christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam, okhuomonajayi54

The default negotiator uses the_repository to parse commits,
clear marks, and walk refs. fetch_negotiator_init() already
has the repository but does not pass it down.

Give default_negotiator_init() a repository parameter, store
it on the negotiation state, and use it for those calls.
clear_marks() receives the repository through its callback
data. Drop USE_THE_REPOSITORY_VARIABLE.

Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
Changes since v1:
- Put the repository first in default_negotiator_init(), as
  Christian suggested.
- Pass ns to mark_common() in have_sent().

Thanks, Christian, for the review.

 fetch-negotiator.c   |  2 +-
 negotiator/default.c | 28 ++++++++++++++++------------
 negotiator/default.h |  4 +++-
 3 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/fetch-negotiator.c b/fetch-negotiator.c
index be383367f5..a5183bb3bc 100644
--- a/fetch-negotiator.c
+++ b/fetch-negotiator.c
@@ -19,7 +19,7 @@ void fetch_negotiator_init(struct repository *r,
 		return;
 
 	case FETCH_NEGOTIATION_CONSECUTIVE:
-		default_negotiator_init(negotiator);
+		default_negotiator_init(r, negotiator);
 		return;
 	}
 }
diff --git a/negotiator/default.c b/negotiator/default.c
index 19cdf3808c..f7cb52f10c 100644
--- a/negotiator/default.c
+++ b/negotiator/default.c
@@ -1,5 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
-
 #include "git-compat-util.h"
 #include "default.h"
 #include "../commit.h"
@@ -18,6 +16,7 @@
 static int marked;
 
 struct negotiation_state {
+	struct repository *repo;
 	struct prio_queue rev_list;
 	int non_common_revs;
 };
@@ -28,7 +27,7 @@ static void rev_list_push(struct negotiation_state *ns,
 	if (!(commit->object.flags & mark)) {
 		commit->object.flags |= mark;
 
-		if (repo_parse_commit(the_repository, commit))
+		if (repo_parse_commit(ns->repo, commit))
 			return;
 
 		prio_queue_put(&ns->rev_list, commit);
@@ -38,9 +37,10 @@ static void rev_list_push(struct negotiation_state *ns,
 	}
 }
 
-static int clear_marks(const struct reference *ref, void *cb_data UNUSED)
+static int clear_marks(const struct reference *ref, void *cb_data)
 {
-	struct object *o = deref_tag(the_repository, parse_object(the_repository, ref->oid),
+	struct repository *r = cb_data;
+	struct object *o = deref_tag(r, parse_object(r, ref->oid),
 				     ref->name, 0);
 
 	if (o && o->type == OBJ_COMMIT)
@@ -78,7 +78,7 @@ static void mark_common(struct negotiation_state *ns, struct commit *commit,
 			struct commit_list *parents;
 
 			if (!o->parsed && !dont_parse)
-				if (repo_parse_commit(the_repository, commit))
+				if (repo_parse_commit(ns->repo, commit))
 					continue;
 
 			for (parents = commit->parents;
@@ -119,7 +119,7 @@ static const struct object_id *get_rev(struct negotiation_state *ns)
 		commit = prio_queue_get(&ns->rev_list);
 		if (!commit)
 			return NULL;
-		repo_parse_commit(the_repository, commit);
+		repo_parse_commit(ns->repo, commit);
 		parents = commit->parents;
 
 		commit->object.flags |= POPPED;
@@ -179,9 +179,11 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
 
 static void have_sent(struct fetch_negotiator *n, struct commit *c)
 {
-	if (repo_parse_commit(the_repository, c))
+	struct negotiation_state *ns = n->data;
+
+	if (repo_parse_commit(ns->repo, c))
 		return;
-	mark_common(n->data, c, 0, 0);
+	mark_common(ns, c, 0, 0);
 }
 
 static void release(struct fetch_negotiator *n)
@@ -190,7 +192,8 @@ static void release(struct fetch_negotiator *n)
 	FREE_AND_NULL(n->data);
 }
 
-void default_negotiator_init(struct fetch_negotiator *negotiator)
+void default_negotiator_init(struct repository *r,
+			     struct fetch_negotiator *negotiator)
 {
 	struct negotiation_state *ns;
 	negotiator->known_common = known_common;
@@ -200,10 +203,11 @@ void default_negotiator_init(struct fetch_negotiator *negotiator)
 	negotiator->have_sent = have_sent;
 	negotiator->release = release;
 	negotiator->data = CALLOC_ARRAY(ns, 1);
+	ns->repo = r;
 	ns->rev_list.compare = compare_commits_by_commit_date;
 
 	if (marked)
-		refs_for_each_ref(get_main_ref_store(the_repository),
-				  clear_marks, NULL);
+		refs_for_each_ref(get_main_ref_store(r),
+				  clear_marks, r);
 	marked = 1;
 }
diff --git a/negotiator/default.h b/negotiator/default.h
index d23a8f2fb8..98bc989cff 100644
--- a/negotiator/default.h
+++ b/negotiator/default.h
@@ -2,7 +2,9 @@
 #define NEGOTIATOR_DEFAULT_H
 
 struct fetch_negotiator;
+struct repository;
 
-void default_negotiator_init(struct fetch_negotiator *negotiator);
+void default_negotiator_init(struct repository *r,
+			     struct fetch_negotiator *negotiator);
 
 #endif

base-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH v2] negotiator/default: stop using the_repository
  2026-11-03 15:50 ` [Outreachy PATCH v2] " Okhuomon Ajayi
@ 2026-11-23  9:29   ` Okhuomon Ajayi
  2026-11-24  8:41   ` Christian Couder
  1 sibling, 0 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-11-23  9:29 UTC (permalink / raw)
  To: git
  Cc: christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam

Hi Christian,

Gentle ping on this v2. It's in 'seen' marked "Needs review". Is there
anything you'd like me to change?

Thanks,
Okhuomon


On Tue, Nov 3, 2026 at 4:50 PM Okhuomon Ajayi <okhuomonajayi54@gmail.com> wrote:
>
> The default negotiator uses the_repository to parse commits,
> clear marks, and walk refs. fetch_negotiator_init() already
> has the repository but does not pass it down.
>
> Give default_negotiator_init() a repository parameter, store
> it on the negotiation state, and use it for those calls.
> clear_marks() receives the repository through its callback
> data. Drop USE_THE_REPOSITORY_VARIABLE.
>
> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
> ---
> Changes since v1:
> - Put the repository first in default_negotiator_init(), as
>   Christian suggested.
> - Pass ns to mark_common() in have_sent().
>
> Thanks, Christian, for the review.
>
>  fetch-negotiator.c   |  2 +-
>  negotiator/default.c | 28 ++++++++++++++++------------
>  negotiator/default.h |  4 +++-
>  3 files changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/fetch-negotiator.c b/fetch-negotiator.c
> index be383367f5..a5183bb3bc 100644
> --- a/fetch-negotiator.c
> +++ b/fetch-negotiator.c
> @@ -19,7 +19,7 @@ void fetch_negotiator_init(struct repository *r,
>                 return;
>
>         case FETCH_NEGOTIATION_CONSECUTIVE:
> -               default_negotiator_init(negotiator);
> +               default_negotiator_init(r, negotiator);
>                 return;
>         }
>  }
> diff --git a/negotiator/default.c b/negotiator/default.c
> index 19cdf3808c..f7cb52f10c 100644
> --- a/negotiator/default.c
> +++ b/negotiator/default.c
> @@ -1,5 +1,3 @@
> -#define USE_THE_REPOSITORY_VARIABLE
> -
>  #include "git-compat-util.h"
>  #include "default.h"
>  #include "../commit.h"
> @@ -18,6 +16,7 @@
>  static int marked;
>
>  struct negotiation_state {
> +       struct repository *repo;
>         struct prio_queue rev_list;
>         int non_common_revs;
>  };
> @@ -28,7 +27,7 @@ static void rev_list_push(struct negotiation_state *ns,
>         if (!(commit->object.flags & mark)) {
>                 commit->object.flags |= mark;
>
> -               if (repo_parse_commit(the_repository, commit))
> +               if (repo_parse_commit(ns->repo, commit))
>                         return;
>
>                 prio_queue_put(&ns->rev_list, commit);
> @@ -38,9 +37,10 @@ static void rev_list_push(struct negotiation_state *ns,
>         }
>  }
>
> -static int clear_marks(const struct reference *ref, void *cb_data UNUSED)
> +static int clear_marks(const struct reference *ref, void *cb_data)
>  {
> -       struct object *o = deref_tag(the_repository, parse_object(the_repository, ref->oid),
> +       struct repository *r = cb_data;
> +       struct object *o = deref_tag(r, parse_object(r, ref->oid),
>                                      ref->name, 0);
>
>         if (o && o->type == OBJ_COMMIT)
> @@ -78,7 +78,7 @@ static void mark_common(struct negotiation_state *ns, struct commit *commit,
>                         struct commit_list *parents;
>
>                         if (!o->parsed && !dont_parse)
> -                               if (repo_parse_commit(the_repository, commit))
> +                               if (repo_parse_commit(ns->repo, commit))
>                                         continue;
>
>                         for (parents = commit->parents;
> @@ -119,7 +119,7 @@ static const struct object_id *get_rev(struct negotiation_state *ns)
>                 commit = prio_queue_get(&ns->rev_list);
>                 if (!commit)
>                         return NULL;
> -               repo_parse_commit(the_repository, commit);
> +               repo_parse_commit(ns->repo, commit);
>                 parents = commit->parents;
>
>                 commit->object.flags |= POPPED;
> @@ -179,9 +179,11 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
>
>  static void have_sent(struct fetch_negotiator *n, struct commit *c)
>  {
> -       if (repo_parse_commit(the_repository, c))
> +       struct negotiation_state *ns = n->data;
> +
> +       if (repo_parse_commit(ns->repo, c))
>                 return;
> -       mark_common(n->data, c, 0, 0);
> +       mark_common(ns, c, 0, 0);
>  }
>
>  static void release(struct fetch_negotiator *n)
> @@ -190,7 +192,8 @@ static void release(struct fetch_negotiator *n)
>         FREE_AND_NULL(n->data);
>  }
>
> -void default_negotiator_init(struct fetch_negotiator *negotiator)
> +void default_negotiator_init(struct repository *r,
> +                            struct fetch_negotiator *negotiator)
>  {
>         struct negotiation_state *ns;
>         negotiator->known_common = known_common;
> @@ -200,10 +203,11 @@ void default_negotiator_init(struct fetch_negotiator *negotiator)
>         negotiator->have_sent = have_sent;
>         negotiator->release = release;
>         negotiator->data = CALLOC_ARRAY(ns, 1);
> +       ns->repo = r;
>         ns->rev_list.compare = compare_commits_by_commit_date;
>
>         if (marked)
> -               refs_for_each_ref(get_main_ref_store(the_repository),
> -                                 clear_marks, NULL);
> +               refs_for_each_ref(get_main_ref_store(r),
> +                                 clear_marks, r);
>         marked = 1;
>  }
> diff --git a/negotiator/default.h b/negotiator/default.h
> index d23a8f2fb8..98bc989cff 100644
> --- a/negotiator/default.h
> +++ b/negotiator/default.h
> @@ -2,7 +2,9 @@
>  #define NEGOTIATOR_DEFAULT_H
>
>  struct fetch_negotiator;
> +struct repository;
>
> -void default_negotiator_init(struct fetch_negotiator *negotiator);
> +void default_negotiator_init(struct repository *r,
> +                            struct fetch_negotiator *negotiator);
>
>  #endif
>
> base-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e
> --
> 2.56.0
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH v2] negotiator/default: stop using the_repository
  2026-11-03 15:50 ` [Outreachy PATCH v2] " Okhuomon Ajayi
  2026-11-23  9:29   ` Okhuomon Ajayi
@ 2026-11-24  8:41   ` Christian Couder
  2026-11-24  8:47     ` Okhuomon Ajayi
  2026-11-24 15:23     ` Junio C Hamano
  1 sibling, 2 replies; 8+ messages in thread
From: Christian Couder @ 2026-11-24  8:41 UTC (permalink / raw)
  To: Okhuomon Ajayi
  Cc: git, usmanakinyemi202, siddharthasthana31, kaartic.sivaraam

On Tue, Nov 3, 2026 at 4:50 PM Okhuomon Ajayi <okhuomonajayi54@gmail.com> wrote:
>
> The default negotiator uses the_repository to parse commits,
> clear marks, and walk refs. fetch_negotiator_init() already
> has the repository but does not pass it down.
>
> Give default_negotiator_init() a repository parameter, store
> it on the negotiation state, and use it for those calls.
> clear_marks() receives the repository through its callback
> data. Drop USE_THE_REPOSITORY_VARIABLE.
>
> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
> ---
> Changes since v1:
> - Put the repository first in default_negotiator_init(), as
>   Christian suggested.
> - Pass ns to mark_common() in have_sent().

Sorry for the delay in the review.

This version 2 looks good to me.

Thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH v2] negotiator/default: stop using the_repository
  2026-11-24  8:41   ` Christian Couder
@ 2026-11-24  8:47     ` Okhuomon Ajayi
  2026-11-24 15:23     ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-11-24  8:47 UTC (permalink / raw)
  To: Christian Couder
  Cc: git, usmanakinyemi202, siddharthasthana31, kaartic.sivaraam

On Tue, Nov 24, 2026 at 9:41 AM Christian Couder
<christian.couder@gmail.com> wrote:

> This version 2 looks good to me.

Thanks for the review, Christian.

Okhuomon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH v2] negotiator/default: stop using the_repository
  2026-11-24  8:41   ` Christian Couder
  2026-11-24  8:47     ` Okhuomon Ajayi
@ 2026-11-24 15:23     ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2026-11-24 15:23 UTC (permalink / raw)
  To: Christian Couder
  Cc: Okhuomon Ajayi, git, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam

Christian Couder <christian.couder@gmail.com> writes:

> On Tue, Nov 3, 2026 at 4:50 PM Okhuomon Ajayi <okhuomonajayi54@gmail.com> wrote:
>>
>> The default negotiator uses the_repository to parse commits,
>> clear marks, and walk refs. fetch_negotiator_init() already
>> has the repository but does not pass it down.
>>
>> Give default_negotiator_init() a repository parameter, store
>> it on the negotiation state, and use it for those calls.
>> clear_marks() receives the repository through its callback
>> data. Drop USE_THE_REPOSITORY_VARIABLE.
>>
>> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
>> ---
>> Changes since v1:
>> - Put the repository first in default_negotiator_init(), as
>>   Christian suggested.
>> - Pass ns to mark_common() in have_sent().
>
> Sorry for the delay in the review.
>
> This version 2 looks good to me.

Thanks for writing and reviewing.  Will mark the topic as ready for
'next', then.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-24 15:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 15:34 [Outreachy PATCH] negotiator/default: stop using the_repository Okhuomon Ajayi
2026-11-03 11:50 ` Christian Couder
2026-11-03 12:12   ` Okhuomon Ajayi
2026-11-03 15:50 ` [Outreachy PATCH v2] " Okhuomon Ajayi
2026-11-23  9:29   ` Okhuomon Ajayi
2026-11-24  8:41   ` Christian Couder
2026-11-24  8:47     ` Okhuomon Ajayi
2026-11-24 15:23     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox