{"thread":{"id":"38914","subject":"Re: Identifying user who ran “git reset” command","startedAt":"2015-03-26T06:30:42Z","lastAt":"2015-03-26T06:30:42Z","messageCount":1,"participants":["Gaurav Chhabra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"258539","messageId":"CAGDgvc1E_-+cHoYEdVJHt=mZNab5WBdpRG785=iZy+OOSBQ+EA@mail.gmail.com","threadId":"38914","inReplyTo":null,"subject":"Re: Identifying user who ran “git reset” command","fromName":"Gaurav Chhabra","fromEmail":"varuag.chhabra@gmail.com","sentAt":"2015-03-26T06:30:42Z","receivedAt":"2015-03-26T06:30:42Z","isPatch":false,"sender":{"key":"varuag.chhabra@gmail.com","avatar":"https://gravatar.com/avatar/b731428347fdc09c456902cac39c52957f1e296e8edd38f6162400e8402f480e?d=mp&s=160"},"body":"First of all, my sincere apologies for the inordinate delay in reply.\nThe user who created the mess went on leave. By the time he was back,\nI got stuck in some other issue. Later, I took the log of 'history'\ncommand from his machine because i wanted to first simulate the\nscenario before i could apply Alfred's check to see whether it works.\n\nI tried simulating the scenario but couldn't reproduce it. :( Here's\nthe PASTEBIN link which details what the developer did and how i tried\nsimulating the same: http://pastebin.com/0GkSc59y\n\nAs you will notice from the above link, in the original case, the\ndeveloper got \"Your branch is ahead of 'origin/some_branch' by 2\ncommit.\" message while in my simulation, i got \"Your branch and\n'origin/some_branch' have diverged, and have 1 and 1 different commit\neach, respectively.\"\n\nNot only is the message different, in the simulation, i can actually\nsee the user's (in this case, harry) detail in 'git log' command. In\nthe original case, the log did not contain any info on the user who\nmessed up history.\n\nAlthough i did suspect that Alfred's suggestion might not actually\naddress this issue but i still wanted to confirm it. However, thanks\nAlfred because it did solve another issue (disabling \"force push\") for\nwhich i was planning to put a check. :)\n\n@Randall/Kevin: The type of setup you suggested will definitely be\nideal but in the type of environment we operate, i'm highly skeptical\nwhether it will be implemented. :) I surely will highlight the issue\nand its impact though. As Gergely earlier mentioned, i guess i will\nhave to capture ref updates. I never really looked into 'refs' before\nbut now i will have to. I'm sure it will help me customize many other\nthings as well especially access-related stuff.\n\n\nThanks again to Junio, Gergely, Alfred, Randall and Kevin for their inputs. :)\n"}]}