Ray Salemi
Ray Salemi

Reputation: 5933

Find Git version with --allow-unrelated-histories

I have a script that uses git pull --allow-unrelated-histories and I want to provide a version requirements list.

I know that Git 1.7.1 does not allow unrelated histories, and I know that Git 2.15.1 does (since I'm running that).

How do I find out the minimum Git version a user needs in order to run the script?

Upvotes: 1

Views: 109

Answers (1)

torek
torek

Reputation: 489848

You asked how to find it rather than what is it, and the answer to that is to look through the Git release notes. In general, big changes—like adding the flag, and requiring it, rather than simply assuming that the merge should merge unrelated histories—get a release-notes entry.

(In this case you'll find it in the 2.9.0 release notes.)

(Also in general, it's a lot faster to clone the Git repository for Git, then search this Git repository, than it is to poke through individual files using the GitHub web interface links above.)

Upvotes: 3

Related Questions