|  | @@ -1,12 +1,15 @@
 | 
	
		
			
				|  |  |  cd ..
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  HEAD=$1
 | 
	
		
			
				|  |  | -BRANCH=$(cut -d / -f 3 $1)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -REST_OF_JSON=$(git --no-pager log --format='{ \"hashes\":{ \"commit\":\"%H\", \"tree\":\"%T\", \"parents\":\"%P\" }, \"author\":{ \"date\": \"%ai\", \"name\": \"%an\", \"email\":\"%ae\" }, \"committer\":{ \"date\": \"%ci\", \"name\": \"%cn\", \"email\":\"%ce\" }')
 | 
	
		
			
				|  |  | +# CUT, UNIX
 | 
	
		
			
				|  |  | +# BRANCH=$(echo $1 |cut -d / -f 3)
 | 
	
		
			
				|  |  | +#FUCK BASHSIMS
 | 
	
		
			
				|  |  | +IFS="/"
 | 
	
		
			
				|  |  | +BRANCH=($1)
 | 
	
		
			
				|  |  | +BRANCH=${BRANCH[2]}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -REST_OF_JSON=$(git log --format='{ \"hashes\":\n  {\"commit\":\"%H\",\n  \"tree\":\"%T\",\n  \"parents\":\"%P\"},\n  \"author\":\n  {\"date\":\"%ai\", \n  \"name\":\"%an\",\n      \"email\":\"%ae\"},\n  \"committer\":\n  {\"date\": \"%ci\", \"name\": \"%cn\", \"email\":\"%ce\"},\n')
 | 
	
		
			
				|  |  | +REST_OF_JSON=$(git --no-pager log -n 1 --format='{"hashes":{"commit":"%H", "tree":"%T", "parents":"%P" }, "author":{"date": "%ai", "name":"%an", "email":"%ae" }, "committer":{"date": "%ci", "name": "%cn", "email":"%ce" }')
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -REST_OF_JSON=$REST_OF_JSON:"branch\:":$BRANCH:"}"
 | 
	
		
			
				|  |  | +REST_OF_JSON=$REST_OF_JSON:"branch:"${BRANCH}"}"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  echo $REST_OF_JSON > /home/ozn/bla
 | 
	
		
			
				|  |  | +
 |