On Wed, Jul 2, 2008 at 10:10 PM, Stephen R. van den Berg <srb@cuci.nl> wrote:This script is just a prove of the concept. It seems to work for me, but I don't really tested it. =========================================== #!/bin/bash set -e # creating some silly repo git init # creating some history for ((i=0; $i<10; i++)) do echo foo$i > foo$i git add foo$i git commit -m "add foo$i" done # run gitk to see it gitk --all & # dump all graft info to text file git rev-list --parents --all > .git/info/grafts.tmp mv .git/info/grafts.tmp .git/info/grafts # please choose what commit you want to edit echo while read -p 'Edit commit: ' C do C=$(git rev-parse "$C") || continue # edit commit C git cat-file commit $C > .git/COMMIT_OBJ vim .git/COMMIT_OBJ C2=$(git hash-object -w -t commit .git/COMMIT_OBJ) # replace all references from C to C2 sed -e 's/\<'$C'\>/'$C2'/g' < .git/info/grafts > .git/info/grafts.tmp mv .git/info/grafts.tmp .git/info/grafts done =========================================== Dmitry -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tejun Heo | [PATCH 2/5] sysfs: simplify sysfs_rename_dir() |
| Andi Kleen | [PATCH x86] [0/16] Various i386/x86-64 changes |
| Dave Hansen | Re: [RFC/PATCH] Documentation of kernel messages |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Thomas Gleixner | Re: [BUG] New Kernel Bugs |
