Files
git/Documentation
Jeff King 27064fb7fb doc-diff: always use oids inside worktree
The doc-diff script immediately resolves its two endpoints
to actual object ids, so that we can reuse cached results
even if they appear under a different name. But we still use
the original name the user fed us when running "git
checkout" in our temporary worktree. This can lead to
confusing results:

  - the namespace inside the worktree is different than the
    one outside. In particular, "./doc-diff origin HEAD"
    will resolve HEAD inside the worktree, whose detached
    HEAD will be pointing at origin! As a result, such a
    diff would always be empty.

  - worse, we will store this result under the oid we got by
    resolving HEAD in the main worktree, thus polluting our
    cache

  - we didn't pass --detach, which meant that using a branch
    name would cause us to actually check out that branch,
    making it unavailable to other worktrees.

We can solve this by feeding the already-resolved object id
to git-checkout. That naturally forces a detached HEAD, but
just to make clear our expectation, let's explicitly pass
--detach.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-30 10:09:05 -07:00
..
2018-08-02 15:38:09 -07:00
2018-06-25 13:22:36 -07:00
2018-06-22 13:19:33 -07:00
2018-05-23 14:38:22 +09:00
2018-06-27 10:29:10 -07:00
2018-06-18 10:18:41 -07:00
2017-06-27 10:35:49 -07:00
2018-06-01 15:06:37 +09:00
2018-04-18 12:49:26 +09:00