From: Junio C Hamano <email@example.com> To: Aaron Lipman <firstname.lastname@example.org> Cc: email@example.com Subject: Re: [PATCH] ref-filter: allow merged and no-merged filters Date: Tue, 08 Sep 2020 15:46:27 -0700 Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> (Aaron Lipman's message of "Tue, 8 Sep 2020 11:37:59 -0400") Aaron Lipman <firstname.lastname@example.org> writes: > Enable ref-filter to process multiple merged and no-merged filters, and > extend functionality to git branch, git tag and git for-each-ref. This > provides an easy way to check for branches that are "graduation > candidates:" > > $ git branch --no-merged master --merged next > > To accomplish this, store the merged and no-merged filters in two > commit_list structs (reachable_from and unreachable_from) rather than > using a single commit struct (merge_commit). > > If passed more than one merged (or more than one no-merged) filter, > mirror the existing boolean logic used by contains/no-contains filters: > refs must satisfy any of the merged filters, and all of the no-merged > filters. I am not sure if the parallel with "contains" should hold in the first place. The way I would look at the --[no-]merged is that I'm enumerating commits that would be shown in this corresponding revision walking command: $ git log --decorate --oneline ^master ^maint next seen If the tip of a branch appears in that output, then the branch is included in the corresponding "git branch" output, and if it does not, the branch is excluded from the corresponding "git branch" output. $ git branch \ --no-merged master --no-merged maint \ --merged next --merged seen That would mean the rule would be "refs must be reachable by any one (or more) of the <merged> commits, and must be reachable by none of the <no-merged> commits". I am not using the same phrasing you used (i.e. "must satisify ... filter"), but are we saying the same thing? It is unclear to me what you meant by "all of the no-merged filters". The expectation is that topics in flight are either reachable from 'next' or 'seen' (there can be commits in 'next' but not in 'seen' when fixes to mismerges are involved) and those already graduated are either in 'master' or 'maint', and the above "log" and "branch" would show the stuff still in flight. But if you mean by "all of the no-merged filters" that it must be in both 'master' and 'maint' for a commit to be excluded from the output, it would not behave as I would expect. In _my_ history, since 'maint' is always kept as a subset to 'master' because I refrain from cherry-picking a fix that is in 'master' down to 'maint', I can use a single "--no-merged master" to work around the problem, but in a larger scale projects where cherry-picking fixes to maintainance track is more common, the above does not sound so useful, at least at the first glance. So I dunno. Thanks.
next prev parent reply other threads:[~2020-09-08 22:46 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-08 15:37 Aaron Lipman 2020-09-08 22:46 ` Junio C Hamano [this message] 2020-09-08 23:57 ` Aaron Lipman 2020-09-09 0:00 ` Junio C Hamano 2020-09-11 18:57 ` [PATCH v2 0/2] git branch: allow combining " Aaron Lipman 2020-09-11 18:57 ` [PATCH v2 1/2] t3201: test multiple branch filter combinations Aaron Lipman 2020-09-11 18:57 ` [PATCH v2 2/2] ref-filter: allow merged and no-merged filters Aaron Lipman 2020-09-11 21:47 ` Junio C Hamano 2020-09-13 19:31 ` [PATCH v3 0/3] git branch: allow combining " Aaron Lipman 2020-09-13 19:31 ` [PATCH v3 1/3] t3201: test multiple branch filter combinations Aaron Lipman 2020-09-13 20:58 ` Eric Sunshine 2020-09-14 20:07 ` Junio C Hamano 2020-09-13 19:31 ` [PATCH v3 2/3] Doc: cover multiple contains/no-contains filters Aaron Lipman 2020-09-13 21:10 ` Eric Sunshine 2020-09-14 20:07 ` Junio C Hamano 2020-09-13 19:31 ` [PATCH v3 3/3] ref-filter: allow merged and no-merged filters Aaron Lipman 2020-09-13 21:36 ` Eric Sunshine 2020-09-13 21:56 ` Junio C Hamano 2020-09-13 22:31 ` Eric Sunshine 2020-09-16 2:08 ` [PATCH v4 0/3] git branch: allow combining " Aaron Lipman 2020-09-16 2:08 ` [PATCH v4 1/3] t3201: test multiple branch filter combinations Aaron Lipman 2020-09-16 2:08 ` [PATCH v4 2/3] Doc: cover multiple contains/no-contains filters Aaron Lipman 2020-09-16 19:45 ` Junio C Hamano 2020-09-16 2:08 ` [PATCH v4 3/3] ref-filter: allow merged and no-merged filters Aaron Lipman 2020-09-16 4:53 ` [PATCH v4 0/3] git branch: allow combining " Junio C Hamano 2020-09-16 5:08 ` Eric Sunshine 2020-09-18 0:49 ` [PATCH 0/2] ref-filter: merged & no-merged touch-ups Aaron Lipman 2020-09-18 0:49 ` [PATCH 1/2] ref-filter: refactor do_merge_filter() Aaron Lipman 2020-09-18 5:03 ` Eric Sunshine 2020-09-18 5:04 ` Eric Sunshine 2020-09-18 17:01 ` Junio C Hamano 2020-09-18 0:49 ` [PATCH 2/2] Doc: prefer more specific file name Aaron Lipman 2020-09-18 2:52 ` [PATCH 0/2] ref-filter: merged & no-merged touch-ups Eric Sunshine 2020-09-18 21:58 ` [PATCH v2 " Aaron Lipman 2020-09-18 21:58 ` [PATCH v2 1/2] ref-filter: make internal reachable-filter API more precise Aaron Lipman 2020-09-18 21:58 ` [PATCH v2 2/2] Doc: prefer more specific file name Aaron Lipman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
email@example.com list mirror (unofficial, one of many) This inbox may be cloned and mirrored by anyone: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 git git/ https://public-inbox.org/git \ firstname.lastname@example.org public-inbox-index git Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.io/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ code repositories for the project(s) associated with this inbox: https://80x24.org/mirrors/git.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git