path.c: optimize adjust_shared_perm()
authorTorsten Bögershausen <tboegi@web.de>
Sat, 30 Mar 2013 09:53:47 +0000 (10:53 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Apr 2013 19:39:38 +0000 (12:39 -0700)
Sometimes the chown() function is called even when not needed (This
can be provoked by running t1301, and adding some debug code).

Save a chmod from 400 to 400, or from 600 to 600 on these files:

.git/info/refs+
.git/objects/info/packs+

Save chmod on directories from 2770 to 2770:

.git/refs
.git/refs/heads
.git/refs/tags

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found