cmaitchison / git_diet Goto Github PK
View Code? Open in Web Editor NEWWhen your git repo needs to lose some weight...
When your git repo needs to lose some weight...
purge_objects.sh works beautifully in Mac OS, however, it does not work in my Linux machine. Below is the sample output in Linux
./purge_objects.sh 3p/src/jdk-8u181-linux-x64.tar.gz raw_size(KB) compressed_size(KB) SHA path exists 181295 180688 9f7993fdc39a7b211f306ad1589c4ec920b058ce 3p/src/jdk-8u181-linux-x64.tar.gz
If the filename has a space in it, the path is only showing the first part of the name. It may be an awk issue. I'll see if I can figure it out.
Is there a way that I could tell your script to delete older versions only (5 or commits back) of the largest files it found?
I'm working with a lot of image files and I never needed to restore a very old version, but they're eating up a lot of space on my repo.
I'm not sure this is the best way to contact the author. I'm new to Github and I couldn't find another way.
Thanks!
bash-3.2$ git clone https://github.com/cmaitchison/git_diet.git
Cloning into 'git_diet'...
remote: Counting objects: 61, done.
remote: Total 61 (delta 0), reused 0 (delta 0), pack-reused 61
Unpacking objects: 100% (61/61), done.
bash-3.2$ cd git_diet/
bash-3.2$ spec/test.sh
FAIL: Didn't get expected number of output lines for find_fattest_objects.sh -n 5
bash-3.2$ cd spec/test-repo
bash-3.2$ git log
commit 009033bf9c764826d01e246c7e6535a6f32fe5c1
Author: cmaitchison <[email protected]>
Date: Sun Oct 9 19:32:03 2011 +1100
Deleted file_6.txt
[.....]
bash-3.2$ ../../bin/find_fattest_objects.sh -n 5
The repo is empty
bash-3.2$ ls
file_2.txt file_4.txt somedir
When run in a directory which is not a git repository root, the error is
fatal: Cannot open existing pack file '.git/objects/pack/pack-*.idx'
A clearer error would be better.
Additionally, the script could work also inside nested folders within the git repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.