git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Feature suggestion: Filter branches by user
@ 2019-01-30 15:13 Victor Porton
  2019-01-30 21:49 ` Jacob Keller
  0 siblings, 1 reply; 3+ messages in thread
From: Victor Porton @ 2019-01-30 15:13 UTC (permalink / raw)
  To: git

I want Git to display all branches created by me.

So we need the new feature of Git, to display all branches created by a 
given user ("me" by default).

I think, the similar feature for tags may also be useful.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature suggestion: Filter branches by user
  2019-01-30 15:13 Feature suggestion: Filter branches by user Victor Porton
@ 2019-01-30 21:49 ` Jacob Keller
       [not found]   ` <5e27b012-c915-e390-9391-e42e1c9bb08b@narod.ru>
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Keller @ 2019-01-30 21:49 UTC (permalink / raw)
  To: Victor Porton; +Cc: Git mailing list

On Wed, Jan 30, 2019 at 7:22 AM Victor Porton <porton@narod.ru> wrote:
>
> I want Git to display all branches created by me.
>
> So we need the new feature of Git, to display all branches created by a
> given user ("me" by default).
>
> I think, the similar feature for tags may also be useful.
>

Branches don't contain authorship, as far as I know. Annotated tags
do, but lightweight tags do not.

For annotated tags you should be able to build an alias which lists
all the tag objects and includes the author, i.e.

git for-each-ref --format='%(refname)%09%(tagger)' refs/tags

This will list the refname along with its tagger.

I'm sure patches to add a "--tagger" option to git tag in list mode
would also be welcome.

Thanks,
Jake

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature suggestion: Filter branches by user
       [not found]   ` <5e27b012-c915-e390-9391-e42e1c9bb08b@narod.ru>
@ 2019-01-30 21:58     ` Jacob Keller
  0 siblings, 0 replies; 3+ messages in thread
From: Jacob Keller @ 2019-01-30 21:58 UTC (permalink / raw)
  To: Victor Porton, Git mailing list

On Wed, Jan 30, 2019 at 1:51 PM Victor Porton <porton@narod.ru> wrote:
>
> On 30/01/2019 23:49, Jacob Keller wrote:
> > On Wed, Jan 30, 2019 at 7:22 AM Victor Porton <porton@narod.ru> wrote:
> >> I want Git to display all branches created by me.
> >>
> >> So we need the new feature of Git, to display all branches created by a
> >> given user ("me" by default).
> >>
> >> I think, the similar feature for tags may also be useful.
> >>
> > Branches don't contain authorship, as far as I know. Annotated tags
> > do, but lightweight tags do not.
> So it should be changed. Branches should contain authorship (to
> implement my feature suggestion).

If you wanted to implement such a feature, yes that would have to be part if it.

I do not believe that it would be easy, and it would likely require a
lot of effort to do so, because branches don't point to specific
objects (unlike annotated tags), and thus the information about "who
created a branch" would not align well with an object.

You *can* use the most recent commit in a branch as a proxy of "who
last edited this branch", possibly by using the committer.

However, because branches change over time, (as new commits are
added), you can't simply store the information of who created the
branch as an object (which is what annotated tags do).

I'm not sure this is feasible.

A simpler solution for your end, is to have an standard prefix you use
for your own branches (i.e. I use jk-, because that's my initials).
Then you can use prefix matching to find the branches that are your
own.

Thanks,
Jake

P.S. It helps if you leave the list in the reply line so that the
discussion remains public, as this is an open mailing list.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-30 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 15:13 Feature suggestion: Filter branches by user Victor Porton
2019-01-30 21:49 ` Jacob Keller
     [not found]   ` <5e27b012-c915-e390-9391-e42e1c9bb08b@narod.ru>
2019-01-30 21:58     ` Jacob Keller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).