git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Steven Michalske <smichalske@gmail.com>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: [RFD] Rewriting safety - warn before/when rewriting published history
Date: Mon, 6 Feb 2012 07:53:57 +0100	[thread overview]
Message-ID: <CALKQrgfOE7Ekmuvut9Lff37v7BPJu5ohYjwq_Nk2sCkrUOF15w@mail.gmail.com> (raw)
In-Reply-To: <EAF9D593-4E0C-4C95-A048-3F6AC8ADD866@gmail.com>

On Mon, Feb 6, 2012 at 01:57, Steven Michalske <smichalske@gmail.com> wrote:
> On Feb 4, 2012, at 11:45 AM, Jakub Narebski wrote:
>> In Mercurial 2.1 there are three available phases: 'public' for
>> published commits, 'draft' for local un-published commits and
>> 'secret' for local un-published commits which are not meant to
>> be published.
>>
>> The phase of a changeset is always equal to or higher than the phase
>> of it's descendants, according to the following order:
>>
>>      public < draft < secret
>
> Let's not limit ourselves to just three levels.  They are a great start but I propose the following.
>
> published - The commits that are on a public repository that if are rewritten will invoke uprisings.
>        general rule here would be to revert or patch, no rewrites.
> based - The commits that the core developers have work based upon. (not just the commits in their repo.)
>        general rule is notify your fellow developers before a rewrite.
> shared - The commits that are known to your fellow core developers.
>        These commits are known, but have not had work based off of them.  Minimal risk to rewrite.
> local - The commits that are local only, no one else has a copy.
>        Commits your willing to share, but have not been yet shared, either from actions of you, or a fetch from others.
> restricted or private - The commits that you do not want shared.
>        Manually added, think of a branch tip marked as restricted automatically promotes commits to the branch as restricted.
>
> Maybe make these like nice levels, but as two components, publicity 0-100 and rewritability 0-100
>        Published is publicity 100 and rewritability 0
>        Restricted is publicity 0 and rewritability 100
>        Based publicity 75 and rewritability 25
>        Shared publicity 50 and rewritability 50
>        Local publicity 25 and rewritability 75
>        Restricted publicity 0 and rewritability 100
>
> [...]

With all due respect, I believe this is crazy. You're adding an entire
layer of complexity on top of commits that every user has to know
about, and has little or no value to most of them. IMHO, most users
only want Git to help them avoid doing something stupid (rewriting
'public' commits or publishing 'secret' commits), and to do so with
the minimal amount of manual user interaction. The above idea is more
suitable for armchair dictators that want to micromanage their commits
along two arbitrary axes of evil^H^H^H^Hpointlessness. On both axes,
you'll need threshold values where Git starts refusing to
publish/rewrite your commit. Hence, the only thing that matters is
whether the 'publicity'/'rewritability' value is above/below that
threshold, at which point you could save yourself a lot of trouble by
making them simple boolean flags instead.

Having said that, you can use 'git notes' along with existing and
proposed hooks (as described elsewhere in this thread) to implement
whatever crazy commit publishing/rewriting scheme you desire. To
misquote someone famous: I disapprove of what you want to do with Git,
but I will defend to the death your right to make Git do what you want
(in the privacy of your own repos). ;)


Have fun! :)

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

  reply	other threads:[~2012-02-06  6:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-04 19:45 [RFD] Rewriting safety - warn before/when rewriting published history Jakub Narebski
2012-02-05 14:33 ` Ben Walton
2012-02-05 15:05   ` Jakub Narebski
     [not found] ` <CAFA910035B74E56A52A96097E76AC39@PhilipOakley>
2012-02-05 16:15   ` Jakub Narebski
2012-02-05 17:29     ` Johan Herland
2012-02-05 20:46       ` Jakub Narebski
2012-02-05 22:49         ` Johan Herland
2012-02-06 14:44           ` Jakub Narebski
2012-02-06 15:59             ` Johan Herland
2012-02-06 17:14               ` Jakub Narebski
2012-02-06 20:16                 ` Johan Herland
2012-02-07 14:31                   ` Jakub Narebski
2012-02-07 15:09                     ` Johan Herland
2012-02-10 19:38                       ` Jakub Narebski
2012-02-10 20:19                         ` Philip Oakley
2012-02-11 13:10                         ` Johan Herland
2012-02-11 13:45                           ` Jakub Narebski
2012-02-20 21:07                             ` [RFC] pre-rebase: Refuse to rewrite commits that are reachable from upstream Johan Herland
2012-02-20 21:21                               ` Johan Herland
2012-02-20 22:43                               ` Junio C Hamano
2012-02-21  0:03                                 ` Johan Herland
2012-02-21  7:44                                   ` Junio C Hamano
2012-02-21 23:23                                     ` Johan Herland
2012-02-21 23:43                                       ` Junio C Hamano
2012-02-21 23:59                                         ` Dave Zarzycki
2012-02-22  7:09                                           ` Jeff King
2012-02-22  8:00                                             ` Dave Zarzycki
2012-04-07 15:01                           ` [RFD] Rewriting safety - warn before/when rewriting published history Steven Michalske
2012-04-07 14:49                       ` Steven Michalske
2012-02-07 17:27                     ` Ronan Keryell
2012-02-06  0:57 ` Steven Michalske
2012-02-06  6:53   ` Johan Herland [this message]
2012-02-06 13:45   ` Jakub Narebski
2012-04-07 14:36     ` Steven Michalske

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=CALKQrgfOE7Ekmuvut9Lff37v7BPJu5ohYjwq_Nk2sCkrUOF15w@mail.gmail.com \
    --to=johan@herland.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=smichalske@gmail.com \
    /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).