logoalt Hacker News

kazinator • yesterday at 6:32 PM • 1 reply • view on HN

Make git init use SHA-256 if git is invoked as git3, SHA1 if invoked as git2.

Plain git init could fail with a diagnostic: informing to use one of the two aliases or an option.

What people don't want is making git repos SHA-256 by accident and finding out later that they made repos not compatible with older git.


Replies

metalliqaz • yesterday at 6:45 PM

just make SHA1 the default in all cases unless the user specifies otherwise

➕ show 1 reply