Jump to content

About the packed pack?


Recommended Posts

Posted

I used the git tools for windows ,and I clone the sources from git://github.com/mangos/mangos.git,however,I can't extract the C++ files,I can only browse them from the GUI tools.There are only two files :Pack*.pack,and pack*.idx.Can anyone help me ?Thx!I used git-unpack-objects ,and it was useless,those unpacked files were not C++ source files.And I have been tring to solve this problem for nearly two days ,I am gona be mad.

Posted

you shouldn't have to extract anything if you install msysgit and just type the following:

git clone git://github.com/mangos/mangos.git

you should get a full download of the mangos source. just follow the guides.

Posted

I did follow the guide,but in my object directory there are only a .pack file and a .idx file,the whole size of the directory is about 15.5MB.:mad:So none of you ever encountered this problem?

Posted
I did follow the guide,but in my object directory there are only a .pack file and a .idx file,the whole size of the directory is about 15.5MB.:mad:So none of you ever encountered this problem?

your .git/objects/pack/ directory?

Go to your working tree (outside .git/) and do a "git reset --hard".

Posted

I think I have got the key.That is,I used git gui to clone the responsitory ,but not from its bash comand.Then I tried to use the bash command to do so ,and the files were what I need ,just like the SVN(out side the .git directory) ,though there are still new .pack and .idx file in the pack directory .It's a bit wired,may be I have not mastered this little tool!None the less,thx ,guys,for your help!

Posted

those files will always be there as will the .git directory. the pack files are in laymans terms a compressed archive of the code and the changes. if you pay attention when you do a clone and if you monitor the folder it is being cloned to you will see that it is empty for most of the process and when git goes through the checkout process you will notice that that is when you get all the source folders built. the checkout process is git taking the compressed contents out of the pack files.

Posted
I think I have got the key.That is,I used git gui to clone the responsitory ,but not from its bash comand.Then I tried to use the bash command to do so ,and the files were what I need ,just like the SVN(out side the .git directory) ,though there are still new .pack and .idx file in the pack directory .It's a bit wired,may be I have not mastered this little tool!None the less,thx ,guys,for your help!

You probably selected a "bare repository" when cloning, ie. repo without a working tree (= without source files and such things).

Such repository contain all you need, just set "bare = true" to false in config and do that hard reset. It's possible to "convert" a bare repo to normal one this way.

Note that Git recognizes a bare repo by the name of your git data directory, the "bare = true" is just to disable commands like git-checkout, ...

That means if your data dir is called ".git", it's normal repo and source files should be outside it, with any other name, it's a bare repo.

Bare repositories are used for hosting (where you just push & pull, no need for working tree (at least in Git)) for example.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use