mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
Tools for making a browseable graphical revision history of schematics.
- scripts/gitsch2ppm: extract schematics as PPM files from a specfific git revision - scripts/gitenealogy: show the commit history of a file, tracking renames - scripts/ppmdiff/Makefile, scripts/ppmdiff/ppmdiff.c: compare two PPM files and highlight differences - scripts/schhist2web: generate a browseable graphical revision history of schematics
This commit is contained in:
29
scripts/gitenealogy
Executable file
29
scripts/gitenealogy
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# gitenealogy - Trace the ancestry of a file in git across renames
|
||||
#
|
||||
# Written 2010 by Werner Almesberger
|
||||
# Copyright 2010 Werner Almesberger
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $0 path" 2>&1
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
[ -z "$1" -o ! -z "$2" ] && usage
|
||||
[ ! -f "$1" ] && usage
|
||||
|
||||
git log --follow --name-status "$1" |
|
||||
awk '
|
||||
/^commit /{ if (c) print c, n; c = $2 }
|
||||
{ if (NF) n = $(NF) }
|
||||
END { if (c) print c, n; }'
|
||||
Reference in New Issue
Block a user