2009年5月4日 星期一

git format-patch --no-prefix -p

一般的 git diff 輸出長得像是這樣子
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6853012..baecc35 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -9,3 +9,4 @@ src/view/telnetview.cpp
 src/emoticondlg.cpp
 src/autologinpage.cpp
 src/downarticledlg.cpp
+src/pcmanx_gtk2.cpp
其中有 a/... b/... 實在不是很喜歡
改用 git diff --no-prefix 輸出就變成了
diff --git po/POTFILES.in po/POTFILES.in
index 6853012..baecc35 100644
--- po/POTFILES.in
+++ po/POTFILES.in
@@ -9,3 +9,4 @@ src/view/telnetview.cpp
 src/emoticondlg.cpp
 src/autologinpage.cpp
 src/downarticledlg.cpp
+src/pcmanx_gtk2.cpp
同樣的用法也可以使用在 git format-patch --no-prefix
From 66038b61719904c16147945d8c68a0773ef65846 Mon Sep 17 00:00:00 2001
From: jasonxh <jasonxh+c73c965c-c2fa-0310-9a63-82392b9be63f>
Date: Thu, 19 Feb 2009 05:58:15 +0000
Subject: [PATCH] 2009-02-18  Jason Xia  <jasonxh+gmail.com>

    * po/POTFILES.in, po/zh_CN.po, po/zh_TW.po: Update po files. Fix
    Simplified Chinese translation of "Line" and "Col".


git-svn-id: https://svn.csie.net/pcmanx/trunk@464 c73c965c-c2fa-0310-9a63-82392b9be63f
---
 ChangeLog           |    5 ++
 po/POTFILES.in      |    1 +
 po/zh_CN.po         |  174 +++++++++++++++++++++++++++------------------------
 po/zh_TW.po         |  167 +++++++++++++++++++++++++-----------------------
 src/pcmanx_gtk2.cpp |    2 +-
 5 files changed, 186 insertions(+), 163 deletions(-)

diff --git ChangeLog ChangeLog
index ffd2d02..ef74622 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,8 @@
+2009-02-18  Jason Xia  <jasonxh+gmail.com>
+
+   * po/POTFILES.in, po/zh_CN.po, po/zh_TW.po: Update po files. Fix
+   Simplified Chinese translation of "Line" and "Col".
+
 2009-02-07  Youchen Lee  <copyleft+utcr.org>

    * src/mainframe.cpp: For availability to build under (gtk+ < 2.10),
diff --git po/POTFILES.in po/POTFILES.in
index 6853012..baecc35 100644
--- po/POTFILES.in
+++ po/POTFILES.in
@@ -9,3 +9,4 @@ src/view/telnetview.cpp
 src/emoticondlg.cpp
 src/autologinpage.cpp
 src/downarticledlg.cpp
+src/pcmanx_gtk2.cpp
不過 patch 檔前面會多一些統計資料也不是很喜歡
於是改用 git format-patch --no-prefix -p
From 66038b61719904c16147945d8c68a0773ef65846 Mon Sep 17 00:00:00 2001
From: jasonxh <jasonxh+c73c965c-c2fa-0310-9a63-82392b9be63f>
Date: Thu, 19 Feb 2009 05:58:15 +0000
Subject: [PATCH] 2009-02-18  Jason Xia  <jasonxh+gmail.com>

    * po/POTFILES.in, po/zh_CN.po, po/zh_TW.po: Update po files. Fix
    Simplified Chinese translation of "Line" and "Col".


git-svn-id: https://svn.csie.net/pcmanx/trunk@464 c73c965c-c2fa-0310-9a63-82392b9be63f

diff --git ChangeLog ChangeLog
index ffd2d02..ef74622 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,8 @@
+2009-02-18  Jason Xia  <jasonxh+gmail.com>
+
+   * po/POTFILES.in, po/zh_CN.po, po/zh_TW.po: Update po files. Fix
+   Simplified Chinese translation of "Line" and "Col".
+
 2009-02-07  Youchen Lee  <copyleft+utcr.org>

    * src/mainframe.cpp: For availability to build under (gtk+ < 2.10),
diff --git po/POTFILES.in po/POTFILES.in
index 6853012..baecc35 100644
--- po/POTFILES.in
+++ po/POTFILES.in
@@ -9,3 +9,4 @@ src/view/telnetview.cpp
 src/emoticondlg.cpp
 src/autologinpage.cpp
 src/downarticledlg.cpp
+src/pcmanx_gtk2.cpp
因為老是會忘記這個用法,所以寫篇 blog 紀錄一下。:-P

沒有留言: