add function update sha1 of previous files

* .gitdata file is sorted by path of files.