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

Re: Removing options from build

From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Date
Jan 13, 2009, 22:34 UTC
Message-ID
<200901131634.31389.bss@iguanasuicide.net>
In-Reply-To
<1231885132.14181.38.camel@starfruit>
On Tuesday 2009 January 13 16:18:52 R. Tyler Ballance wrote:
Show 8 quoted lines
>On Tue, 2009-01-13 at 16:06 -0600, Boyd Stephen Smith Jr. wrote:
>> receive.denyNonFastForwards
>>         If set to true, git-receive-pack will deny a ref update which
>>         is not a fast forward. Use this to prevent such an update via a
>>         push, even if that push is forced.
>
>Looks good, thanks; sorry I missed it, didn't even think to look at the
>git-config(1) page for such an option.

I didn't really know about it until earlier this week. I was expecting to be able to do a non-ff push to one of my repositories and it didn't work because this was set "behind my back". (I'm not sure when it got added, but I don't think the shared repositories I set up with git 1.4.4.4 had it, so I wasn't expecting it.)

>I'm assuming this will actually cover the rebase -i case as well?

I don't know exactly what you mean. It prevents fast-forwards, so once a commit is "visible" on one of your central branches, it won't ever go away. (You can, of course, use git revert to undo it's changes.)

As others mentioned, now would be a good time to look at receive.denyDeletes and/or a custom hook as well.

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     
Previous: R. Tyler Ballance
Message 12 of 12 in “Removing options from build”
  1. R. Tyler BallanceJan 13, 2009
  2. Thomas RastJan 13, 2009
  3. Thomas RastJan 13, 2009
  4. R. Tyler BallanceJan 13, 2009
  5. Björn SteinbrinkJan 13, 2009
  6. Boyd Stephen Smith Jr.Jan 13, 2009
  7. Daniel BarkalowJan 13, 2009
  8. Björn SteinbrinkJan 13, 2009
  9. Jakub NarebskiJan 13, 2009
  10. Boyd Stephen Smith Jr.Jan 13, 2009
  11. R. Tyler BallanceJan 13, 2009
  12. Boyd Stephen Smith Jr.Jan 13, 2009

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.