{"thread":{"id":"31460","subject":"[PATCH] ls-remote: document the '--get-url' option","startedAt":"2012-09-06T17:27:21Z","lastAt":"2012-09-07T17:57:34Z","messageCount":6,"participants":["Stefan Naewe","Junio C Hamano","Andreas Schwab"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"198462","messageId":"1346952441-20666-1-git-send-email-stefan.naewe@gmail.com","threadId":"31460","inReplyTo":null,"subject":"[PATCH] ls-remote: document the '--get-url' option","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2012-09-06T17:27:21Z","receivedAt":"2012-09-06T17:27:21Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"While looking for a way to expand the URL of a remote\nthat uses a 'url.<name>.insteadOf' config option I stumbled\nover the undocumented '--get-url' option of 'git ls-remote'.\nThis adds some minimum documentation for that option.\n\nSigned-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n---\n Documentation/git-ls-remote.txt | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\nindex 7a9b86a..5819ead 100644\n--- a/Documentation/git-ls-remote.txt\n+++ b/Documentation/git-ls-remote.txt\n@@ -42,6 +42,10 @@ OPTIONS\n \tit successfully talked with the remote repository, whether it\n \tfound any matching refs.\n \n+--get-url::\n+\tExpand the URL of the given remote repository taking into account any \n+\t\"url.<base>.insteadOf\" config setting (See linkgit:git-config[1]).\n+\n <repository>::\n \tLocation of the repository.  The shorthand defined in\n \t$GIT_DIR/branches/ can be used. Use \".\" (dot) to list references in\n-- \n1.7.12\n"},{"id":"198477","messageId":"7v7gs63mio.fsf@alter.siamese.dyndns.org","threadId":"31460","inReplyTo":"1346952441-20666-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH] ls-remote: document the '--get-url' option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-06T20:49:03Z","receivedAt":"2012-09-06T20:49:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> While looking for a way to expand the URL of a remote\n> that uses a 'url.<name>.insteadOf' config option I stumbled\n> over the undocumented '--get-url' option of 'git ls-remote'.\n> This adds some minimum documentation for that option.\n>\n> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> ---\n>  Documentation/git-ls-remote.txt | 4 ++++\n>  1 file changed, 4 insertions(+)\n>\n> diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\n> index 7a9b86a..5819ead 100644\n> --- a/Documentation/git-ls-remote.txt\n> +++ b/Documentation/git-ls-remote.txt\n> @@ -42,6 +42,10 @@ OPTIONS\n>  \tit successfully talked with the remote repository, whether it\n>  \tfound any matching refs.\n>  \n> +--get-url::\n> +\tExpand the URL of the given remote repository taking into account any \n> +\t\"url.<base>.insteadOf\" config setting (See linkgit:git-config[1]).\n> +\n>  <repository>::\n>  \tLocation of the repository.  The shorthand defined in\n>  \t$GIT_DIR/branches/ can be used. Use \".\" (dot) to list references in\n\nOK.  Do we want to also add this to the \"git ls-remote -h\" output,\nor is it used so infrequently that it is not worth cluttering the\nhelp text there?\n"},{"id":"198503","messageId":"1347000079-7945-1-git-send-email-stefan.naewe@gmail.com","threadId":"31460","inReplyTo":"7v7gs63mio.fsf@alter.siamese.dyndns.org","subject":"[PATCH] ls-remote: document the '--get-url' option","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2012-09-07T06:41:19Z","receivedAt":"2012-09-07T06:41:19Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"While looking for a way to expand the URL of a remote\nthat uses a 'url.<name>.insteadOf' config option I stumbled\nover the undocumented '--get-url' option of 'git ls-remote'.\nThis adds some minimum documentation for that option.\n\nAnd while at it, also add that option to the '-h' output.\n\nSigned-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n---\n Documentation/git-ls-remote.txt | 4 ++++\n builtin/ls-remote.c             | 2 +-\n 2 files changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\nindex 7a9b86a..a2ebf1d 100644\n--- a/Documentation/git-ls-remote.txt\n+++ b/Documentation/git-ls-remote.txt\n@@ -42,6 +42,10 @@ OPTIONS\n \tit successfully talked with the remote repository, whether it\n \tfound any matching refs.\n \n+--get-url::\n+\tExpand the URL of the given remote repository taking into account any\n+\t\"url.<base>.insteadOf\" config setting (See linkgit:git-config[1]).\n+\n <repository>::\n \tLocation of the repository.  The shorthand defined in\n \t$GIT_DIR/branches/ can be used. Use \".\" (dot) to list references in\ndiff --git a/builtin/ls-remote.c b/builtin/ls-remote.c\nindex 41c88a9..25e83cf 100644\n--- a/builtin/ls-remote.c\n+++ b/builtin/ls-remote.c\n@@ -5,7 +5,7 @@\n \n static const char ls_remote_usage[] =\n \"git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]\\n\"\n-\"                     [-q|--quiet] [--exit-code] [<repository> [<refs>...]]\";\n+\"                     [-q|--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]\";\n \n /*\n  * Is there one among the list of patterns that match the tail part\n-- \n1.7.12\n"},{"id":"198507","messageId":"m2pq5yxmn2.fsf@igel.home","threadId":"31460","inReplyTo":"1347000079-7945-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH] ls-remote: document the '--get-url' option","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2012-09-07T08:28:17Z","receivedAt":"2012-09-07T08:28:17Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> +--get-url::\n> +\tExpand the URL of the given remote repository taking into account any\n> +\t\"url.<base>.insteadOf\" config setting (See linkgit:git-config[1]).\n\nThis should probably also mention that it suppresses the normal output.\n\n(I wonder why this isn't a subcommand of git remote.)\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"198509","messageId":"CAJzBP5SODtFQKqS+uS5ev3-JLwN8Hhn9nfE-eY3P2QbBkkgV8A@mail.gmail.com","threadId":"31460","inReplyTo":"m2pq5yxmn2.fsf@igel.home","subject":"Re: [PATCH] ls-remote: document the '--get-url' option","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2012-09-07T09:12:38Z","receivedAt":"2012-09-07T09:12:38Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"On Fri, Sep 7, 2012 at 10:28 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> Stefan Naewe <stefan.naewe@gmail.com> writes:\n>\n>> +--get-url::\n>> +     Expand the URL of the given remote repository taking into account any\n>> +     \"url.<base>.insteadOf\" config setting (See linkgit:git-config[1]).\n>\n> This should probably also mention that it suppresses the normal output.\n\nLike this: http://cloud.github.com/downloads/snaewe/git/git-ls-remote.html\n(I also added a simple example. I'll create a new patch if it's OK)\n\n> (I wonder why this isn't a subcommand of git remote.)\n\nGood question...\n\nStefan\n-- \n----------------------------------------------------------------\npython -c \"print '73746566616e2e6e6165776540676d61696c2e636f6d'.decode('hex')\"\n"},{"id":"198538","messageId":"7va9x1yaup.fsf@alter.siamese.dyndns.org","threadId":"31460","inReplyTo":"1347000079-7945-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH] ls-remote: document the '--get-url' option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-07T17:57:34Z","receivedAt":"2012-09-07T17:57:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> While looking for a way to expand the URL of a remote\n> that uses a 'url.<name>.insteadOf' config option I stumbled\n> over the undocumented '--get-url' option of 'git ls-remote'.\n> This adds some minimum documentation for that option.\n>\n> And while at it, also add that option to the '-h' output.\n>\n> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> ---\n>  Documentation/git-ls-remote.txt | 4 ++++\n>  builtin/ls-remote.c             | 2 +-\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt\n> index 7a9b86a..a2ebf1d 100644\n> --- a/Documentation/git-ls-remote.txt\n> +++ b/Documentation/git-ls-remote.txt\n> @@ -42,6 +42,10 @@ OPTIONS\n>  \tit successfully talked with the remote repository, whether it\n>  \tfound any matching refs.\n>  \n> +--get-url::\n> +\tExpand the URL of the given remote repository taking into account any\n> +\t\"url.<base>.insteadOf\" config setting (See linkgit:git-config[1]).\n> +\n\nI'll queue this, after adding \"... and exit without talking to the remote.\"\n\nThanks.\n"}]}