git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sitaram Chamarty <sitaramc@gmail.com>
To: Luca Milanesio <luca.milanesio@gmail.com>, Jeff King <peff@peff.net>
Cc: Thomas Rast <tr@thomasrast.ch>, Git Mailing List <git@vger.kernel.org>
Subject: Re: can we prevent reflog deletion when branch is deleted?
Date: Thu, 14 Nov 2013 19:18:26 +0530	[thread overview]
Message-ID: <5284D4AA.2030204@gmail.com> (raw)
In-Reply-To: <66513F31-CF2E-4327-AEA3-20176C14EEE1@gmail.com>

On 11/14/2013 04:47 PM, Luca Milanesio wrote:
> Would be really useful anyway to have the ability to create a
> server-side reference based on a SHA-1, using the Git protocol.
> Alternatively, just fetching a remote repo based on a SHA-1 (not
> referenced by any ref-spec but still existent) so that you can create
> a new reference locally and push.

That's a security issue.

Just to clarify, what I am asking for is the ability to recover on the
server, where you have access to the actual files that comprise the
repo.

sitaram

> 
> Luca.
> 
> On 14 Nov 2013, at 11:09, Jeff King <peff@peff.net> wrote:
> 
>> On Thu, Nov 14, 2013 at 04:26:46PM +0530, Sitaram Chamarty wrote:
>>
>>>> I do not know about any particular debate in git circles, but I assume
>>>> Sitaram is referring to this incident:
>>>>
>>>>  https://groups.google.com/d/msg/jenkinsci-dev/-myjRIPcVwU/t4nkXONp8qgJ
>>>>
>>>> in which a Jenkins dev force-pushed and rewound history on 150 different
>>>> repos. In this case the reflog made rollback easy, but if he had pushed
>>>> a deletion, it would be harder.
>>>
>>> I don't know if they had a reflog on the server side; they used
>>> client-side reflogs if I understood correctly.
>>>
>>> I'm talking about server side (bare repo), assuming the site has
>>> core.logAllRefUpdates set.
>>
>> Yes, they did have server-side reflogs (the pushes were to GitHub, and
>> we reflog everything). Client-side reflogs would not be sufficient, as
>> the client who pushed does not record the history he just rewound (he
>> _might_ have it at refs/remotes/origin/master@{1}, but if somebody
>> pushed since his last fetch, then he doesn't).
>>
>> The "simplest" way to recover is to just have everyone push again
>> (without --force). The history will just silently fast-forward to
>> whoever has the most recent tip. The downside is that you have to wait
>> for that person to actually push. :)
>>
>> I think they started with that, and then eventually GitHub support got
>> wind of it and pulled the last value for each repo out of the
>> server-side reflog for them.
>>
>> -Peff
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2013-11-14 13:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01  1:31 can we prevent reflog deletion when branch is deleted? Sitaram Chamarty
2013-06-01  3:00 ` Michael Haggerty
2013-06-01  5:03   ` Jeff King
2013-06-01  7:59     ` Ramkumar Ramachandra
2013-06-01  9:09       ` Jeff King
2013-06-01  9:47         ` Ramkumar Ramachandra
2013-06-01 17:25           ` Sitaram Chamarty
2013-06-01 17:56             ` Ramkumar Ramachandra
2013-06-02 10:20               ` Sitaram Chamarty
2013-11-14  0:18               ` Sitaram Chamarty
2013-11-14  7:56                 ` Thomas Rast
2013-11-14  8:07                   ` Jeff King
2013-11-14 10:56                     ` Sitaram Chamarty
2013-11-14 11:09                       ` Jeff King
2013-11-14 11:17                         ` Luca Milanesio
2013-11-14 13:48                           ` Sitaram Chamarty [this message]
2013-11-14 13:47                         ` Sitaram Chamarty
2013-11-14  8:14                 ` Jeff King
2013-11-14 14:42                   ` Stephen Bash
2013-11-14 16:20                     ` Sitaram Chamarty
2013-11-14 16:06                   ` Sitaram Chamarty

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=5284D4AA.2030204@gmail.com \
    --to=sitaramc@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=luca.milanesio@gmail.com \
    --cc=peff@peff.net \
    --cc=tr@thomasrast.ch \
    /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).