# Can I use tmp_packs in the git root.

2 messages from 2012-09-24 to 2012-09-24. Participants: Shakthi Prasad GS, Junio C Hamano.
Thread: https://gitlist.dev/t/31636

## Shakthi Prasad GS, 2012-09-24 17:27

Subject: Can I use tmp_packs in the git root.
Message-ID: <CABx=OHw7P5ZpdDZ8XOKT4T03FUfPNAo9oX2mLR7OB95bWkXG_w@mail.gmail.com>
URL: https://gitlist.dev/e/CABx%3DOHw7P5ZpdDZ8XOKT4T03FUfPNAo9oX2mLR7OB95bWkXG_w%40mail.gmail.com

```
Hi,

I am trying implement git incremental clone/fetch
Please check https://github.com/Shakthi/gitreclone/blob/master/gitreclone
Basically, I am trying to use temporary git packs to avoid re-fetching
of the objects. However, it seems git ignores unpacked objects, and
git-fetch starts again from 0%.

Basically I use, "cat tmp_packs*|git-unpack-objects" . Log indicates
that, objects are unpacked.

Am I doing anything wrong,
Thanks
Shakthi

```

## Junio C Hamano, 2012-09-24 18:18

Subject: Re: Can I use tmp_packs in the git root.
Message-ID: <7vpq5bz3m1.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vpq5bz3m1.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CABx=OHw7P5ZpdDZ8XOKT4T03FUfPNAo9oX2mLR7OB95bWkXG_w@mail.gmail.com>

```
Shakthi Prasad GS <shakthi.gs87@gmail.com> writes:

> Basically I use, "cat tmp_packs*|git-unpack-objects" . Log indicates
> that, objects are unpacked.
>
> Am I doing anything wrong,

If unpack is all you do, then it won't help very much, as Git only
trusts objects that are reachable from refs.  You would need to also
make the tips of histories contained in the temp_packs* known to Git
by pointing at them from somewhere in refs/ hierarchy.

See how scripted version of "git clone" used to do this by studying
how contrib/examples/git-clone.sh uses refs/reference-tmp/ does the
same for handling "--reference=" option.

```
