The default abbreviation length depends on factors like user configuration, git version and number of repository objects. Use unabbreviates IDs to make patch generation more reproducible.
		
			
				
	
	
		
			22 lines
		
	
	
		
			583 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			583 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| set -e
 | |
| shopt -s nullglob
 | |
| 
 | |
| . "$GLUONDIR"/scripts/modules.sh
 | |
| 
 | |
| for module in $GLUON_MODULES; do
 | |
| 	echo "--- Updating patches for module '$module' ---"
 | |
| 
 | |
| 	rm -f "$GLUONDIR"/patches/"$module"/*.patch
 | |
| 	mkdir -p "$GLUONDIR"/patches/"$module"
 | |
| 
 | |
| 	cd "$GLUONDIR"/"$module"
 | |
| 
 | |
| 	n=0
 | |
| 	for commit in $(git rev-list --reverse --no-merges base..patched); do
 | |
| 		let n=n+1
 | |
| 		git -c core.abbrev=40 show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames "$commit" > "$GLUONDIR/patches/$module/$(printf '%04u' $n)-$(git show -s --pretty=format:%f "$commit").patch"
 | |
| 	done
 | |
| done
 |