git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Anyone have a commit hook for forbidding old branches from being merged in?

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 2, 2011, 11:27 UTC
Message-ID
<CACBZZX5+AC0ZxsdNMrEEq=h+1KWDxXhCxL2P7UBdM=cPTwS7vA@mail.gmail.com>
In-Reply-To
<4ED82BCA.5080909@gmail.com>
On Fri, Dec 2, 2011 at 02:37, Neal Kreitzinger <nkreitzinger@gmail.com> wrote:
> It sounds like you're saying that people should rebase before merging to
> main.  That means their merge would be a fast-forward.  You could just
> reject anyone who has not done a current rebase.  Then you could use this
> technique from the pre-rebase.sample hook to enforce up-to-date rebases:

That would be an overly invasive change to people's workflows. It's fine if you merge something in as long as the initial merge base isn't N days older than the current state of the mainline.

Previous: Neal Kreitzinger
Message 4 of 4 in “Anyone have a commit hook for forbidding old branches from being merged in?”
  1. Ævar Arnfjörð BjarmasonDec 1, 2011
  2. Thomas RastDec 1, 2011
  3. Neal KreitzingerDec 2, 2011
  4. Ævar Arnfjörð BjarmasonDec 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.