On Tue, Feb 07, 2017 at 08:38:49PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is the document patch for f0298cf1c6 (revision walker: include a > detached HEAD in --all - 2009-01-16) > [...] > --all:: > - Pretend as if all the refs in `refs/` are listed on the > - command line as '<commit>'. > + Pretend as if all the refs in `refs/` (and HEAD if detached) > + are listed on the command line as '<commit>'. I think this is an improvement, but I'm not sure about the "if detached" bit. We always read HEAD, no matter what. If you only care about reachability, then reading HEAD only has an impact if it is detached, since otherwise we know that we will grab the ref via refs/. I'm not sure if it would matter for some other cases, though. For example, with "--source", do we report HEAD or the matching ref? It looks like the latter (because we read the refs first). I suspect you could also construct a case with excludes like: $ git checkout foo $ git rev-list --exclude=refs/heads/foo --all where it is relevant that we read HEAD separately from refs/heads/foo. So I think just "and HEAD" is better, like: Pretend as if all the refs in `refs/`, along with `HEAD`, are listed... -Peff