Git 1.6.6 Relnoteメモ

25歳になりました。

それはさておき、1.6.6が出たらしいので例によってRelnoteをピックアップして気になったところにコメントしてみる。

個人的には、設定ファイルの~/を展開してくれる機能だけでもupdateする価値はあるなぁといった感じで他にも細かいけどよく使う機能がよくなってるのがいくつかあった。

以下詳細。

Git v1.6.6 Release Notes
========================

Notes on behaviour change
-------------------------

 * In this release, "git fsck" defaults to "git fsck --full" and
   checks packfiles, and because of this it will take much longer to
   complete than before.  If you prefer a quicker check only on loose
   objects (the old default), you can say "git fsck --no-full".  This
   has been supported by 1.5.4 and newer versions of git, so it is
   safe to write it in your script even if you use slightly older git
   on some of your machines.

   このリリースでは、"git fsck"は、デフォルトで"git fsck --full"してpackfilesをチェックする
   という意味になり、それによって完了するまで前よりも時間がかかるようになります。もしつながりのないオブジェクトのみを
   素早くチェックしたい(元々のデフォルトの挙動)のであれば、"git fsck --no-full"してください。
   これは、1.5.4からサポートされている機能で、そのためあなたのいくつかのマシンで少し古いgitを使っていても
   scriptなどの中から書いても安全です。

Preparing yourselves for compatibility issues in 1.7.0
------------------------------------------------------

In git 1.7.0, which is planned to be the release after 1.6.6, there will
be a handful of behaviour changes that will break backward compatibility.

These changes were discussed long time ago and existing behaviours have
been identified as more problematic to the userbase than keeping them for
the sake of backward compatibility.

When necessary, a transition strategy for existing users has been designed
not to force them running around setting configuration variables and
updating their scripts in order to either keep the traditional behaviour
or adjust to the new behaviour, on the day their sysadmin decides to install
the new version of git.  When we switched from "git-foo" to "git foo" in
1.6.0, even though the change had been advertised and the transition
guide had been provided for a very long time, the users procrastinated
during the entire transtion period, and ended up panicking on the day
their sysadmins updated their git installation.  We are trying to avoid
repeating that unpleasantness in the 1.7.0 release.

For changes decided to be in 1.7.0, commands that will be affected
have been much louder to strongly discourage such procrastination, and
they continue to be in this release.  If you have been using recent
versions of git, you would have seen warnings issued when you used
features whose behaviour will change, with a clear instruction on how
to keep the existing behaviour if you want to.  You hopefully are
already well prepared.

Of course, we have also been giving "this and that will change in
1.7.0; prepare yourselves" warnings in the release notes and
announcement messages for the past few releases.  Let's see how well
users will fare this time.

 * "git push" into a branch that is currently checked out (i.e. pointed by
   HEAD in a repository that is not bare) will be refused by default.

   Similarly, "git push $there :$killed" to delete the branch $killed
   in a remote repository $there, when $killed branch is the current
   branch pointed at by its HEAD, will be refused by default.

   Setting the configuration variables receive.denyCurrentBranch and
   receive.denyDeleteCurrent to 'ignore' in the receiving repository
   can be used to override these safety features.  Versions of git
   since 1.6.2 have issued a loud warning when you tried to do these
   operations without setting the configuration, so repositories of
   people who still need to be able to perform such a push should
   already have been future proofed.

   Please refer to:

   http://git.or.cz/gitwiki/GitFaq#non-bare
   http://thread.gmane.org/gmane.comp.version-control.git/107758/focus=108007

   for more details on the reason why this change is needed and the
   transition process that already took place so far.

   (訳注: これは前回と同じ内容なので略)

 * "git send-email" will not make deep threads by default when sending a
   patch series with more than two messages.  All messages will be sent
   as a reply to the first message, i.e. cover letter.  Git 1.6.6 (this
   release) will issue a warning about the upcoming default change, when
   it uses the traditional "deep threading" behaviour as the built-in
   default.  To squelch the warning but still use the "deep threading"
   behaviour, give --chain-reply-to option or set sendemail.chainreplyto
   to true.

   git send-emailは2つ以上の一連のパッチを送る際にデフォルトで深いスレッド(訳注:ここはメールのスレッドの意味っぽい)を作らなくなる。
   すべてのメッセージは最初のメッセージに対するReplyとなる。Git 1.6.6では将来のdefault設定について深いスレッドを作るような使い方をした際に警告をする。
   この警告を消し、深いスレッド機能を使うには、--chain-reply-toオプションを使うか、sendemail.chainreplytoの設定を有効にする必要がある。

   It has been possible to configure send-email to send "shallow thread"
   by setting sendemail.chainreplyto configuration variable to false.
   The only thing 1.7.0 release will do is to change the default when
   you haven't configured that variable.

   また、浅いスレッドを送るように設定することもでき、sendemail.chainreplytoをfalseに設定すればよい。
   1.7.0のリリースでは、何もこの設定がない場合にはfalseがデフォルトになるというだけである。

 * "git status" will not be "git commit --dry-run".  This change does not
   affect you if you run the command without pathspec.

   git statusは、"git commit --dry-run"をしなくなる。この変更は、git statusに
   pathspectをつけないで実行する際には影響がない。

   Nobody sane found the current behaviour of "git status Makefile" useful
   nor meaningful, and it confused users.  "git commit --dry-run" has been
   provided as a way to get the current behaviour of this command since
   1.6.5.

   "git status Makefile"の挙動が便利だとか、意味のあると思っている人はいないようだ。
   そしてこれはユーザーを困惑させる。"git commit --dry-run"はこのコマンドの現在の挙動を
   させるための方法として1.6.5から提供されている。

 * "git diff" traditionally treated various "ignore whitespace" options
   only as a way to filter the patch output.  "git diff --exit-code -b"
   exited with non-zero status even if all changes were about changing the
   ammount of whitespace and nothing else.  and "git diff -b" showed the
   "diff --git" header line for such a change without patch text.

   "git diff"はこれまで様々な空白を無視するためのオプションをpatchの出力をフィルタリング
   するためだけに提供してきた。"git diff --exit-code -b"はすべての変更が空白の量の変更でさえ
   0でないステータスコードでexitした。そして、"git diff -b"は"diff -git"ヘッダーの行をpatchの行が
   ないにも関わらず出力していた。

   In 1.7.0, the "ignore whitespaces" will affect the semantics of the
   diff operation itself.  A change that does not affect anything but
   whitespaces will be reported with zero exit status when run with
   --exit-code, and there will not be "diff --git" header for such a
   change.

   1.7.0では、"空白を無視する"というオプションはdiffのオペレーションそのものの意味にしか適用しない。
   --exit-codeで実行した際に、空白が0のstatusコードでレポートされるようになる以外には、この変更は影響しない。
   そして、そのような変更には"diff --git"ヘッダーを出力しない。


Updates since v1.6.5
--------------------

(subsystems)

 * various gitk updates including use of themed widgets under Tk 8.5,
   Japanese translation, a fix to a bug when running "gui blame" from
   a subdirectory, etc.

   gitkはTk 8.5のテーマWidgetsを含むようになり、日本語訳を含み、"gui blame"をサブディレクトリから
   したときにおきるバグを修正した

 * various git-gui updates including new translations, wm states fixes,
   Tk bug workaround after quitting, improved heuristics to trigger gc,
   etc.

   新しい翻訳、WMの状態を修正、終了後のTkのバグを修正、GCを起動するタイミングの処理を改善した、など。

 * various git-svn updates.

 * "git fetch" over http learned a new mode that is different from the
   traditional "dumb commit walker".

   git fetchを用いてhttp通信をする場合に、それまでの"dump commit walker"とは違ったモードをできるようになった

(portability)

 * imap-send can be built on mingw port.

 imap-sendが、MinGWでbuildできるようになった

 (訳注:最近ややwindows対応も強化しているらしく、コアの部分はなるべくシェルスクリプトを減らしてCで書くようになってきてるらしい)

(performance)

 * "git diff -B" has smaller memory footprint.

(usability, bells and whistles)

 * The object replace mechanism can be bypassed with --no-replace-objects
   global option given to the "git" program.

 * In configuration files, a few variables that name paths can begin with ~/
   and ~username/ and they are expanded as expected.

   設定ファイルで、いくつかの設定には~/や~username/から始まる値をユーザーのホームディレクトリとして
   展開してくれるようになった。

   (訳注: 
    これは個人的には手元でパッチ書いたりしつつどうやって拙い英語力でねじこもうかなとか思ってたりしたぐらい欲しかった機能。
    主にグローバルに適用するcore.excludesfileとかの設定に使える。
    これがないためにvimrcやzshrcを管理してるやつで会社PC用と家用とかでbranchで分けてたりとかしてた。
    )

 * "git subcmd -h" now shows short usage help for many more subcommands.

 "git subcmd -h"はより多くのコマンドで簡潔なhelpメッセージを表示するようになった。

 (訳注: 手元で試してみるとgit subcmd -hなんてものはないので、どうやら"git xxx -h" (xxx はdiffとかstatusとか色々なコマンド)とやると
  synopsis程度の情報を出してくれるようになったってことらしい。)

 * "git bisect reset" can reset to an arbitrary commit.

 "git bisect reset"で任意のコミットにリセットできるようになった。

 (訳注: git bisect --helpの説明を読む感じだと、リセットというのはgit bisectのモードを抜けて指定されたコミットをcheckoutした状態に戻すという意味らしい)

 * "git checkout frotz" when there is no local branch "frotz" but there
   is only one remote tracking branch "frotz" is taken as a request to
   start the named branch at the corresponding remote tracking branch.

   "git checkout frotz"をしたときに、ローカルブランチ"frotz"がなくて、あるリモートブランチの"frotz"
   が1つと特定されるときのみ、"frotz"をトラッキングしつつチェックアウトしてくれる。

   (訳注: 英文の文章構造がうまく読みとれなくてかなり訳が怪しいですが、簡単に言えば今まで、
    git checkout origin/frotz -b -t frotz
    とかしてたのを、"git checkout frotz"とできるようになったよってことらしい。これは非常に便利。)

 * "git commit -c/-C/--amend" can be told with a new "--reset-author" option
   to ignore authorship information in the commit it is taking the message
   from.

   "git commit -c/-C/--amend"は"--reset-author"オプションを取るようになり、
   元々の著者情報を無視できるようになった。

 * "git describe" can be told to add "-dirty" suffix with "--dirty" option.

    (訳注: git describeをよく知らなかったので調べてみると、
     v1.6.6-287-gff4d1d4
     みたいな感じで、存在するtagのうち最も近いタグ名+sha1みたいな名前にしてくれるコマンドらしい。
     これは、SVNのリビジョン番号などをソフトウェアのバージョンに含めるときとかに使えそう。
     でこれは何かというと、--dirtyをつけたときに手元のファイルをいじっていた場合だけ"v1.6.6-287-gff4d1d4-dirty"と
     ついてくれるらしい。バグ報告してきたユーザーに情報を求めるときは"git describe --dirty"した結果を教えてくれっていうのがよいのかもしれない)

 * "git diff" learned --submodule option to show a list of one-line logs
   instead of differences between the commit object names.

   (訳注: submoduleを使っている場合にgit diffすると、
    >|diff|
      diff --git extlib/nim extlib/nim
      index 1021bdd..02adbf0 160000
      --- extlib/nim
      +++ extlib/nim
      @@ -1 +1 @@
      -Subproject commit 1021bdd5b48fef9ee7b11db08686588af431de52
      +Subproject commit 02adbf0caa5bef13551dc0828b9d7c9e5e5d17d1
    ||<
    みたいにsha1が出るだけで意味不明だが、--submoduleをつけると
    >||
      Submodule extlib/nim 1021bdd..02adbf0 (rewind):
        < added prereq
        < add auto_install (kazuho++)
    ||<
    みたいにコミットログが1行ずつ出てくるらしい)


 * "git diff" learned to honor diff.color.func configuration to paint
   function name hint printed on the hunk header "@@ -j,k +l,m @@" line
   in the specified color.

 * "git fetch" learned --all and --multiple options, to run fetch from
   many repositories, and --prune option to remove remote tracking
   branches that went stale.  These make "git remote update" and "git
   remote prune" less necessary (there is no plan to remove "remote
   update" nor "remote prune", though).

   "git fetch"は--allや--multipleオプションを使えるようになった。これは、
   沢山のリポジトリからfetchしてくるときに使う。--pruneオプションは興味のなくなった
   リモートトラッキングブランチを削除するときに使う。これにより、"git remote update"や
   "git remote prune"の必要性が少なくなった。(今のところ"git remote update"や"git remote prune"を
   削除する計画はない)

   (訳注:最近はgit fetchとかするのがふつうのようだ。自分はたいていgit remote updateをしてる)

 * "git fsck" by default checks the packfiles (i.e. "--full" is the
   default); you can turn it off with "git fsck --no-full".

 * "git grep" can use -F (fixed strings) and -i (ignore case) together.

    "git grep"で-F(固定長文字列)と-i(大文字小文字の無視)を両方使えるようになった

    (訳注: -iオプションで大文字小文字無視はまぁまぁ需要がありそう。
     -Fはいまいち使い方がわかっていなかったが、正規表現ではなく固定長の文字列マッチをさせることで
     動作を早くできるということらしい。grepを使うときは正規表現ではないことも結構あるが、そういうときに
     勝手にgrep -Fに切り変える機能とかgrepにあったりするのだろうか。)

 * import-tars contributed fast-import frontend learned more types of
   compressed tarballs.

   (訳注: contrib/fast-import/import-tars.perlらしい。git fast-importは、gitのコマンドを色々叩くシェルスクリプト
    を作る変わりに専用の命令を読みこませることで高速に処理できるらしい)

 * "git instaweb" knows how to talk with mod_cgid to apache2.

 * "git log --decorate" shows the location of HEAD as well.

   (訳注: commit行がこんな感じになる。括弧内に注目
    commit ff4d1d4cfbb751002bcb99c00c134cefb70634e1 (HEAD, origin/next, next)
   )


 * "git log" and "git rev-list" learned to take revs and pathspecs from
   the standard input with the new "--stdin" option.

   (訳注: pipeとかから使いやすくなったりとか。"git log --stdin"は手元だと動かないので間違いな気もする。)

 * "--pretty=format" option to "log" family of commands learned:

   . to wrap text with the "%w()" specifier.
   . to show reflog information with "%g[sdD]" specifier.

 * "git notes" command to annotate existing commits.

 (訳注: git notesはコミット情報に後からメタな情報をつけくわえられる新機能。デフォルトでメタ情報はgit logしたときにNotes: 以下に表示される
  あまり使いどころはわかっていないが、デバッグの関係で古いコミットを追っていたら問題をコミットが見つかったが
  あまりにもコミットメッセージが適切でなかったりとかそういうときに訂正しておくとかそういう用途なのかなと思ったりしている。)

 * "git merge" (and "git pull") learned --ff-only option to make it fail
   if the merge does not result in a fast-forward.

 * "git mergetool" learned to use p4merge.

 (訳注: git mergetoolはうまくmergeできなかった場合に起動して手直しするためのコマンドらしい。vimdiffやら色々ツールが使える中でp4mergeというツールが
  使えるようになったということらしい)

 * "git rebase -i" learned "reword" that acts like "edit" but immediately
   starts an editor to tweak the log message without returning control to
   the shell, which is done by "edit" to give an opportunity to tweak the
   contents.

   "git rebase -i"で"reword"という"edit"に似ているがシェルに戻ることなくログメッセージを
   いじるためにエディタが立ちあがる機能が追加された。

 * "git send-email" can be told with "--envelope-sender=auto" to use the
   same address as "From:" address as the envelope sender address.

 * "git send-email" will issue a warning when it defaults to the
   --chain-reply-to behaviour without being told by the user and
   instructs to prepare for the change of the default in 1.7.0 release.

   "git send-email"は1.7.0のリリースでデフォルトで--chain-reply-toの動作をするようにするために、
   ユーザーに教えて準えてもらうために警告を出すようにした

 * In "git submodule add <repository> <path>", <path> is now optional and
   inferred from <repository> the same way "git clone <repository>" does.

   (訳注: pathが省略できるようになって、デフォルトだとgit cloneでpathを省略したときの同様のルールでディレクトリが
    できるらしい)

 * "git svn" learned to read SVN 1.5+ and SVK merge tickets.

 (訳注: merge ticketってよく知らなかったんですが、gitでいうところのmerge commitみたいな機能がsvn 1.5以降だとあるらしい。
  でこれを追跡してくれると何が便利かといえばgit logをより詳細に出せるとかってことだろうか。)

 * "git svn" learned to recreate empty directories tracked only by SVN.

 (訳注: git svn mkdirsがそれっぽい)

 * "gitweb" can optionally render its "blame" output incrementally (this
   requires JavaScript on the client side).

 * Author names shown in gitweb output are links to search commits by the
   author.

Fixes since v1.6.5
------------------

All of the fixes in v1.6.5.X maintenance series are included in this
release, unless otherwise noted.