Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の git コマンド...
git show -s --pretty=format:%T master
...マスターの現在のヘッドのSHA1を発行します。
ただし、次の MSBuild タスクはリテラル 'T' のみを生成します。
<Exec Command="git show -s --pretty=format:%T master" />
本物の SHA1 を発行するには、何を変更する必要がありますか?
したがって、どうやらトリックは % 記号を二重にエスケープすることです。
すなわち
<Exec Command="git show -s --pretty=format:%25%25T master" />
なぜこれが機能するのかはよくわかりませんが、なぜこれが機能するのかについてコメントをいただければ幸いです。