{"thread":{"id":"7588","subject":"[PATCH] Documentation: show-ref: document --exclude-existing","startedAt":"2007-04-09T20:57:36Z","lastAt":"2007-04-10T01:55:10Z","messageCount":3,"participants":["Julian Phillips","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"38961","messageId":"20070409205754.21048.73087.julian@quantumfyre.co.uk","threadId":"7588","inReplyTo":null,"subject":"[PATCH] Documentation: show-ref: document --exclude-existing","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-04-09T20:57:36Z","receivedAt":"2007-04-09T20:57:36Z","isPatch":true,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"Use the comment in the code to document the --exclude-existing\nfunction to git-show-ref.\n\nSigned-off-by: Julian Phillips <julian@quantumfyre.co.uk>\n---\n\nWhile looking at the automatic tag following code in git-fetch.sh, I discovered that the --exclude-existing option to git-show-ref was undocumented (outside of the code anyway).\n\n Documentation/git-show-ref.txt |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt\nindex 5973a82..1e07c50 100644\n--- a/Documentation/git-show-ref.txt\n+++ b/Documentation/git-show-ref.txt\n@@ -10,6 +10,7 @@ SYNOPSIS\n [verse]\n 'git-show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference]\n \t     [-s|--hash] [--abbrev] [--tags] [--heads] [--] <pattern>...\n+'git-show-ref' --exclude-existing[=pattern]\n \n DESCRIPTION\n -----------\n@@ -19,6 +20,9 @@ commit IDs. Results can be filtered using a pattern and tags can be\n dereferenced into object IDs. Additionally, it can be used to test whether a\n particular ref exists.\n \n+The --exclude-existing form is a filter that does the inverse, it shows the\n+refs from stdin that don't exist in the local repository.\n+\n Use of this utility is encouraged in favor of directly accessing files under\n in the `.git` directory.\n \n@@ -61,6 +65,18 @@ OPTIONS\n \tDo not print any results to stdout. When combined with '--verify' this\n \tcan be used to silently check if a reference exists.\n \n+--exclude-existing, --exclude-existing=pattern::\n+\n+\tMake git-show-ref act as a filter that reads refs from stdin of the\n+\tform \"^(?:<anything>\\s)?<refname>(?:\\^\\{\\})?$\" and performs the\n+\tfollowing actions on each:\n+\t(1) strip \"^{}\" at the end of line if any;\n+\t(2) ignore if match is provided and does not head-match refname;\n+\t(3) warn if refname is not a well-formed refname and skip;\n+\t(4) ignore if refname is a ref that exists in the local repository;\n+\t(5) otherwise output the line.\n+\n+\n <pattern>::\n \n \tShow references matching one or more patterns.\n-- \n1.5.1\n"},{"id":"38973","messageId":"20070409210721.21570.18686.julian@quantumfyre.co.uk","threadId":"7588","inReplyTo":"20070409205754.21048.73087.julian@quantumfyre.co.uk","subject":"[PATCH v2] Documentation: show-ref: document --exclude-existing","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-04-09T20:57:36Z","receivedAt":"2007-04-09T20:57:36Z","isPatch":true,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"Use the comment in the code to document the --exclude-existing\nfunction to git-show-ref.\n\nSigned-off-by: Julian Phillips <julian@quantumfyre.co.uk>\n---\n\nThis fixes an embarrassing copy/paste error with the previous version ...\n\n Documentation/git-show-ref.txt |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt\nindex 5973a82..2355aa5 100644\n--- a/Documentation/git-show-ref.txt\n+++ b/Documentation/git-show-ref.txt\n@@ -10,6 +10,7 @@ SYNOPSIS\n [verse]\n 'git-show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference]\n \t     [-s|--hash] [--abbrev] [--tags] [--heads] [--] <pattern>...\n+'git-show-ref' --exclude-existing[=pattern]\n \n DESCRIPTION\n -----------\n@@ -19,6 +20,9 @@ commit IDs. Results can be filtered using a pattern and tags can be\n dereferenced into object IDs. Additionally, it can be used to test whether a\n particular ref exists.\n \n+The --exclude-existing form is a filter that does the inverse, it shows the\n+refs from stdin that don't exist in the local repository.\n+\n Use of this utility is encouraged in favor of directly accessing files under\n in the `.git` directory.\n \n@@ -61,6 +65,18 @@ OPTIONS\n \tDo not print any results to stdout. When combined with '--verify' this\n \tcan be used to silently check if a reference exists.\n \n+--exclude-existing, --exclude-existing=pattern::\n+\n+\tMake git-show-ref act as a filter that reads refs from stdin of the\n+\tform \"^(?:<anything>\\s)?<refname>(?:\\^\\{\\})?$\" and performs the\n+\tfollowing actions on each:\n+\t(1) strip \"^{}\" at the end of line if any;\n+\t(2) ignore if pattern is provided and does not head-match refname;\n+\t(3) warn if refname is not a well-formed refname and skip;\n+\t(4) ignore if refname is a ref that exists in the local repository;\n+\t(5) otherwise output the line.\n+\n+\n <pattern>::\n \n \tShow references matching one or more patterns.\n-- \n1.5.1\n"},{"id":"38983","messageId":"7v3b39xabl.fsf@assigned-by-dhcp.cox.net","threadId":"7588","inReplyTo":"20070409210721.21570.18686.julian@quantumfyre.co.uk","subject":"Re: [PATCH v2] Documentation: show-ref: document --exclude-existing","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-10T01:55:10Z","receivedAt":"2007-04-10T01:55:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}