From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Do not call git-rev-list from git-fetch-pack
Date: Fri, 21 Oct 2005 01:51:10 -0700 [thread overview]
Message-ID: <7virvrw8w1.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.63.0510210413210.26388@wbgn013.biozentrum.uni-wuerzburg.de
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> + Branch1 has 40 commits since it last merged with branch2,
> + and branch2 has 2 more commits since then.
> +
> + On the other end, branch1 is up-to-date, but branch2 is not.
> + When fetching branch1, the 40 commits get sent, the first
> + is acknowledged as common, and the local head of branch2
> + never gets sent.
> +
> + As a consequence, the whole history of branch2
> + (git-rev-list branch2 ^branch1) gets packed and transmitted.
Arrrgggggggh. The description above captures the essense of the
problem very well, but faking dates and still popping by recency
looks like a really ugly hack to me.
Wouldn't it be cleaner if you traversed commits starting from
local refs, and assign distance from the tip of the branch to
each object (use generic object->util field for it), and
maintain an object_list that is sorted by depth, similar to
commit_list sorted by commit date? Then you can pop from the
list by depth, closer to tip first, and tell the other end that
you have branch1, branch2, branch1^, branch2^, branch1~2,
branch2~1,... which is the order the above situation benefits
from.
next prev parent reply other threads:[~2005-10-21 8:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-21 2:15 [PATCH] Do not call git-rev-list from git-fetch-pack Johannes Schindelin
2005-10-21 8:51 ` Junio C Hamano [this message]
2005-10-21 9:35 ` Johannes Schindelin
2005-10-21 17:11 ` Junio C Hamano
2005-10-21 19:44 ` Johannes Schindelin
2005-10-21 21:32 ` Junio C Hamano
2005-10-22 0:35 ` Johannes Schindelin
2005-10-21 20:25 ` Daniel Barkalow
2005-10-21 21:08 ` Johannes Schindelin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7virvrw8w1.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox