proper javascript for files in the same commit graph