From: Philip Oakley Date: Tue, 15 Sep 2015 16:06:27 GMT Subject: Re: [PATCH] doc: show usage of branch description Message-ID: <9075C82973D34EABBB96023B75D6848E@PhilipOakley> In-Reply-To: From: "Junio C Hamano" > "Philip Oakley" writes: > >> It still means that my patch is incomplete in its aim to bring out >> these possible broader usages. >> >> I haven't yet looked at the mail archives to see if there is more >> around the time of those introductions. > > I guess this is largely my fault, but I think "git grep" is an > easier source of truth to work with than the list archive. > > It eventually boils down to branch.*.description configuration and > all users of that would call read_branch_desc(), so if you check > callers of that helper function and see which commit introduced that > call for what purpose ("blame" is your friend), you would know how > they use the information under what condition. > > > $ git grep -n read_branch_desc -- \*.c > branch.c:143:int read_branch_desc(struct strbuf *buf, const char > *branch_name) > builtin/branch.c:771: read_branch_desc(&buf, branch_name); > builtin/fmt-merge-msg.c:211: if (!read_branch_desc(&desc, name)) { > builtin/log.c:888: read_branch_desc(&desc, branch_name); > > $ git blame -L210,212 -s builtin/fmt-merge-msg.c > 898eacd8 210) > 898eacd8 211) if (!read_branch_desc(&desc, name)) { > 898eacd8 212) const char *bp = desc.buf; > > $ git show -s 898eacd8 > commit 898eacd8ada2d012f977948350ed60845e238037 > Author: Junio C Hamano [...]> > Signed-off-by: Junio C Hamano > > etc. etc. --- Thanks. That was very useful seeing a few more of the options in combination. That, combined with the updated G4W, is a lot better/faster. I've also searched for: $ git grep -n "\.description" -- \*.sh which only came up with git-request-pull.sh:74: ! git config "branch.$branch_name.description" >/dev/null git-request-pull.sh:156: git config "branch.$branch_name.description" as relevant hits: Sometimes one can be a bit feart to try out some command options.. Philip