<?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/"
	>

<channel>
	<title>git - Naver Ending Study</title>
	<atom:link href="https://nangchang.nes.or.kr/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>https://nangchang.nes.or.kr</link>
	<description></description>
	<lastBuildDate>Mon, 13 Jun 2022 03:50:30 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>
	<item>
		<title>git gc 실행 시 fatal: Out of memory, malloc failed 에러</title>
		<link>https://nangchang.nes.or.kr/git-gc-%ec%8b%a4%ed%96%89-%ec%8b%9c-fatal-out-of-memory-malloc-failed-%ec%97%90%eb%9f%ac/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=git-gc-%25ec%258b%25a4%25ed%2596%2589-%25ec%258b%259c-fatal-out-of-memory-malloc-failed-%25ec%2597%2590%25eb%259f%25ac</link>
					<comments>https://nangchang.nes.or.kr/git-gc-%ec%8b%a4%ed%96%89-%ec%8b%9c-fatal-out-of-memory-malloc-failed-%ec%97%90%eb%9f%ac/#respond</comments>
		
		<dc:creator><![CDATA[낭창]]></dc:creator>
		<pubDate>Sat, 24 Mar 2012 07:53:31 +0000</pubDate>
				<category><![CDATA[프로그래밍 이야기]]></category>
		<category><![CDATA[git]]></category>
		<guid isPermaLink="false">http://nangchang.nes.or.kr/?p=479</guid>

					<description><![CDATA[<p>git gc를 하다보니 난데없는 Out of memory 에러가 났다. git 에서 메모리를 과하게 쓰는건지&#8230;. 어쨌든 이 문제는 repack 명령을 사용하여 임시적으로 해결이 가능하다. git repack -adf &#8211;window=2 window 갯수가 디폴트가 10 라고 하는거 같은데, &#8211;window 옵션을 숫자를 에러가 안 날때까지 적당히 줄여 주면 된다. 그리고 다시 git gc를 하면 문제없이 수행이 된다. 그런데 gc &#8211;aggressive [&#8230;]</p>
<p>The post <a href="https://nangchang.nes.or.kr/git-gc-%ec%8b%a4%ed%96%89-%ec%8b%9c-fatal-out-of-memory-malloc-failed-%ec%97%90%eb%9f%ac/">git gc 실행 시 fatal: Out of memory, malloc failed 에러</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></description>
										<content:encoded><![CDATA[<div class="xhtmlEditorBody">
<p>git gc를 하다보니 난데없는 Out of memory 에러가 났다. </p>
<p>git 에서 메모리를 과하게 쓰는건지&#8230;.</p>
<p>어쨌든 이 문제는 repack 명령을 사용하여 임시적으로 해결이 가능하다.</p>
<blockquote><p>git repack -adf &#8211;window=2</p></blockquote>
<p>window 갯수가 디폴트가 10 라고 하는거 같은데, &#8211;window 옵션을 숫자를 에러가 안 날때까지</p>
<p>적당히 줄여 주면 된다.</p>
<p>그리고 다시 git gc를 하면 문제없이 수행이 된다.</p>
<p>그런데 gc &#8211;aggressive 를 할 경우에는 또 해당 에러를 만날 수도 있다.</p>
<p>좀 난감했는데, config 를 통해 window 메모리 크기를 설정할 수 있다.</p>
<blockquote><p>git config pack.windowMemory 128m</p></blockquote>
<p>이 값 역시 에러가 안날 때 까지 적당히 줄여 주면 된다.</p>
<p>써보지는 않았지만 다음 config 도 같이 사용하면 문제 해결에 도움이 되는거 같다.</p>
<blockquote><p>git config pack.packSizeLimit 20m</p></blockquote>
</div><p>The post <a href="https://nangchang.nes.or.kr/git-gc-%ec%8b%a4%ed%96%89-%ec%8b%9c-fatal-out-of-memory-malloc-failed-%ec%97%90%eb%9f%ac/">git gc 실행 시 fatal: Out of memory, malloc failed 에러</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://nangchang.nes.or.kr/git-gc-%ec%8b%a4%ed%96%89-%ec%8b%9c-fatal-out-of-memory-malloc-failed-%ec%97%90%eb%9f%ac/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>git svn 에서 저장소 relocate 하기</title>
		<link>https://nangchang.nes.or.kr/git-svn-relocate-repository/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=git-svn-relocate-repository</link>
					<comments>https://nangchang.nes.or.kr/git-svn-relocate-repository/#respond</comments>
		
		<dc:creator><![CDATA[낭창]]></dc:creator>
		<pubDate>Thu, 26 Aug 2010 23:36:03 +0000</pubDate>
				<category><![CDATA[프로그래밍 이야기]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<guid isPermaLink="false">http://nangchang.nes.or.kr/?p=463</guid>

					<description><![CDATA[<p>git-svn 은 git 로 svn 저장소르 쓸 수 있도록 해주는 아주 유용한 도구다.그러나, 몇 가지 불편한 점이 있는데, 그 중 한 가지가 저장소 주소가 변경되었을때,svn의 relocation 명령을 쓸 수 없다는 것. 그러나 약간 번거롭긴 하지만 방법이 아주 없진않다.다음 절차에 따라 파일 수정 및 명령을 실행하면 svn 저장소 주소를 변경할 수 있다. 1. 변경하고자 하는 git [&#8230;]</p>
<p>The post <a href="https://nangchang.nes.or.kr/git-svn-relocate-repository/">git svn 에서 저장소 relocate 하기</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>git-svn 은 git 로 svn 저장소르 쓸 수 있도록 해주는 아주 유용한 도구다.<br />그러나, 몇 가지 불편한 점이 있는데, 그 중 한 가지가 저장소 주소가 변경되었을때,<br />svn의 relocation 명령을 쓸 수 없다는 것. 그러나 약간 번거롭긴 하지만 방법이 아주 없진않다.<br />다음 절차에 따라 파일 수정 및 명령을 실행하면 svn 저장소 주소를 변경할 수 있다.</p>
<p>1. 변경하고자 하는 git 저장소의 config 파일을 연다.(.git/config)<br />svn 저장소 주소가 적혀 있는 부분이 있는데 이 줄 앞에 #를 붙여 주석 처리하고 <br />새로운 저장소의 주소를 적는다.</p>
<p>2. 해당 git 디렉토리에서 다음 명령을 실행한다.</p>
<blockquote><p>git svn fetch</p></blockquote>
<p>3. 다시 1의 파일을 열고, 이번에는 새로운 저장소 주소를 주석처리하고, 원래 저장소 주소의 <br />주석을 제거 한다.</p>
<p>4. git 디렉토리에서 다음 명령을 실행한다.</p>
<blockquote><p>git svn rebase -l</p></blockquote>
<p>5. 다시 설정파일을 열고, 원래 저장소 주소를 삭제하고, 새로운 저장소 주소의 주석을 풀어서 저장한다.</p>
<p>6. 이제 새로운 주소로 git-svn을 쓸 수 있다.</p>
<blockquote><p>SeeAlso :</p>
<div style="margin-left: 40px;">http://joehalliwell.wordpress.com/2009/03/18/relocating-git-svn-checkouts/</div>
</blockquote>
<div style="margin-left: 40px;"></div><p>The post <a href="https://nangchang.nes.or.kr/git-svn-relocate-repository/">git svn 에서 저장소 relocate 하기</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://nangchang.nes.or.kr/git-svn-relocate-repository/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>현재 작업 중인 branch에 push 가능하도록 하기</title>
		<link>https://nangchang.nes.or.kr/%ed%98%84%ec%9e%ac-%ec%9e%91%ec%97%85-%ec%a4%91%ec%9d%b8-branch%ec%97%90-push-%ea%b0%80%eb%8a%a5%ed%95%98%eb%8f%84%eb%a1%9d-%ed%95%98%ea%b8%b0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25ed%2598%2584%25ec%259e%25ac-%25ec%259e%2591%25ec%2597%2585-%25ec%25a4%2591%25ec%259d%25b8-branch%25ec%2597%2590-push-%25ea%25b0%2580%25eb%258a%25a5%25ed%2595%2598%25eb%258f%2584%25eb%25a1%259d-%25ed%2595%2598%25ea%25b8%25b0</link>
					<comments>https://nangchang.nes.or.kr/%ed%98%84%ec%9e%ac-%ec%9e%91%ec%97%85-%ec%a4%91%ec%9d%b8-branch%ec%97%90-push-%ea%b0%80%eb%8a%a5%ed%95%98%eb%8f%84%eb%a1%9d-%ed%95%98%ea%b8%b0/#respond</comments>
		
		<dc:creator><![CDATA[낭창]]></dc:creator>
		<pubDate>Sat, 29 May 2010 05:59:00 +0000</pubDate>
				<category><![CDATA[프로그래밍 이야기]]></category>
		<category><![CDATA[git]]></category>
		<guid isPermaLink="false">http://nangchang.nes.or.kr/?p=460</guid>

					<description><![CDATA[<p>git 에서는 기본적으로 현재 checkout 되어 있는 branch에 원격에서 push하지 못하도록 되어 있다.git config 명령을 써서 간단하게 push가 가능해 주도록 해 줄 수 있다.해당 저장소로 가서 다음과 같이 해주면 된다. git config receive.denyCurrentBranch ignore</p>
<p>The post <a href="https://nangchang.nes.or.kr/%ed%98%84%ec%9e%ac-%ec%9e%91%ec%97%85-%ec%a4%91%ec%9d%b8-branch%ec%97%90-push-%ea%b0%80%eb%8a%a5%ed%95%98%eb%8f%84%eb%a1%9d-%ed%95%98%ea%b8%b0/">현재 작업 중인 branch에 push 가능하도록 하기</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>git 에서는 기본적으로 현재 checkout 되어 있는 branch에 원격에서 push하지 못하도록 되어 있다.<br />git config 명령을 써서 간단하게 push가 가능해 주도록 해 줄 수 있다.<br />해당 저장소로 가서 다음과 같이 해주면 된다.</p>
<blockquote><p>git config receive.denyCurrentBranch ignore</p></blockquote>
<p></p><p>The post <a href="https://nangchang.nes.or.kr/%ed%98%84%ec%9e%ac-%ec%9e%91%ec%97%85-%ec%a4%91%ec%9d%b8-branch%ec%97%90-push-%ea%b0%80%eb%8a%a5%ed%95%98%eb%8f%84%eb%a1%9d-%ed%95%98%ea%b8%b0/">현재 작업 중인 branch에 push 가능하도록 하기</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://nangchang.nes.or.kr/%ed%98%84%ec%9e%ac-%ec%9e%91%ec%97%85-%ec%a4%91%ec%9d%b8-branch%ec%97%90-push-%ea%b0%80%eb%8a%a5%ed%95%98%eb%8f%84%eb%a1%9d-%ed%95%98%ea%b8%b0/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>git-svn 사용 시 한글 파일명을 가진 파일 오류 해결하기</title>
		<link>https://nangchang.nes.or.kr/git-svn-%ec%82%ac%ec%9a%a9-%ec%8b%9c-%ed%95%9c%ea%b8%80-%ed%8c%8c%ec%9d%bc%eb%aa%85%ec%9d%84-%ea%b0%80%ec%a7%84-%ed%8c%8c%ec%9d%bc-%ec%98%a4%eb%a5%98-%ed%95%b4%ea%b2%b0%ed%95%98%ea%b8%b0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=git-svn-%25ec%2582%25ac%25ec%259a%25a9-%25ec%258b%259c-%25ed%2595%259c%25ea%25b8%2580-%25ed%258c%258c%25ec%259d%25bc%25eb%25aa%2585%25ec%259d%2584-%25ea%25b0%2580%25ec%25a7%2584-%25ed%258c%258c%25ec%259d%25bc-%25ec%2598%25a4%25eb%25a5%2598-%25ed%2595%25b4%25ea%25b2%25b0%25ed%2595%2598%25ea%25b8%25b0</link>
					<comments>https://nangchang.nes.or.kr/git-svn-%ec%82%ac%ec%9a%a9-%ec%8b%9c-%ed%95%9c%ea%b8%80-%ed%8c%8c%ec%9d%bc%eb%aa%85%ec%9d%84-%ea%b0%80%ec%a7%84-%ed%8c%8c%ec%9d%bc-%ec%98%a4%eb%a5%98-%ed%95%b4%ea%b2%b0%ed%95%98%ea%b8%b0/#comments</comments>
		
		<dc:creator><![CDATA[낭창]]></dc:creator>
		<pubDate>Sat, 10 Oct 2009 17:56:24 +0000</pubDate>
				<category><![CDATA[프로그래밍 이야기]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<guid isPermaLink="false">http://nangchang.nes.or.kr/?p=437</guid>

					<description><![CDATA[<p>Git를 여기 저기에 적용해 보던 어느 날&#8230; Subversion 레파지토리를 Git로 쓸 기회가 생겼다. git-svn 을 이용해서 파일을 clone을 해 왔는데, 마지막에 가서 먼가 자꾸 실패한다. 알고 보니 한글로 된 이름을 가진 파일을 가져오는 과정에서 문제가 생기는 것. 한글로 된 이름을 가진 파일을 처리할 때 Invalid argument 가 어쩌고 하는데.. 아무래도 인코딩 문제인거 같기는 한데&#8230; 답이 [&#8230;]</p>
<p>The post <a href="https://nangchang.nes.or.kr/git-svn-%ec%82%ac%ec%9a%a9-%ec%8b%9c-%ed%95%9c%ea%b8%80-%ed%8c%8c%ec%9d%bc%eb%aa%85%ec%9d%84-%ea%b0%80%ec%a7%84-%ed%8c%8c%ec%9d%bc-%ec%98%a4%eb%a5%98-%ed%95%b4%ea%b2%b0%ed%95%98%ea%b8%b0/">git-svn 사용 시 한글 파일명을 가진 파일 오류 해결하기</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Git를 여기 저기에 적용해 보던 어느 날&#8230;</p>
<p>Subversion 레파지토리를 Git로 쓸 기회가 생겼다.</p>
<p>git-svn 을 이용해서 파일을 clone을 해 왔는데, 마지막에 가서 먼가 자꾸 실패한다.</p>
<p>알고 보니 한글로 된 이름을 가진 파일을 가져오는 과정에서 문제가 생기는 것.</p>
<p>한글로 된 이름을 가진 파일을 처리할 때 Invalid argument 가 어쩌고 하는데..</p>
<p>아무래도 인코딩 문제인거 같기는 한데&#8230;</p>
<p>답이 안보인다.</p>
<p></p>
<p>에 저장할 때 파일명 인코딩을 항상 UTF-8로 하는데,</p>
<p>git-svn은 이를 무시하고 항상 그대로 읽어오기 때문이었다.</p>
<p>그래서 파일을 처리할때 파일명의 인코딩을 UTF-8에서 로컬에서 쓰는 인코딩으로 바꾸고,</p>
<p>다시 로컬 인코딩에서 UTF-8로 변경하는 과정을 거쳐줘야 한다.</p>
<p></p>
<p>오만상 삽질 끝에 알아낸 것은 git-svn에서만 발생하는 문제라는것.</p>
<p>원인은 Subversion이 레파지토리</p>
<p>git-svn은 perl로 되어 있으며, Git 설치 디렉토리의 libexec/git-core/git-svn 이다.</p>
<p>첨부한 패치를 적용하거나 파일을 열어서 다음과 같이 수정해 준다.</p>
<p style="text-align: center;"><a href="/owner/entry/edit/../../../../attach/1/1353544293.patch" title="">01-git-svn-file-name-encoding-processing.patch</a></p>
<blockquote><p>&#8230;<br />sub git_path {<br />&nbsp; &nbsp;&nbsp; my ($self, $path) = @_;<br /><span style="font-weight: bold;">&nbsp; &nbsp;&nbsp; if (my $enc = Git::config(&#8216;svn.filenameenc&#8217;))</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp;&nbsp; {</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; require Encode;</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Encode::from_to($path, &#8216;UTF-8&#8217;, $enc);</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp;&nbsp; } &nbsp;&nbsp; </span><br />&nbsp; &nbsp;&nbsp; if ($self-&gt;{path_strip}) {<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $path =~ s!$self-&gt;{path_strip}!! or<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; die &#8220;Failed to strip path &#8216;$path&#8217; ($self-&gt;{path_strip})\n&#8221;;<br />&nbsp;<br />&#8230;</p>
<p>&nbsp;sub repo_path {<br />&nbsp; &nbsp;&nbsp; my ($self, $path) = @_;<br /><span style="font-weight: bold;">&nbsp; &nbsp;&nbsp; if (my $enc = Git::config(&#8216;svn.filenameenc&#8217;))</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp;&nbsp; {</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; require Encode;</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Encode::from_to($path, $enc, &#8216;UTF-8&#8217;);</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; &nbsp;&nbsp; }</span><br />&nbsp; &nbsp;&nbsp; $self-&gt;{path_prefix}.(defined $path ? $path : &#8221;);<br />&nbsp;}</p>
<p>&#8230;</p></blockquote>
<p>그런 다음, .gitconifg 파일에서 다음과 같이 인코딩 설정을 추가해 준다.</p>
<p>.gitconfig 파일은 HOME 디렉토리에 있으며, 윈도우인 경우에는 &#8220;내 문서&#8221; 폴더에 있다.</p>
<blockquote>
<p>[svn]</p>
<p>&nbsp; &nbsp; filenameenc = EUC-KR</p>
</blockquote>
<ol class="code">
</ol>
<p>이렇게 한 후 git-svn으로 clone을 하면 아무 문제없이 clone이 된다.</p>
<p>첨부한 git-svn은 윈도우용 Git인 Msysgit 1.6.4 에 해당 패치를 적용한 파일이다.</p>
<p style="text-align: center;"><a href="/owner/entry/edit/../../../../attach/1/1080405401.xxx">git-svn.perl</a></p>
<div></p>
<p>[참조]</p>
<ul>
<li><a title="http://code.google.com/p/msysgit/issues/detail?id=159" href="http://code.google.com/p/msysgit/issues/detail?id=159">http://code.google.com/p/msysgit/issues/detail?id=159</a></li>
</ul>
</div><p>The post <a href="https://nangchang.nes.or.kr/git-svn-%ec%82%ac%ec%9a%a9-%ec%8b%9c-%ed%95%9c%ea%b8%80-%ed%8c%8c%ec%9d%bc%eb%aa%85%ec%9d%84-%ea%b0%80%ec%a7%84-%ed%8c%8c%ec%9d%bc-%ec%98%a4%eb%a5%98-%ed%95%b4%ea%b2%b0%ed%95%98%ea%b8%b0/">git-svn 사용 시 한글 파일명을 가진 파일 오류 해결하기</a> first appeared on <a href="https://nangchang.nes.or.kr">Naver Ending Study</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://nangchang.nes.or.kr/git-svn-%ec%82%ac%ec%9a%a9-%ec%8b%9c-%ed%95%9c%ea%b8%80-%ed%8c%8c%ec%9d%bc%eb%aa%85%ec%9d%84-%ea%b0%80%ec%a7%84-%ed%8c%8c%ec%9d%bc-%ec%98%a4%eb%a5%98-%ed%95%b4%ea%b2%b0%ed%95%98%ea%b8%b0/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
