discussion: an option to fail git fetch if a pulled branch tip is not a fast forward of the existing remote tip?
- From
Jon Seymour <jon.seymour@gmail.com>
- Date
- Jan 13, 2010, 11:54 UTC
- Message-ID
- <2cfc40321001130354w626ec0fat7abdfaff9771c29f@mail.gmail.com>
I spent a little while this afternoon debugging an issue where an upstream publisher had backtracked and published a branch tip which was not a descendant of a previously published (and fetched) branch tip. The net result was that the backtracked changes were preserved in the downstream branch once the 2nd tip was pulled.
Now clearly the upstream developer should not have backtracked. That said, it would have been nice if I could have easily configured my porcelain to detect the backtracking condition. An option on git fetch that implemented something similar to the git push check would have made this easy to achieve.
Has any consideration been given to such an option? Is there a well-known alternative pattern for detecting this case?
jon.