threads / patch / 34987

patch, 2 partsDoc: remote set-head long options

Subject: [PATCH 1/2] Doc: remote set-head long options

## tl;dr

4 messages between Sep 21, 2013 and Sep 27, 2013. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Philip Oakley· Sep 21, 2013, 15:51 UTC · lore

[PATCH 0/2] Update 'git remote set-head' doc and uasage

In Junio's recent patch series ([PATCH v3 0/7] Removing the guesswork of HEAD in "clone" $gmane/234950), his first patch updated t5505: 'fix "set-head --auto with ambiguous HEAD" test'.

A quick look at the git remote man page showed that --auto was not documented, nor listed in usage stings.

This two patch series fixes the documentation and the usage strings.
Philip Oakley (2):
  Doc: remote set-head long options
  remote set-head: show long options in usage
 Documentation/git-remote.txt | 6 +++---
 builtin/remote.c             | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
-- 
1.8.1.msysgit.1
Philip Oakley· Sep 21, 2013, 15:51 UTC · re: Philip Oakley · lore
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/git-remote.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to Documentation/git-remote.txt +3 −3
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 9c3e3bf..2507c8b 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -13,7 +13,7 @@ SYNOPSIS
 'git remote add' [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url>
 'git remote rename' <old> <new>
 'git remote remove' <name>
-'git remote set-head' <name> (-a | -d | <branch>)
+'git remote set-head' <name> (-a | --auto | -d | --delete | <branch>)
 'git remote set-branches' [--add] <name> <branch>...
 'git remote set-url' [--push] <name> <newurl> [<oldurl>]
 'git remote set-url --add' [--push] <name> <newurl>
@@ -101,9 +101,9 @@ branch. For example, if the default branch for `origin` is set to
 `master`, then `origin` may be specified wherever you would normally
 specify `origin/master`.
 +
-With `-d`, the symbolic ref `refs/remotes/<name>/HEAD` is deleted.
+With `-d` or `--delete`, the symbolic ref `refs/remotes/<name>/HEAD` is deleted.
 +
-With `-a`, the remote is queried to determine its `HEAD`, then the
+With `-a` or `--auto`, the remote is queried to determine its `HEAD`, then the
 symbolic-ref `refs/remotes/<name>/HEAD` is set to the same branch. e.g., if the remote
 `HEAD` is pointed at `next`, "`git remote set-head origin -a`" will set
 the symbolic-ref `refs/remotes/origin/HEAD` to `refs/remotes/origin/next`. This will
-- 
1.8.1.msysgit.1
Philip Oakley· Sep 21, 2013, 15:51 UTC · re: Philip Oakley · lore

[PATCH 2/2] remote set-head: show long options in usage

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 builtin/remote.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to builtin/remote.c +2 −2
diff --git a/builtin/remote.c b/builtin/remote.c
index eaac3e2..4e14891 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -12,7 +12,7 @@ static const char * const builtin_remote_usage[] = {
 	N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>"),
 	N_("git remote rename <old> <new>"),
 	N_("git remote remove <name>"),
-	N_("git remote set-head <name> (-a | -d | <branch>)"),
+	N_("git remote set-head <name> (-a | --auto | -d | --delete |<branch>)"),
 	N_("git remote [-v | --verbose] show [-n] <name>"),
 	N_("git remote prune [-n | --dry-run] <name>"),
 	N_("git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"),
@@ -39,7 +39,7 @@ static const char * const builtin_remote_rm_usage[] = {
 };
 
 static const char * const builtin_remote_sethead_usage[] = {
-	N_("git remote set-head <name> (-a | -d | <branch>)"),
+	N_("git remote set-head <name> (-a | --auto | -d | --delete | <branch>)"),
 	NULL
 };
 
-- 
1.8.1.msysgit.1
Jonathan Nieder· Sep 27, 2013, 23:52 UTC · re: Philip Oakley · lore

Re: [PATCH 0/2] Update 'git remote set-head' doc and uasage

Philip Oakley wrote:
Show 6 quoted lines
> In Junio's recent patch series ([PATCH v3 0/7] Removing the guesswork
> of HEAD in "clone" $gmane/234950), his first patch updated t5505: 'fix
> "set-head --auto with ambiguous HEAD" test'.
>
> A quick look at the git remote man page showed that --auto was not
> documented, nor listed in usage stings.
Thanks.

← back to recent threads