You are viewing a plain text version of this content. The canonical link for it is here.
Posted to infrastructure-issues@apache.org by "Paul Querna (JIRA)" <ji...@apache.org> on 2010/11/05 18:03:42 UTC

[jira] Created: (INFRA-3162) Hook: No history rewriting

Hook: No history rewriting
--------------------------

                 Key: INFRA-3162
                 URL: https://issues.apache.org/jira/browse/INFRA-3162
             Project: Infrastructure
          Issue Type: New Feature
      Security Level: public (Regular issues)
          Components: Git
            Reporter: Paul Querna


Do not allow history rewriting / git push --force.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (INFRA-3162) Hook: No history rewriting

Posted by "#asfinfra IRC Bot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/INFRA-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

#asfinfra IRC Bot closed INFRA-3162.
------------------------------------

    
> Hook: No history rewriting
> --------------------------
>
>                 Key: INFRA-3162
>                 URL: https://issues.apache.org/jira/browse/INFRA-3162
>             Project: Infrastructure
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: Git
>            Reporter: Paul Querna
>            Priority: Trivial
>         Attachments: update
>
>
> Do not allow history rewriting / git push --force.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (INFRA-3162) Hook: No history rewriting

Posted by "Gavin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/INFRA-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024777#comment-13024777 ] 

Gavin commented on INFRA-3162:
------------------------------

So, if this is imlemented, can we document this feature somewhere and close this issue.?

> Hook: No history rewriting
> --------------------------
>
>                 Key: INFRA-3162
>                 URL: https://issues.apache.org/jira/browse/INFRA-3162
>             Project: Infrastructure
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: Git
>            Reporter: Paul Querna
>            Priority: Trivial
>         Attachments: update
>
>
> Do not allow history rewriting / git push --force.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (INFRA-3162) Hook: No history rewriting

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/INFRA-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated INFRA-3162:
-------------------------------------

    Attachment: update

This hook prevents rewriting the of the HEAD branch (defaults to refs/heads/master, but the git.apache.org clones switch it to refs/heads/trunk to match SVN).

I opted to only enforce this for the HEAD branch because it'd otherwise just cause lots of pain in feature branches. A second place I would also like to enforce this is in version branches. This would be quite possible but there are a few methods we could use to implement it.

One would be to say that any branch that has a commit that's been taged since its split from trunk, which while automagical seems like it could lead to weird issues in restricting other work. Alternatively, we could just make it part of the process that version branches are prefixed with something like rel, so we'd have rel/1.0.x rel/1.1.x etc etc. That's also assuming that we want to enforce such things. Also, it'd be possible to make it configurable as well.

Anyway, basic no-rewrite appears to work. 

> Hook: No history rewriting
> --------------------------
>
>                 Key: INFRA-3162
>                 URL: https://issues.apache.org/jira/browse/INFRA-3162
>             Project: Infrastructure
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: Git
>            Reporter: Paul Querna
>            Priority: Trivial
>         Attachments: update
>
>
> Do not allow history rewriting / git push --force.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (INFRA-3162) Hook: No history rewriting

Posted by "Joe Schaefer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/INFRA-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Schaefer updated INFRA-3162:
--------------------------------

    Priority: Trivial  (was: Major)

> Hook: No history rewriting
> --------------------------
>
>                 Key: INFRA-3162
>                 URL: https://issues.apache.org/jira/browse/INFRA-3162
>             Project: Infrastructure
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: Git
>            Reporter: Paul Querna
>            Priority: Trivial
>
> Do not allow history rewriting / git push --force.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Resolved] (INFRA-3162) Hook: No history rewriting

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/INFRA-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis resolved INFRA-3162.
--------------------------------------

    Resolution: Fixed

Implemented with an extension.

https://git-wip-us.apache.org/repos/infra/asfgit-admin/blob/master/asfgit/hooks/pre_receive.py

There's a repository specific configuration variable that lists refname patterns that are "protected". This way we can protect master, trunk, rel/1.0.x, tags/rel/1.0.0 etc to not allow rewinding but also provide committers the ability to have branches they can do development work on.

Ie, something like "davisp/my-new-feature" is not protected and could be used as a playground, while anything touching master is permanent. This way committers are encouraged to push development code to the central repository instead of doing experiments in local or on other services.

> Hook: No history rewriting
> --------------------------
>
>                 Key: INFRA-3162
>                 URL: https://issues.apache.org/jira/browse/INFRA-3162
>             Project: Infrastructure
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: Git
>            Reporter: Paul Querna
>            Priority: Trivial
>         Attachments: update
>
>
> Do not allow history rewriting / git push --force.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira