Re: Reference to a commit inside a commit message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks to all.
With interpret-trailers has been easy to make a simple script, also it
checks if the Hash passed is a valid Object.
I haven't found a simple way to mantain the blank line above the
output of interpet-trailers (not even through cleanup).
Follows the script, maybe could be usefull for somebody:

#!/bin/sh
for i in $*
do
    git show $i &> /dev/null
    if [ $? = 0 ]
    then
        trailers+=" see-also=$i"
    fi
done

msg=$(cat /dev/null | ../git-interpret-trailers $trailers)

git commit -m "$msg" -e
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]