git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gaurav Chhabra <varuag.chhabra@gmail.com>
To: git@vger.kernel.org
Subject: Re: Identifying user who ran “git reset” command
Date: Thu, 26 Mar 2015 12:00:42 +0530	[thread overview]
Message-ID: <CAGDgvc1E_-+cHoYEdVJHt=mZNab5WBdpRG785=iZy+OOSBQ+EA@mail.gmail.com> (raw)

First of all, my sincere apologies for the inordinate delay in reply.
The user who created the mess went on leave. By the time he was back,
I got stuck in some other issue. Later, I took the log of 'history'
command from his machine because i wanted to first simulate the
scenario before i could apply Alfred's check to see whether it works.

I tried simulating the scenario but couldn't reproduce it. :( Here's
the PASTEBIN link which details what the developer did and how i tried
simulating the same: http://pastebin.com/0GkSc59y

As you will notice from the above link, in the original case, the
developer got "Your branch is ahead of 'origin/some_branch' by 2
commit." message while in my simulation, i got "Your branch and
'origin/some_branch' have diverged, and have 1 and 1 different commit
each, respectively."

Not only is the message different, in the simulation, i can actually
see the user's (in this case, harry) detail in 'git log' command. In
the original case, the log did not contain any info on the user who
messed up history.

Although i did suspect that Alfred's suggestion might not actually
address this issue but i still wanted to confirm it. However, thanks
Alfred because it did solve another issue (disabling "force push") for
which i was planning to put a check. :)

@Randall/Kevin: The type of setup you suggested will definitely be
ideal but in the type of environment we operate, i'm highly skeptical
whether it will be implemented. :) I surely will highlight the issue
and its impact though. As Gergely earlier mentioned, i guess i will
have to capture ref updates. I never really looked into 'refs' before
but now i will have to. I'm sure it will help me customize many other
things as well especially access-related stuff.


Thanks again to Junio, Gergely, Alfred, Randall and Kevin for their inputs. :)

             reply	other threads:[~2015-03-26  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  6:30 Gaurav Chhabra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-02-21  4:46 Identifying user who ran “git reset” command Technext
2015-02-21  4:58 ` Junio C Hamano
2015-02-21  5:16   ` Technext
2015-02-23 16:48     ` Kevin Daudt
2015-02-23 18:43       ` Identifying user who ran "git reset" command Randall S. Becker

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGDgvc1E_-+cHoYEdVJHt=mZNab5WBdpRG785=iZy+OOSBQ+EA@mail.gmail.com' \
    --to=varuag.chhabra@gmail.com \
    --cc=git@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).