git diffคำสั่งเตะค่าตัวเลือกสำหรับ--stat:
--stat[=<width>[,<name-width>[,<count>]]]
Generate a diffstat. You can override the default output width for
80-column terminal by --stat=<width>. The width of the filename
part can be controlled by giving another width to it separated by a
comma. By giving a third parameter <count>, you can limit the
output to the first <count> lines, followed by ... if there are
more.
These parameters can also be set individually with
--stat-width=<width>, --stat-name-width=<name-width> and
--stat-count=<count>.
(สำหรับการเขียนสคริปต์คุณอาจต้องการใช้git diff-treeโดยตรงเนื่องจากเป็นคำสั่ง "ท่อประปา" มากกว่าแม้ว่าฉันสงสัยว่าคุณจะสบายดีก็ตามโปรดทราบว่าคุณต้องใช้ข้อความพิเศษเดียวกันกับ--statเมื่อใช้git diff-treeข้อแตกต่างที่สำคัญระหว่างการใช้git diff"เครื่องเคลือบดินเผา "ส่วนหน้าและgit diff-treeคำสั่งเกี่ยวกับท่อประปาคือgit diffค้นหาการตั้งค่าที่กำหนดไว้ของคุณสำหรับตัวเลือกต่างๆเช่นdiff.renamesการตัดสินใจว่าจะทำการตรวจจับการเปลี่ยนชื่อหรือไม่นอกจากนั้นส่วนหน้าgit diffจะเทียบเท่ากับgit diff-indexว่าคุณกำลังเปรียบเทียบการกระทำกับดัชนี ตัวอย่างเช่นกล่าวอีกนัยหนึ่งคือgit diff อ่านการกำหนดค่าของคุณและเรียกใช้ท่อประปาที่ถูกต้องโดยอัตโนมัติ )