TL DR (but not verified)
Like a shell script:
git rev-list --merges HEAD |
while read rev; do
thistree=$(git rev-parse $rev^{tree})
p1tree=$(git rev-parse $rev^1^{tree})
if [ $thistree = $p1tree ]; then
echo "commit $rev has the effect of -s ours"
fi
done
Long
The immediate answer is no (but readable). The actual strategy used is not automatically recorded. (If the people doing all the mergers were very self-disciplined, maybe they wrote down this information in every merger message. According to your description of the problem, this clearly did not happen ....) But this is not necessarily an interesting problem anyway. Perhaps someone will create a merger that has an effect -s ourswithout actually using a strategy ours.
A more interesting question is the automatic search for mergers that affect -s ours, regardless of whether this option was used; and it is easily automated.
The task is reduced to:
- :
git rev-list. - ,
-s ours: ... , . ; .
, , git rev-list. git log, git rev-list , Git , , , , , .
, HEAD, , , , , . , --branches ( ) --all ( , , , , refs/stash ).
. - : --min-parents=2. , , , :
git rev-list --merges HEAD
, , , HEAD. ( . Think Like (a) Git.)
git rev-list - , rev-list, --merges ( ): , . , .
, , . -s ours , Git, ( ) , . , ( theirs -, , -s theirs), , , " ", , , .
:
- :
git diff ( ) . - , , . ;
git diff , .
tree shell-script, , , Git, "read every commit hash":
while read rev; do ...; done
$rev.
$rev (a commit) :
git rev-parse $rev^{tree}
gitrevisions, - . :
thistree=$(git rev-parse $rev^{tree})
. , gitrevisions, ${rev}^1. , . , , :
p1tree=$(git rev-parse $rev^1^{tree})
, commit $rev -s ours, , -s ours, git show .
( ) .