Thread (6 messages) 6 messages, 4 authors, 2012-01-20

git clone of linux kernel provides only compressed pack files

From: Mirco Tischler <hidden>
Date: 2012-01-20 13:25:22

2012/1/20 Manavendra Nath Manav [off-list ref]:
Hi All,

I cloned 3.2 kernel from git repository, but I am not seeing any
source files. The .git directory contains .git/objects/pack/*.pack
file which is huge and it seems all source code with commit revision
is stored there. When I do "git unpack-objects -r < xyz.pack", it
completes 100% but still no source files show up. The only thing it
generates is some more entries in .git/objects/ directory. The same
problem also occurs when I try to clone android repository. Pls help,
I am sure I am missing some obvious step here.

[root at pe1800xs src]# git clone --recursive -v
http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Cloning into linux-stable...
remote: Counting objects: 2446667, done.
remote: Compressing objects: 100% (391011/391011), done.
Receiving objects: ?18% (447106/2446667), 259.18 MiB | 43 KiB/s

[root at pe1800xs .git]# du -h
4.0K ? ?./objects/info
284M ? ?./objects/pack
285M ? ?./objects
8.0K ? ?./info
4.0K ? ?./refs/tags
4.0K ? ?./refs/heads
12K ? ? ./refs
48K ? ? ./hooks
4.0K ? ?./branches
285M ? ?.

[e518816 at pe1800xs common]$ git unpack-objects -r <
.git/objects/pack/pack-d2d041c2bd4a39fdfdf37c896f64a3c1b53d3d2b.pack
Unpacking objects: 100% (2074089/2074089), done.
quoted
From the man page of git-unpack-objects: "Objects that already exist
in the repository will not be unpacked from the pack-file. Therefore,
nothing will be unpacked if you use this command on a pack-file that
exists within the target repository." I guess this is the problem I am
facing. How do I extract the linux souce files (HEAD branch) from pack
file?

--
Thanks & Regards,
Manavendra Nath Manav
Hi

You just need to do git checkout master after the git clone. This
gives you the version the master branch in the stable repo points to
at the time of the cloning.
To update your local master branch later, just do git pull.

git unpack-objects is usually not directly needed by users. It's
called by git internally though.

Mirco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help