<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>heureux heure* &#187; Git</title>
	<atom:link href="http://heureux.jp/blog/tag/git/feed" rel="self" type="application/rss+xml" />
	<link>http://heureux.jp/blog</link>
	<description>思いついたことを 思いついたときに 思いついたように</description>
	<lastBuildDate>Fri, 03 Sep 2010 23:10:20 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://heureux.jp/blog/tag/git/feed" />
		<item>
		<title>Git の diff には p4merge?</title>
		<link>http://heureux.jp/blog/2009/11/10/34.html</link>
		<comments>http://heureux.jp/blog/2009/11/10/34.html#comments</comments>
		<pubDate>Mon, 09 Nov 2009 15:20:05 +0000</pubDate>
		<dc:creator>Heureux</dc:creator>
				<category><![CDATA[記事]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://heureux.jp/blog/2009/11/10/34.html</guid>
		<description><![CDATA[タイトルに?をつけたのはちょっと色々起動してると重くて泣きそうになるから（笑）
でも diff を見るならこれが一番見やすいのは確かかも。
すっごい見やすい。
確か OSX の標準は opendiff?
それに比べたら結 [...]]]></description>
			<content:encoded><![CDATA[<p>タイトルに?をつけたのはちょっと色々起動してると重くて泣きそうになるから（笑）</p>
<p>でも diff を見るならこれが一番見やすいのは確かかも。<br />
すっごい見やすい。</p>
<p>確か OSX の標準は opendiff?</p>
<p>それに比べたら結構いい感じ。</p>
<p>だけどそこら辺で説明されてるスクリプトだとやりづらいというか、アプリが多重起動しちゃって困る。<br />
それでちょっとスクリプトを手直しして使ってみてる。<br />
今のところ問題は起こっていない。</p>
<p>とりあえず <a href="http://www.perforce.com/perforce/downloads/index.html">p4merge<br />
</a> をダウンロードしてインストール。</p>
<p>で、普通にシェルスクリプトは</p>
<pre><code>#!/bin/sh
/Applications/p4merge.app/Contents/MacOS/p4merge $*</code></pre>
<p>って解説ばっかなんだけど、これだと多重起動というかとにかく重い・・・。<br />
それでとりあえず自分がやっているのは<br />
p4merge</p>
<pre><code>#!/bin/sh
${HOME}"/Applications/p4merge.app/Contents/Resources/launchp4merge" $*</code></pre>
<p>としている。<br />
もう片方のスクリプトは<br />
p4diff</p>
<pre><code>#!/bin/sh
[ $# -eq 7 ] &#038;&#038; ${HOME}/local/bin/p4merge "$2" ${PWD}/"$5"</code></pre>
<p>でとりあえず問題なく動いています。</p>
<p>あとは .gitconfig に</p>
<pre><code>[merge]
	keepBackup = false;
	tool = p4merge
[mergetool "p4merge"]
	cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
	keepTemporaries = false
	trustExitCode = false
	keepBackup = false
[diff]
	external = p4diff</code></pre>
<p>を設定して完了です。</p>
<p>ということで、Mac では Git の diff 関係は p4merge で使ってみます。</p>
<!-- PHP 5.x -->
	Tags: <a href="http://heureux.jp/blog/tag/git" title="Git" rel="tag">Git</a><br />
]]></content:encoded>
			<wfw:commentRss>http://heureux.jp/blog/2009/11/10/34.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://heureux.jp/blog/2009/11/10/34.html" />
	</item>
	</channel>
</rss>
