{"thread":{"id":"9910","subject":"[PATCH] git-push: documentation and tests for pushing only branches","startedAt":"2007-09-18T08:15:34Z","lastAt":"2007-09-18T08:15:34Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"53412","messageId":"20070918081534.GA9824@coredump.intra.peff.net","threadId":"9910","inReplyTo":null,"subject":"[PATCH] git-push: documentation and tests for pushing only branches","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-09-18T08:15:34Z","receivedAt":"2007-09-18T08:15:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Commit 098e711e caused git-push to match only branches when\nconsidering which refs to push. This patch updates the\ndocumentation accordingly and adds a test for this behavior.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n\nWe had discussed this behavior in April, and I worked up an\nimplementation and test then. We ended up not using it, but your later\ncommit introduced the same behavior. So here are the supplementary\nchanges from my original, which still apply (I have verified that the\ntest goes from failure to success with 098e711e).\n\n Documentation/git-push.txt      |    4 ++--\n Documentation/git-send-pack.txt |    4 ++--\n t/t5400-send-pack.sh            |   10 ++++++++++\n 3 files changed, 14 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 7b8e075..6bc559d 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -48,7 +48,7 @@ even if it does not result in a fast forward update.\n Note: If no explicit refspec is found, (that is neither\n on the command line nor in any Push line of the\n corresponding remotes file---see below), then all the\n-refs that exist both on the local side and on the remote\n+heads that exist both on the local side and on the remote\n side are updated.\n +\n `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.\n@@ -61,7 +61,7 @@ the remote repository.\n \n \\--all::\n \tInstead of naming each ref to push, specifies that all\n-\trefs be pushed.\n+\trefs under `$GIT_DIR/refs/heads/` be pushed.\n \n \\--tags::\n \tAll refs under `$GIT_DIR/refs/tags` are pushed, in\ndiff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt\nindex 205bfd2..3271e88 100644\n--- a/Documentation/git-send-pack.txt\n+++ b/Documentation/git-send-pack.txt\n@@ -32,7 +32,7 @@ OPTIONS\n \n \\--all::\n \tInstead of explicitly specifying which refs to update,\n-\tupdate all refs that locally exist.\n+\tupdate all heads that locally exist.\n \n \\--force::\n \tUsually, the command refuses to update a remote ref that\n@@ -70,7 +70,7 @@ With '--all' flag, all refs that exist locally are transferred to\n the remote side.  You cannot specify any '<ref>' if you use\n this flag.\n \n-Without '--all' and without any '<ref>', the refs that exist\n+Without '--all' and without any '<ref>', the heads that exist\n both on the local side and on the remote side are updated.\n \n When one or more '<ref>' are specified explicitly, it can be either a\ndiff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh\nindex 6c8767e..57c6397 100755\n--- a/t/t5400-send-pack.sh\n+++ b/t/t5400-send-pack.sh\n@@ -113,4 +113,14 @@ test_expect_success \\\n \t! git diff .git/refs/heads/master victim/.git/refs/heads/master\n '\n \n+test_expect_success \\\n+\t'pushing does not include non-head refs' '\n+\tmkdir parent && cd parent &&\n+\tgit-init && touch file && git-add file && git-commit -m add &&\n+\tcd .. &&\n+\tgit-clone parent child && cd child && git-push --all &&\n+\tcd ../parent &&\n+\tgit-branch -a >branches && ! grep -q origin/master branches\n+'\n+\n test_done\n-- \n1.5.3.1.986.g4c9eb\n"}]}