From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Matthijs Kooijman" <matthijs@stdin.nl>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 2/6] shallow: only add shallow graft points to new shallow file
Date: Fri, 16 Aug 2013 16:52:03 +0700 [thread overview]
Message-ID: <1376646727-22318-2-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1376646727-22318-1-git-send-email-pclouds@gmail.com>
for_each_commit_graft() goes through all graft points and shallow
boudaries are just one special kind of grafting. If $GIT_DIR/shallow
and $GIT_DIR/info/grafts are both present, write_shallow_commits may
catch both sets, accidentally turning some graft points to shallow
boundaries. Don't do that.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
shallow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/shallow.c b/shallow.c
index 68dd106..5f626c0 100644
--- a/shallow.c
+++ b/shallow.c
@@ -153,6 +153,8 @@ static int write_one_shallow(const struct commit_graft *graft, void *cb_data)
{
struct write_shallow_data *data = cb_data;
const char *hex = sha1_to_hex(graft->sha1);
+ if (graft->nr_parent != -1)
+ return 0;
data->count++;
if (data->use_pack_protocol)
packet_buf_write(data->out, "shallow %s", hex);
--
1.8.2.82.gc24b958
next prev parent reply other threads:[~2013-08-16 9:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 22:01 [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects Matthijs Kooijman
2013-07-11 22:53 ` Junio C Hamano
2013-07-12 7:11 ` Matthijs Kooijman
2013-08-07 10:27 ` Matthijs Kooijman
2013-08-08 1:01 ` Junio C Hamano
2013-08-08 1:09 ` Duy Nguyen
2013-08-08 6:39 ` Junio C Hamano
2013-08-08 4:50 ` Duy Nguyen
2013-08-08 6:51 ` Junio C Hamano
2013-08-08 7:21 ` Duy Nguyen
2013-08-08 17:10 ` Junio C Hamano
2013-08-09 13:13 ` Duy Nguyen
2013-08-12 8:02 ` Matthijs Kooijman
2013-08-16 9:51 ` Duy Nguyen
2013-08-16 9:52 ` [PATCH 1/6] Move setup_alternate_shallow and write_shallow_commits to shallow.c Nguyễn Thái Ngọc Duy
2013-08-16 9:52 ` Nguyễn Thái Ngọc Duy [this message]
2013-08-16 23:50 ` [PATCH 2/6] shallow: only add shallow graft points to new shallow file Eric Sunshine
2013-08-16 9:52 ` [PATCH 3/6] shallow: add setup_temporary_shallow() Nguyễn Thái Ngọc Duy
2013-08-16 23:52 ` Eric Sunshine
2013-08-16 9:52 ` [PATCH 4/6] upload-pack: delegate rev walking in shallow fetch to pack-objects Nguyễn Thái Ngọc Duy
2013-08-28 14:52 ` Matthijs Kooijman
2013-08-29 9:48 ` Duy Nguyen
2013-08-16 9:52 ` [PATCH 5/6] list-objects: reduce one argument in mark_edges_uninteresting Nguyễn Thái Ngọc Duy
2013-08-16 9:52 ` [PATCH 6/6] list-objects: mark more commits as edges " Nguyễn Thái Ngọc Duy
2013-08-28 15:36 ` [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects Matthijs Kooijman
2013-08-28 16:02 ` [PATCH] Add testcase for needless objects during a shallow fetch Matthijs Kooijman
2013-08-29 9:50 ` Duy Nguyen
2013-08-31 1:25 ` Duy Nguyen
2013-10-21 7:51 ` [RFC PATCH] During a shallow fetch, prevent sending over unneeded objects Matthijs Kooijman
2013-10-26 10:49 ` Duy Nguyen
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=1376646727-22318-2-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=matthijs@stdin.nl \
/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).