[PATCH 2/2] Truncate the SHA1 part of the submodule name to 7 characters

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

 



The rationale is that a submodule naming clash is a highly infrequent
event (as compared to a file naming clash) so we can minimise the
ugliness of generated submodule names by using a smaller number
of characters.

Signed-off-by: Peter Collingbourne <peter@xxxxxxxxx>
---
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 4f0d7df..e85f2d1 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -127,7 +127,7 @@ gen_uid()
 	 echo "$path"
 	 echo $$
 	 date
-	) | git hash-object --stdin
+	) | git hash-object --stdin | cut -c1-7
 }
 
 #
-- 
1.6.5

--
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]