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

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

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

    隨筆-11  評(píng)論-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 閱讀(268) 評(píng)論(0)  編輯  收藏

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲国产一区视频| 免费成人在线观看| 亚洲欧洲国产精品久久| 日韩精品无码免费专区网站| 亚洲人成网77777色在线播放| 国产免费区在线观看十分钟 | www.亚洲色图.com| 免费无码一区二区| 亚洲一区二区三区在线视频| 日批视频网址免费观看| 久久夜色精品国产亚洲| 免费看又黄又无码的网站| 久久久无码精品亚洲日韩按摩| 1a级毛片免费观看| 亚洲最大无码中文字幕| 国产精品免费_区二区三区观看| 毛片亚洲AV无码精品国产午夜| 亚洲国产婷婷香蕉久久久久久| 最新久久免费视频| 亚洲激情电影在线| 免费看少妇作爱视频| 免费无码午夜福利片| 亚洲第一精品在线视频| 和日本免费不卡在线v| 欧美亚洲国产SUV| 国产亚洲美女精品久久久2020| 色猫咪免费人成网站在线观看| 亚洲人成在线精品| 一级毛片直播亚洲| 99视频有精品视频免费观看| 亚洲精品一二三区| 亚洲精品自产拍在线观看| 24小时免费看片| 羞羞视频免费网站入口| 亚洲日韩区在线电影| 日韩电影免费在线| 国产好大好硬好爽免费不卡| 亚洲色大成网站www尤物| 国产亚洲真人做受在线观看| 成年女人午夜毛片免费看| 一级特黄录像免费播放中文版|