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

Re: [PATCH] Switch receive.denyCurrentBranch to "refuse"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2009, 08:01 UTC
Message-ID
<7vskmwc5js.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090202124148.GB8325@sigio.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> I think this is a definite improvement over the current behavior. As I
> said before, I am not sure what is the right path (though I think I am
> leaning towards leaving the warning longer based on the recent
> discussion), but if we are to leave the default to warn and not refuse,
> I think this should definitely be applied.
>
> A few comments on the specific message:
Thanks.

The commit was only in 'pu', so I'll be amending it instead of applying an incremental, but here is the interdiff to incorporate your comments.

 builtin-receive-pack.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git c/builtin-receive-pack.c w/builtin-receive-pack.c
index f2c94fc..09c07d9 100644
--- c/builtin-receive-pack.c
+++ w/builtin-receive-pack.c
@@ -217,17 +217,18 @@ static int is_ref_checked_out(const char *ref)
 
 static char *warn_unconfigured_deny_msg[] = {
 	"Updating the currently checked out branch may cause confusion,",
-	"as the index and work tree do not reflect changes that are in HEAD."
+	"as the index and work tree do not reflect changes that are in HEAD.",
 	"As a result, you may see the changes you just pushed into it",
 	"reverted when you run 'git diff' over there, and you may want",
 	"to run 'git reset --hard' before starting to work to recover.",
 	"",
 	"You can set 'receive.denyCurrentBranch' configuration variable to",
-	"'refuse' in the repository to forbid pushing into the current branch",
-	"of it."
+	"'refuse' in the remote repository to forbid pushing into the",
+	"current branch of it."
 	"",
 	"To allow pushing into the current branch, you can set it to 'ignore';",
-	"but this is not recommended unless you really know what you are doing.",
+	"but this is not recommended unless you arranged its work tree to get",
+	"updated to match what you pushed in some other way.",
 	"",
 	"To squelch this message, you can set it to 'warn'.",
 	"",
Previous: Junio C HamanoNext: Jeff King
Message 29 of 43 in “Switch receive.denyCurrentBranch to "refuse"”
  1. Switch receive.denyCurrentBranch to "refuse"Johannes Schindelin, Jan 30, 2009
  2. Jay SoffianJan 30, 2009
  3. Asheesh LaroiaJan 30, 2009
  4. Dave AbrahamsApr 13, 2010
  5. Junio C HamanoApr 13, 2010
  6. Miklos VajnaJan 30, 2009
  7. Johannes SchindelinJan 30, 2009
  8. Miklos VajnaFeb 11, 2009
  9. Junio C HamanoFeb 11, 2009
  10. Jeff KingJan 30, 2009
  11. Johannes SchindelinJan 30, 2009
  12. Johannes SixtJan 30, 2009
  13. Jeff KingJan 30, 2009
  14. Johannes SchindelinJan 30, 2009
  15. Jeff KingJan 30, 2009
  16. Jay SoffianJan 30, 2009
  17. Jeff KingJan 30, 2009
  18. Johannes SchindelinJan 30, 2009
  19. Jay SoffianJan 30, 2009
  20. Johannes SchindelinJan 30, 2009
  21. Nanako ShiraishiJan 31, 2009
  22. Junio C HamanoFeb 1, 2009
  23. Junio C HamanoFeb 1, 2009
  24. Jeff KingFeb 2, 2009
  25. Junio C HamanoFeb 3, 2009
  26. Junio C HamanoFeb 3, 2009
  27. Jeff KingFeb 6, 2009
  28. Junio C HamanoFeb 7, 2009
  29. Junio C HamanoFeb 3, 2009
  30. Jeff KingFeb 3, 2009
  31. Junio C HamanoFeb 3, 2009
  32. Junio C HamanoFeb 1, 2009
  33. Sam VilainFeb 1, 2009
  34. Junio C HamanoFeb 1, 2009
  35. Sam VilainFeb 2, 2009
  36. Junio C HamanoFeb 2, 2009
  37. Sam VilainFeb 2, 2009
  38. Johannes SchindelinFeb 1, 2009
  39. Junio C HamanoFeb 1, 2009
  40. Junio C HamanoJan 30, 2009
  41. Johannes SchindelinJan 30, 2009
  42. Jeff KingJan 30, 2009
  43. Johannes SchindelinJan 30, 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.