Can I know who are the makers of branch?

35 views
Skip to first unread message

seonguk.baek

unread,
May 22, 2012, 10:01:27 PM5/22/12
to Repo and Gerrit Discussion
Deal all.

We can know who made tag or commit by tagger or committer.

Can I know who create a branch?

Thanks.

Shawn Pearce

unread,
May 22, 2012, 11:31:16 PM5/22/12
to seonguk.baek, Repo and Gerrit Discussion
On Tue, May 22, 2012 at 7:01 PM, seonguk.baek <baeks...@gmail.com> wrote:
> We can know who made tag or commit by tagger or committer.
>
> Can I know who create a branch?

You may be able to get what you are looking for from the reflog. For
example `git reflog show name` or just `cat
logs/refs/{heads,tags}/name`.

seonguk.baek

unread,
May 23, 2012, 2:15:18 AM5/23/12
to Repo and Gerrit Discussion
Thanks for your reply :-)

It's working thanks.

In addition, someone deleted branch like 'git push :branchname'

Can I know who are deleted branch?

Thank you. d:-)

Magnus Bäck

unread,
May 23, 2012, 9:27:59 AM5/23/12
to Repo and Gerrit Discussion
On Wednesday, May 23, 2012 at 02:15 EDT,
"seonguk.baek" <baeks...@gmail.com> wrote:

> In addition, someone deleted branch like 'git push :branchname'
>
> Can I know who are deleted branch?

Only if you can dig up the offending receive-pack command from sshd_log.
There is no explicit logging of ref delete operations, and if the
deletion is made from the UI there's AFAICT no success logging at all.
There probably should be.

--
Magnus Bäck
ba...@google.com

Martin Fick

unread,
May 23, 2012, 10:13:43 AM5/23/12
to Magnus Bäck, Repo and Gerrit Discussion
You are not the first to ask this, and I think this is a very legitimate request. I suggest that you post a request to log deletes to the GIT mailing list since it would be good to get this defined at the GIT level.
>--
>To unsubscribe, email repo-discuss...@googlegroups.com
>More info at http://groups.google.com/group/repo-discuss?hl=en

Employee of Qualcomm Innovation Center,Inc. which is a member of Code Aurora Forum

Magnus Bäck

unread,
May 23, 2012, 10:26:54 AM5/23/12
to Repo and Gerrit Discussion
On Wednesday, May 23, 2012 at 10:13 EDT,
Martin Fick <mf...@codeaurora.org> wrote:

> "Magnus Bäck" <ba...@google.com> wrote:
>
> > Only if you can dig up the offending receive-pack command from
> > sshd_log. There is no explicit logging of ref delete operations,
> > and if the deletion is made from the UI there's AFAICT no success
> > logging at all. There probably should be.
>
> You are not the first to ask this, and I think this is a very
> legitimate request. I suggest that you post a request to log
> deletes to the GIT mailing list since it would be good to get
> this defined at the GIT level.

How would this be defined at the Git level, given that Git doesn't
perform any logging besides stdout/stderr messages? Are you saying Git
should say something about performed deletions in the receive-pack
output that's (I guess) fed back to clients?

I think Gerrit's logging can be improved in general, but that's a
topic for another thread.

--
Magnus Bäck
ba...@google.com

Martin Fick

unread,
May 23, 2012, 10:38:05 AM5/23/12
to Magnus Bäck, Repo and Gerrit Discussion


"Magnus Bäck" <ba...@google.com> wrote:

>On Wednesday, May 23, 2012 at 10:13 EDT,
> Martin Fick <mf...@codeaurora.org> wrote:
>
>> "Magnus Bäck" <ba...@google.com> wrote:
>>
>> > Only if you can dig up the offending receive-pack command from
>> > sshd_log. There is no explicit logging of ref delete operations,
>> > and if the deletion is made from the UI there's AFAICT no success
>> > logging at all. There probably should be.
>>
>> You are not the first to ask this, and I think this is a very
>> legitimate request. I suggest that you post a request to log
>> deletes to the GIT mailing list since it would be good to get
>> this defined at the GIT level.
>
>How would this be defined at the Git level,

I am thinking that this should be added to the reflog if it is not already. If you go back and read Shawn's reply you will notice that most branches operations are logged to a branch specific log, I believe that is standard git, not just jgit? The problem is that when the branch is deleted, so is this log! If jgit is indeed just mimicking git's behavior here, then it would help to get the git community to fix this first,

-Martin

Luciano Carvalho

unread,
May 23, 2012, 10:44:22 AM5/23/12
to Repo and Gerrit Discussion

It'd be nice if that delete info was stored in the reflogs somehow.

Magnus Bäck

unread,
May 23, 2012, 10:47:30 AM5/23/12
to Repo and Gerrit Discussion
On Wednesday, May 23, 2012 at 10:38 EDT,
Martin Fick <mf...@codeaurora.org> wrote:

> I am thinking that this should be added to the reflog if it is not
> already. If you go back and read Shawn's reply you will notice that
> most branches operations are logged to a branch specific log, I
> believe that is standard git, not just jgit?

Yup.

> The problem is that when the branch is deleted, so is this log! If
> jgit is indeed just mimicking git's behavior here, then it would help
> to get the git community to fix this first,

Right. When you said "log" I was thinking /var/log/syslog, not reflog.
I vaguely recall this being discussed on the Git list quite recently.
I'll look at it and post a question if necessary.

--
Magnus Bäck
ba...@google.com

Luthander, Fredrik

unread,
May 23, 2012, 10:52:48 AM5/23/12
to Magnus Bäck, Repo and Gerrit Discussion


> -----Original Message-----
> From: repo-d...@googlegroups.com [mailto:repo-
> dis...@googlegroups.com] On Behalf Of Magnus Bäck
>
> On Wednesday, May 23, 2012 at 10:13 EDT,
> Martin Fick <mf...@codeaurora.org> wrote:
>
> > "Magnus Bäck" <ba...@google.com> wrote:
> >
> > > Only if you can dig up the offending receive-pack command from
> > > sshd_log. There is no explicit logging of ref delete operations,
> > > and if the deletion is made from the UI there's AFAICT no success
> > > logging at all. There probably should be.
> >
> > You are not the first to ask this, and I think this is a very
> > legitimate request. I suggest that you post a request to log
> > deletes to the GIT mailing list since it would be good to get
> > this defined at the GIT level.
>
> How would this be defined at the Git level, given that Git doesn't
> perform any logging besides stdout/stderr messages? Are you saying Git

It could, if you ask it.

core.logAllRefUpdates = true

Putting option behind a 'git config' command will make git log ref updates in logs/refs/$REFNAME if I understood things correctly.
Not sure which git version it was introduced in.

> should say something about performed deletions in the receive-pack
> output that's (I guess) fed back to clients?

Undoubtedly it could use some better presentation than in a file on the server side git, granted.

> I think Gerrit's logging can be improved in general, but that's a
> topic for another thread.

I agree on this too, it was not easy as an administrator to get in to gerrit logs. It's still too programmatic in many senses.

--
Best regards,
    Fredrik Luthander
Sony Mobile Communications AB

Magnus Bäck

unread,
May 23, 2012, 11:29:31 AM5/23/12
to Repo and Gerrit Discussion
On Wednesday, May 23, 2012 at 10:47 EDT,
Indeed, this was discussed on git@vger about three weeks ago.

http://thread.gmane.org/gmane.comp.version-control.git/196962

See also:
http://thread.gmane.org/gmane.comp.version-control.git/135837/focus=150778
http://thread.gmane.org/gmane.comp.version-control.git/135837/focus=150734

While I do agree that native Git support for deletion reflogs would
be nice, I don't know if the reflog should be the only source of
information for ref deletions and other interesting events. A reflog
is okay if you need to dig into a specific git and a specific ref, but
if you want an aggregation of such events it's not very convenient.

--
Magnus Bäck
ba...@google.com
Reply all
Reply to author
Forward
0 new messages