openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Milton Miller II" <miltonm@us.ibm.com>
To: Ed Tanous <ed@tanous.net>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	Brad Bishop <bradleyb@fuzziesquirrel.com>
Subject: RE: Making the "new repo" requests go faster
Date: Tue, 9 Mar 2021 18:24:02 +0000	[thread overview]
Message-ID: <OF154E4A70.F0575574-ON00258693.00642DBF-00258693.006513D9@notes.na.collabserv.com> (raw)
In-Reply-To: <CACWQX81ZtWH_ROotW1vz5J4a_X09mgkEMSGoTPL=tdao-L+LzQ@mail.gmail.com>

On March 9, Ed Tanous <ed@tanous.net> wrote:
>On Tue, Mar 9, 2021 at 9:32 AM Milton Miller II <miltonm@us.ibm.com>
>wrote:
>>
>> On March 9, Brad Bishop wrote:
>> >On Tue, Mar 9, 2021 at 5:57 AM Brad Bishop
>> ><bradleyb@fuzziesquirrel.com> wrote:
>> >> On Fri, Mar 05, 2021 at 11:02:24AM -0800, Ed Tanous wrote:
>> >> >On Fri, Feb 5, 2021 at 12:02 PM Ed Tanous <ed@tanous.net>
>wrote:
>> >> >>
>> >> >> In an effort to fix these issues and more, I'd like to
>propose
>> >> >> creating a new repository for a "new daemon" template.
>> >> >
>> >> >If anyone is following this thread still, patches have been
>pushed
>> >> >to
>> >>
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-
>2Dproject.xyz_c_openbmc_docs_-2B_41099&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1
>ZOg&r=bvv7AJEECoRKBU02rcu4F5DWd-EwX8As2xrXeO9ZSo4&m=zOJQ8qDYu5wBWzKub
>6P9N-WKFD3SB3DdgsAsegfH5xQ&s=iLLTE_nLMY6TUpL-Q4U6xtZoUdNkXSDwdlMskft8
>vIU&e=    for the
>> >> >moment.  As they get closer to approval, I'd like to get a new
>> >> >template repo created to house the code contained in that
>patch,
>> >> >and
>> >> >CI setup on said repo if I could.
>> >>
>> >> Thanks Ed!
>> >>
>> >> The only reason I haven't created this already was I wasn't sure
>> >> what to
>> >> call it.  Any ideas on a name out there?
>> >
>> >No worries.  I don't really have a strong opinion on what it's
>called
>> >either.  The ideas I've had so far were "Sample app" or "example
>> >app".
>>
>>
>> One thing I wanted to point out when we are adopting this.
>>
>> Git has a feature that it purposely checks the oldest ancestor of
>> the target repository against the source repository.  This is a
>> check that helps prevent pushing an unrelated tree.
>>
>> From the git push man page:
>>
>>        -f, --force
>>            Usually, the command refuses to update a remote ref that
>is not an
>>            ancestor of the local ref used to overwrite it. This
>flag disables
>>            the check. This can cause the remote repository to lose
>commits;
>>            use it with care.
>>
>>
>> If we give instructions to rebase the commits when creating a new
>> repository the new commit time and/or committer will cause a unique
>> hash and we will not defeat this check.
>
>I'm not really following why this would be a concern for this kind of
>thing.  Sure, force push is a big hammer, and should be used with
>discretion and care, but I'm not seeing why we would ever have that
>problem on a new repo, regardless of if we squashed the template repo
>history (which would be my preference as the template repo history is
>irrelevant to a new repo) or whether we pushed it as-is with the
>template repo history.  I can't think of a workflow where we would
>rebase, but maybe I'm missing something?
>
>Can you elaborate on what the exact concern is?

User starts with template repository and adds content for app A.

User starts with template repository adding files for content B.

User accidentlly recalls pull command for repository A when 
working in repository B.

If the commits were rebased git complains.

If the repositories share a common ancestor then the content 
of A is merged into repository B.  At a minimum the user has 
unrelated content to purge.  In a worse case the content of 
the second repository is relatively small and doesn't get 
caught in the review process.

Rebasing to get an updated commit time allows this check to 
remain effective.   The Author history including timestamps 
can be preserved.

I thought about saying merge this into your repository would 
work but then I realized there is a common ancestor in the 
middle which may defeat the checking.

milton


  parent reply	other threads:[~2021-03-09 18:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 20:02 Making the "new repo" requests go faster Ed Tanous
2021-02-05 20:58 ` Brad Bishop
2021-02-08 18:08   ` Ed Tanous
2021-02-08 17:27 ` Bills, Jason M
2021-02-08 18:09   ` Ed Tanous
2021-03-05 19:02 ` Ed Tanous
2021-03-09 13:57   ` Brad Bishop
2021-03-09 15:03     ` Ed Tanous
2021-03-09 17:32     ` Milton Miller II
2021-03-09 17:57       ` Ed Tanous
2021-03-09 18:24       ` Milton Miller II [this message]
2021-03-09 18:50         ` Ed Tanous

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=OF154E4A70.F0575574-ON00258693.00642DBF-00258693.006513D9@notes.na.collabserv.com \
    --to=miltonm@us.ibm.com \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=ed@tanous.net \
    --cc=openbmc@lists.ozlabs.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).