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

[PATCH v3 0/2] New config variable push.default

From
Finn Arne Gangstad <finnag@pvv.org>
Date
Mar 16, 2009, 15:42 UTC
Message-ID
<1237218172-16565-1-git-send-email-finnag@pvv.org>

Add a new configuration variable push.default that decides what action to take if you do not give "git push" any refspecs, and no refspecs are implied by options (--all or --mirror), and no refspecs are configured for the current remote.

Some minor rewording of error messages since last time, and split the patch into two. Patch 1 introduces the variable with all functionality, and patch 2 adds a warning if the default behavior is trigged and push.default has not been configured.

Possible configuration values are:
- nothing: Do not push anything.
- tracking: Push the current branch to the branch it is tracking.  In this
  mode, push will always push to the same branch that pull would pull from.
  This functionality does not exist today.
- current: Push the current branch to a branch of the same name on the
  current remote, create it if it does not exist.  Identical to 
  "git push <remote> HEAD", but you do not have to explicitly give the remote.
- matching: The current behavior, push every branch to the current remote if
  a branch with the same name already exists there.
Finn Arne Gangstad (2):
      New config push.default to decide default behavior for push
      Display warning for default git push with no push.default config
 Documentation/RelNotes-1.6.3.txt |    7 +++
 Documentation/config.txt         |   18 +++++++++
 builtin-push.c                   |   76 +++++++++++++++++++++++++++++++++++--
 cache.h                          |    9 ++++
 config.c                         |   28 ++++++++++++++
 environment.c                    |    1 +
 6 files changed, 134 insertions(+), 5 deletions(-)
Next: Finn Arne Gangstad
Message 1 of 3 in “New config variable push.default”
  1. 0/2 New config variable push.defaultFinn Arne Gangstad, Mar 16, 2009
  2. 1/2 New config push.default to decide default behavior for pushFinn Arne Gangstad, Mar 16, 2009
  3. 2/2 Display warning for default git push with no push.default configFinn Arne Gangstad, Mar 16, 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.