Re: [PATCH] doc: show usage of branch description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Philip Oakley" <philipoakley@xxxxxxx> 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 <gitster@xxxxxxxxx>
Date:   Thu Oct 6 23:12:09 2011 -0700

    fmt-merge-msg: use branch.$name.description
    
    This teaches "merge --log" and fmt-merge-msg to use branch description
    information when merging a local topic branch into the mainline. The
    description goes between the branch name label and the list of commit
    titles.
    
    The refactoring to share the common configuration parsing between
    merge and fmt-merge-msg needs to be made into a separate patch.
    
    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>

etc. etc.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]