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

[PATCH 2/3] Documentation/push: clarify matching refspec behavior

From
Jeff King <peff@peff.net>
Date
Feb 19, 2008, 16:25 UTC
Message-ID
<20080219162522.GB30451@sigill.intra.peff.net>
In-Reply-To
<d9b18b1827a183e5b3b785a092605eab1ff4b6e7.1203438181.git.peff@peff.net>

The previous text was correct, but it was easy to miss the fact that we are talking about "matching" refs. That is, the text can be parsed as "we push the union of the sets of remote and local heads" and not "we push the intersection of the sets of remote and local heads". (The former actually doesn't make sense if you think about it, since we don't even _have_ some of those heads). A careful reading would reveal the correct meaning, but it makes sense to be as explicit as possible in documentation.

We also explicitly use and introduce the term "matching"; this is a term discussed on the list, and it seems useful to for users to be able to refer to this behavior by name.

Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/git-push.txt |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 5f24944..650ee91 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -47,9 +47,9 @@ even if it does not result in a fast forward update.
 +
 Note: If no explicit refspec is found, (that is neither
 on the command line nor in any Push line of the
-corresponding remotes file---see below), then all the
-heads that exist both on the local side and on the remote
-side are updated.
+corresponding remotes file---see below), then "matching" heads are
+pushed: for every head that exists on the local side, the remote side is
+updated if a head of the same name already exists on the remote side.
 +
 `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
 +
-- 
1.5.4.1.143.ge7e51-dirty
Next: Jeff King
Message 1 of 2 in “Documentation/push: clarify matching refspec behavior”
  1. 2/3 Documentation/push: clarify matching refspec behaviorJeff King, Feb 19, 2008
  2. 3/3 push: document the status outputJeff King, Feb 19, 2008

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.