summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2015-10-08 11:54:43 +0900
committerJunio C Hamano <gitster@pobox.com>2016-01-12 15:10:01 -0800
commitee76f92fe883305c1260952f5b325b0503311fc9 (patch)
tree6cea77bd1955070b9f56832d803ac0b70448f59f /compat
parent754884255bb580df159e58defa81cdd30b5c430c (diff)
downloadgit-mh/notes-allow-reading-treeish.tar.gz
notes: allow treeish expressions as notes refmh/notes-allow-reading-treeish
init_notes() is the main point of entry to the notes API. It ensures that the input can be used as ref, because it needs a ref to update to store notes tree after modifying it. There however are many use cases where notes tree is only read, e.g. "git log --notes=...". Any notes-shaped treeish could be used for such purpose, but it is not allowed due to existing restriction. Allow treeish expressions to be used in the case the notes tree is going to be used without write "permissions". Add a flag to distinguish whether the notes tree is intended to be used read-only, or will be updated. With this change, operations that use notes read-only can be fed any notes-shaped tree-ish can be used, e.g. git log --notes=notes@{1}. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
0 files changed, 0 insertions, 0 deletions