<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-11  評論-10  文章-8  trackbacks-0
    Fist one, I call it git2svn. We know 'git diff' has the format like this:
    diff --git a/hello.git b/hello.git
    index 808c280..3e60fff 
    100644
    --- a/hello.git
    +++ b/hello.git
    @@ 
    -1,2 +1,3 @@
     
    111111
     sdfsfsdf
    +111

    It's different with svn diff output format which we are familiar with, although patch can work with this format, but it would be strange if we applied a patch with git format to a open source project which use SVN as source repository. That's why i wrote git2svn, which convert git diff format to svn diff format. It's very very simple, only one line:
    #! /bin/sh

    # convert git diff output to svn format:
    # git diff like:
    #
    # diff 
    --git a/hello.git b/hello.git
    # index 90d2950..808c280 
    100644
    --- a/hello.git
    +++ b/hello.git
    #
    # after converting, it
    's our familiar svn diff format
    #
    # Index: hello.git
    =====================================================================
    --- hello.git
    +++ hello.git
    #
    # It
    's useful to apply patch to project using svn as their repository and
    # you use git for your local work

    sed 
    -'/^[iI]ndex/s/^index.*/=====================================================================/' -'/^diff/s/^diff --g\
    it a\//Index: /' -e '/^Index:/s/ b\/.*//' -e '/^--- a\//s/--- a\//--- /' -e '/^+++ b\//s/+++ b\//+++ /' $*

    Another, can't call it as 'tool' exactly, I think, just a convenient way or shortcut to query which files are changed in one or between two commits and their status, like 'svn diff --summarize':
    #! /bin/sh

    #summary changed files which status, in one commit or between two commits

    git
    -diff-tree ---name-status --pretty=format:"%Cgreen%s    %CblueSHA1: %H%Creset" $*

    You can also do it like this:
    alias git-diff-tree ---name-status --pretty=format:"%Cgreen%s    %CblueSHA1: %H%Creset" git-changed-files
    and add this line to your $HOME/.bashrc

    posted on 2008-05-27 00:57 JBahamut 閱讀(267) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲AV无码欧洲AV无码网站| 亚洲人成网网址在线看| 一级做a爰全过程免费视频| 亚洲人6666成人观看| 免费a级毛片永久免费| 国内少妇偷人精品视频免费| 亚洲一区二区三区免费视频| 亚洲欧洲久久av| 18女人毛片水真多免费| 日韩在线视精品在亚洲| 亚洲国产成人片在线观看无码| 大学生a级毛片免费观看| 不卡视频免费在线观看| 中国china体内裑精亚洲日本| 亚洲午夜国产精品无码老牛影视| 免费黄色福利视频| 国产精品青草视频免费播放| 亚洲精品在线免费观看| 久久亚洲欧洲国产综合| 好吊妞788免费视频播放| 国产99视频精品免费专区| 另类小说亚洲色图| 亚洲国产日韩在线成人蜜芽| 亚洲深深色噜噜狠狠爱网站| 女人18毛片免费观看| 日本免费高清视频| 成人免费网站视频www| 在线观看亚洲AV日韩AV| 久久久久亚洲AV成人无码网站| 国产一区二区三区在线免费 | 亚洲毛片免费视频| 亚洲毛片不卡av在线播放一区| 在线免费视频一区| 6080午夜一级毛片免费看 | 香蕉免费看一区二区三区| 亚洲精品GV天堂无码男同| 亚洲综合久久综合激情久久| 久久久久亚洲AV无码专区桃色| 无人在线观看完整免费版视频| 无码A级毛片免费视频内谢| 国产精品免费大片一区二区|