<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)  編輯  收藏

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


    網站導航:
     
    主站蜘蛛池模板: 在线观看亚洲精品国产| aaa毛片免费观看| 丁香花免费完整高清观看| 亚洲人成依人成综合网| 一级毛片在线观看免费| 无码久久精品国产亚洲Av影片| 你好老叔电影观看免费| 久久久久国产亚洲AV麻豆| 成人免费一区二区三区| 亚洲AV天天做在线观看| 亚洲美女免费视频| 亚洲乱码av中文一区二区| 国产午夜影视大全免费观看 | 亚洲国产成人综合| 最近中文字幕无吗免费高清| 久久精品熟女亚洲av麻豆| mm1313亚洲精品国产| 国产一区二区三区免费观在线| 久久精品国产99精品国产亚洲性色| 91高清免费国产自产| 亚洲av无码一区二区三区在线播放 | 亚洲国产一区明星换脸| 热99RE久久精品这里都是精品免费 | 亚洲av成人无码网站…| 久久精品亚洲福利| jjizz全部免费看片| 亚洲av综合av一区二区三区| 久久亚洲2019中文字幕| 午夜视频免费在线观看| 亚洲一久久久久久久久| 狠狠亚洲狠狠欧洲2019| **毛片免费观看久久精品| 一本色道久久88—综合亚洲精品 | 亚洲伊人久久大香线蕉AV| 免费v片视频在线观看视频| 爱丫爱丫影院在线观看免费| 亚洲综合无码无在线观看| 亚洲一区二区三区香蕉| 日本XXX黄区免费看| 久久精品无码免费不卡| 亚洲乱码一二三四区乱码|