git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Damien Robert <damien.olivier.robert@gmail.com>
To: git@vger.kernel.org
Cc: Damien Robert <damien.olivier.robert+git@gmail.com>
Subject: [PATCH 2/2] pack-objects: change the name of add_objects_in_unpacked_packs
Date: Fri, 28 Feb 2020 16:43:57 +0100	[thread overview]
Message-ID: <20200228154357.1710521-3-damien.olivier.robert+git@gmail.com> (raw)
In-Reply-To: <20200228154357.1710521-1-damien.olivier.robert+git@gmail.com>

`add_objects_in_unpacked_packs` was added in commit
08cdfb13374f31b0c1c47444f55042e7b72c3190 (Sep 2007) to handle the
`--keep-unreachable` option.

Back then this function would iterate through packs associated to a list
of revs, and add all objects that was not already in the object list,
hence the name.

Now the function simply iterate through all packs (more precisely all
local packs not marked as .keep), and add all objects not already in the
object list.

So rename the function to add_unreachable_packed_objects, to mimic the
naming of add_unreachable_loose_objects.

Signed-off-by: Damien Robert <damien.olivier.robert+git@gmail.com>
---
 builtin/pack-objects.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 940fbcb7b3..16c2efdbec 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -3031,7 +3031,7 @@ static int ofscmp(const void *a_, const void *b_)
 		return oidcmp(&a->object->oid, &b->object->oid);
 }
 
-static void add_objects_in_unpacked_packs(void)
+static void add_unreachable_packed_objects(void)
 {
 	struct packed_git *p;
 	struct in_pack in_pack;
@@ -3290,7 +3290,7 @@ static void get_object_list(int ac, const char **av)
 	}
 
 	if (keep_unreachable)
-		add_objects_in_unpacked_packs();
+		add_unreachable_packed_objects();
 	if (pack_loose_unreachable)
 		add_unreachable_loose_objects();
 	if (unpack_unreachable)
-- 
Patched on top of v2.25.1-377-g2d2118b814 (git version 2.25.1)


  parent reply	other threads:[~2020-02-28 15:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 15:43 [PATCH 0/2] Documentation of pack and repack Damien Robert
2020-02-28 15:43 ` [PATCH 1/2] doc: update the documentation of pack-objects " Damien Robert
2020-03-02 18:57   ` Junio C Hamano
2020-03-03 17:41     ` Damien Robert
2020-03-03 18:49       ` Junio C Hamano
2020-03-03 21:23         ` Damien Robert
2020-03-03 22:29           ` Junio C Hamano
2020-03-12 17:09   ` [PATCH v2 0/3] Documentation of pack " Damien Robert
2020-03-12 17:09     ` [PATCH v2 1/3] pack-objects: change the name of add_objects_in_unpacked_packs Damien Robert
2020-03-12 17:09     ` [PATCH v2 2/3] doc: update the documentation of pack-objects and repack Damien Robert
2020-03-12 17:09     ` [PATCH v2 3/3] doc: add a short explanation for git-repack options Damien Robert
2020-03-25 22:15     ` [PATCH v2 0/3] Documentation of pack and repack Damien Robert
2020-03-27 22:21       ` Junio C Hamano
2020-02-28 15:43 ` Damien Robert [this message]
2020-02-28 16:01   ` [PATCH 2/2] pack-objects: change the name of add_objects_in_unpacked_packs Damien Robert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200228154357.1710521-3-damien.olivier.robert+git@gmail.com \
    --to=damien.olivier.robert@gmail.com \
    --cc=damien.olivier.robert+git@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).