From: David Kastrup <dak@gnu.org>
To: Sven Axelsson <sven.axelsson@gmail.com>
Cc: emacs <emacs-devel@gnu.org>
Subject: Re: Switching from old git tree
Date: Fri, 14 Nov 2014 15:54:27 +0100 [thread overview]
Message-ID: <87a93tq1cs.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CAP1yDHYX4mzP+Lg43N7BfQJnyqVRfuT+cywNQygj6=6MUXzMnw@mail.gmail.com> (Sven Axelsson's message of "Fri, 14 Nov 2014 15:20:53 +0100")
Sven Axelsson <sven.axelsson@gmail.com> writes:
> On 14 November 2014 14:53, David Kastrup <dak@gnu.org> wrote:
>> Sven Axelsson <sven.axelsson@gmail.com> writes:
>>> I suppose you could add your old repo as a local remote to the new one, and
>>> cherry-pick your commits, i.e.:
>>>
>>> git remote add old /local/path/to/old
>>> # Fetch the data to your new repo
>>> git fetch old
>>> # Find the commits to pick somehow
>>> git log old/master
>>> # Copy to new repo
>>> git cherry-pick <sha-of-commit>
>>
>> Well, I was trying to avoid the "double your repository size or no money
>> back" effect. While the file and tree blobs in two differently
>> converted Emacs repositories are presumably pretty much the same, the
>> entire commit history is disjoint. Once it takes root in your
>> repository, it will take a long long time before it gets washed out
>> again _after_ removing all branches/references to it. Going through
>> patches minimizes the data the new repository gets to see from the old
>> one.
>
> Sure, but does the repo size really matter? We are not talking about data
> that is transmitted upstream.
>
> Also, isn't it sufficient to do
>
> git remote rm old
> git gc
>
> to clean out the repo?
If you did not forget any reference (like old bisect labels) this recipe
should work fine once you add an additional second step. That
additional second step is "wait for more than three months" with the
default settings.
Git is really good at not terminally losing information even when you
mess up completely. Passing a branch through a repository basically
imprints a backup on the repository that will take quite some time to
get removed again. Often that is what you want. When you know in
advance that you don't, it may make sense to make sure only the data you
want gets in.
--
David Kastrup
next prev parent reply other threads:[~2014-11-14 14:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 11:26 Switching from old git tree Peder O. Klingenberg
2014-11-14 12:20 ` David Kastrup
2014-11-14 12:35 ` Sven Axelsson
2014-11-14 12:38 ` Sven Axelsson
2014-11-14 13:21 ` Peder O. Klingenberg
2014-11-14 13:53 ` David Kastrup
2014-11-14 14:20 ` Sven Axelsson
2014-11-14 14:54 ` David Kastrup [this message]
2014-11-14 15:52 ` Andreas Schwab
2014-11-14 18:29 ` David Caldwell
2014-11-15 8:43 ` Kenneth Raeburn
2014-11-15 8:58 ` Eli Zaretskii
2014-11-15 9:18 ` David Kastrup
2014-11-15 9:55 ` Eli Zaretskii
2014-11-15 18:26 ` Ken Raeburn
2014-11-14 13:29 ` Nicolas Richard
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=87a93tq1cs.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=sven.axelsson@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.