packfiles | npm goggles for your package : see what files npm sees | Runtime Evironment library
kandi X-RAY | packfiles Summary
kandi X-RAY | packfiles Summary
npm goggles for your package: see what files npm sees – tiny cli utility to list the files npm will include in its published tarball.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of packfiles
packfiles Key Features
packfiles Examples and Code Snippets
Community Discussions
Trending Discussions on packfiles
QUESTION
During debugging of a production issue, I am dealing with an application (Gerrit) that holds references to RandomAccessFiles in a cache structure.
These files are referencing a git repositories packfiles.
During an out of band git gc
(not within the application) on a repository with no changes, it appears that:
- the same packfile is rewritten (same uuid);
- file descriptor is in the output list of lsof in the form (old-xxx.pack) but is instantly mark (deleted).
I have been searching numerous codebases for this rename to no avail.
My question is, could this be a filesystem quirk, if a rename/overwrite is done to a file with an open file descriptor by git gc?
lsof entry:
...ANSWER
Answered 2021-Apr-15 at 01:13If you do a standard git gc
in a repository with no changes, this is expected. Git names its packfiles by a hash of their contents. Because Git doesn't recompute deltas for existing packs, when you git gc
and there's only one pack and no loose objects, it's very likely that it will pack all the data into one pack that's the same as the old one.
When this happens, Git still has a file descriptor to the old pack open because it doesn't close packs immediately. This is because often it's necessary to access them again, so it will try to leave them open a little while. The old pack, which is still open, is renamed to the old name, and the new pack is renamed into place; the old pack is then deleted. On a Unix system, it's completely possible to delete a file for which you have the file descriptor open; when the last process closes its file descriptor, the storage is freed.
So this all seems completely normal for the scenario you're describing. Usually git gc
is not a no-op, since additional objects are added to or removed from the pack or multiple packs are combined into one. But, if you do run a git gc
immediately after running one with no intermediate changes, this is expected.
QUESTION
Is there a way to tell Git to create packfiles based on file types, and to specify the delta-ification and zlib compression for those classes / types?
I have a rather large repository, much of which is composed of image assets and translation files (.po), the latter actually being the largest fraction of the working copy and the repository data.
- For the image assets, neither delta nor zlib compression are useful: the images are already compress (so they don't compress well under zlib) and delta compression does nothing useful when small changes tend to cascade through the compressed image (and are rare anyway, usually once the asset is committed it's either left alone forever or replaced wholesale).
- For the PO files, while they're technically text files I would expect them to delta-compress very badly for this specific repository: the historical generator / exporter would export the translations in essentially random order so from one export to the next it's as if the entire file has been rewritten.
As a result, when the repository is repacked I'd like to try packing the images together neither delta-compress nor zlib-compress them, and the PO files together and zlib-compress them (at the maximum possible level) but not delta-compress them. This way they ought not waste cycles on useless compression work, and should avoid polluting the compression of more "normal" code files.
However my previous experiments in packfiles did not go well. Is there builtin support for this sort of segregation & configuration which I missed, or would I need to build the packs by hand using low-level commands or even libgit2 directly?
...ANSWER
Answered 2021-Jan-25 at 08:46Alas, no: the controls available are only the following:
core.bigFileThreshold
: files that exceed this size are not packed, merely zlib-compressed.pack.island
and several related settings: these set up so-called delta islands, as described in thegit pack-objects
documentation.
These do not come anywhere close to what you want. (Note: there is also core.compression
and two related items, but these are strictly global, not per-object.)
QUESTION
I'd like to remove objects (.git/objects
) from my repository that are no longer referenced by any refs, but I don't want to pack to pack files.
I tried git gc --no-prune
but it still removed all objects from my repo and left only packfiles (git count-objects
reports "0 objects, 0 kilobytes").
ANSWER
Answered 2020-Oct-12 at 21:40git gc
is a wrapper for a whole series of smaller maintenance operations:
git reflog expire
git repack
git prune-packed
(actually done bygit repack
automatically when you use-d
)git prune
- any others I may have forgotten
and git prune
is the one that specifically removes unreferenced objects. Note that git gc
supplies an expiry time so that git prune
won't remove unreferenced objects that are still being constructed. If you have no active Git commands that might be constructing objects, and don't want to provide the gc default grace period, you don't need to worry about this.
QUESTION
In my code you have a choice of either uploading a file or not and if you don't it should just end the code, but if you do upload a file and select an appropriate pack name(which is a database name they created) then it is suppose to run the code and submit to file directory. But my problem is that in this line of code
...ANSWER
Answered 2017-Aug-19 at 15:18// check and see whether is empty
if(!empty($_FILES['packFiles']['name'])){
foreach($_FILES['packFiles']['tmp_name'] as $key => $error){
$filename = file_get_contents($_FILES['packFiles']['tmp_name'][$key];
// check file_get_contents
if($pack_tmp = file_get_contents($filename) !== false){
$pack_filename = preg_replace("/[^a-z0-9\.]/", "_", strtolower($_FILES['packFiles']['name'][$key]));
$pack_filename = strtotime("now")."_".$pack_filename;
$file_name .= $_FILES['packFiles']['name'][$key].",";
//Insert into file directory
$dir = "devPacks/" .$userid."/".$packid;
if(is_dir($dir)== false){
mkdir($dir, 0777, true);
}
if(move_uploaded_file($_FILES['packFiles']['tmp_name'][$key],$dir.'/'.$pack_filename)){
}else{
die("an error occurred sending this file... Pleas try again later!");
}
}
}
}else{
//error any error message u want.
}
QUESTION
I am trying to create a simple WCX plugin for Total Commander.
I downloaded wcxhead.pas
from here (it's in the help file):
http://ghisler.fileburst.com/plugins/wcx_ref2.21se_chm.zip
This is the official file linked here: https://www.ghisler.com/plugins.htm
And created my own DLL:
...ANSWER
Answered 2020-Jan-15 at 15:58The header was clearly created from a pre-Unicode Delphi time. It suppose char
= AnsiChar
which is not true since Delphi 2009.
IIRC from forums, TotalCommander 32-bit is still compiled with Delphi 2 or Delphi 3, with a lot of custom RTL, to keep it small and efficient.
If you are using an Unicode version of Delphi, try to change char
into AnsiChar
, and use the *W()
exports with Unicode support.
Also don't use global variables to maintain the state of the packer access: you should use the THandle
value to open/close a given archive file. Two archives may be opened at the same time.
Edit: since you are using Delphi 7, this is not an Unicode problem. But I would try
QUESTION
In a pack file there are records, which according to this post have the type stored in the header, along with some other metadata.
Looking at the JGit source I can see the following values.
- 0 - EXTENDED
- 1 - COMMIT
- 2 - TREE
- 3 - BLOB
- 4 - TAG
- 5 - RESERVED
- 6 - OFS_DELTA
- 7 - REF_DELTA
However, if the object is deltified then the type in the header will be set to 6 or 7, and after that there seems to be no added header showing the type of the payload, just some method of getting the original and then the delta data.
How can git tell the type of a deltified pack record, so that it doesn't mix up types?
...ANSWER
Answered 2018-Feb-08 at 14:29By design, Git does not store deltas of objects of different types. You can find confirmation of this in lengthy description/discussion provided with Git source code in file Documentation/technical/pack-heuristics.txt
.
(…) What this means is:
- we do not delta different object types.
- (… )
Therefore it follows, that you can infer object type either from:
- REF_DELTA: object referenced by first 20-bytes of pack file entry
- OFS_DELTA: object occupying position earlier in a pack (more details in
Documentation/technical/pack-format.txt
)
QUESTION
I wanted to use git-lfs
to add a large binary into my git repository but that failed:
ANSWER
Answered 2017-Nov-09 at 05:04Use below commands. It will remove loose objects from .git
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install packfiles
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page