Revisão | 00c36afad2296092106653f2dea4c290ebe37bfc (tree) |
---|---|
Hora | 2014-06-11 01:39:36 |
Autor | umorigu <umorigu@gmai...> |
Commiter | umorigu |
Keep the file timesamp of commit time
@@ -205,6 +205,15 @@ if [ "$__git" ] ; then | ||
205 | 205 | cd $pkg_dir |
206 | 206 | echo git reset --hard "$tag" |
207 | 207 | git reset --hard "$tag" |
208 | + | |
209 | + # Set file timestamp | |
210 | + for FILE in $(git ls-files); do | |
211 | + TIME=$(git log --pretty=format:%ci -n1 $FILE) | |
212 | + echo $TIME'\t'$FILE | |
213 | + STAMP=$(date -d "$TIME" +"%y%m%d%H%M.%S") | |
214 | + touch -t $STAMP $FILE | |
215 | + done | |
216 | + | |
208 | 217 | cd .. |
209 | 218 | else |
210 | 219 | exit |