しばらく使ってなくて忘れそうになったのでメモ。

   1  int n = CGColorGetNumberOfComponents(color);
   2  float (*comps)[n] = (float(*)[n])CGColorGetComponents(color);

C99は良いなあ。

posted by Png genki on Fri 31 Oct 2008 at 15:45

半透明ステータスバーの透明度は多分 0.6

キーボードのアニメーション速度は0.3秒

UITextViewのマージンは8ピクセル。 現在のところ、UITextViewのマージンを(普通に)設定する方法は無いらしい。

posted by Png genki on Fri 31 Oct 2008 at 14:27

間違ってremoteブランチを作ってしまったのですが、勉強になったので記事にしておきます ;P

remoteにlocal_deployブランチを作成

   1  $ git push origin local_deploy  #間違って作成
   2  $ git branch -a
   3  * master
   4    origin/HEAD
   5    origin/deploy
   6    origin/local_deploy #ローカルにも反映されている
   7    origin/master

remoteブランチを削除

   1  $ git push origin :local_deploy
これでサーバ側は反映されました。

別のローカルリポジトリ(cloned)で削除が反映されない

しかしもう一つ別のディレクトリで同じgitリポジトリをcloneしていて、そちらで削除が反映されない状況に。

下記の1.の説明にあるように、(remoteブランチの追加は自動でされるが)削除されたものはローカルで明示的に削除しないといけないようです。

Delete unneeded branch
$ git clone git://git.kernel.org/.../git.git my.git
$ cd my.git
$ git branch -d -r origin/todo origin/html origin/man (1)
$ git branch -D test (2)

  1. Delete remote-tracking branches "todo", "html", "man". Next fetch or pull will create them again unless you configure them not to. See git-fetch(1).  
  2. Delete "test" branch even if the "master" branch (or whichever branch is currently checked out) does not have all commits from test branch.

http://www.kernel.org/pub/software/scm/git/docs/git-branch.html

(上によると、git branch -d -r origin/removed_branchでもremoteブランチが削除できるようですね)

コマンドgit remote show origin, git remote prune origin

git remote辺りにコマンドがあると知ったので見てみると、git remote showがありました。 確認すると、腐りかけた(Stale)tracking branchと表示されています。

   1  $ git remote show origin
   2  * remote origin
   3    URL: ssh://git.s21g.com/mnt/git/blog.git
   4    Remote branch merged with 'git pull' while on branch master
   5      master
   6    Stale tracking branch (use 'git remote prune')
   7      local_deploy
   8    Tracked remote branches
   9      deploy master

そして、pruneで削除。ヘルプには、--dry-runでやるとどのブランチをpruneするかレポートしてくれて、実際のactionはしない旨が記述されているのですが、私の環境では削除されてしまいました。

   1  $ git remote prune origin --dry-run

Refs

http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
http://www.kernel.org/pub/software/scm/git/docs/git-branch.html
http://reinh.com/blog/2008/04/18/git-push-just-the-tip.html

posted by Png satoko on Fri 31 Oct 2008 at 12:51
Contents
配列へのポインタへのキャスト
iPhone内の各種要素の定数に関するメモ
[git] 削除されたremoteブランチがローカルRepoで消えなくなったとき
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ