Skip to content

remote HEAD improvements

Jay Soffian git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3builtin-remote: move duplicated cleanup code its own functionbuiltin-remote.c+10 -84 replies
2/3builtin-remote: teach show to display remote HEADbuiltin-remote.c+39 -08 replies
3/3builtin-remote: add sethead verbDocumentation/git-remote.txt builtin-remote.c+69 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] remote HEAD improvements

There is currently no porcelain for dealing with remote HEADs (i.e. $GIT_DIR/remotes/<remote>/HEAD). This series:

1) Teaches git remote a new "sethead" verb:

To set a remote HEAD explicitly:

  $ git remote sethead <name> <branch>

To set a remote HEAD to match the upstream repo:

  $ git remote sethead <name> -a

To delete a remote HEAD:

  $ git remote sethead <name> -d

2) Teaches git remote show to display the remote HEAD:

  $ git remote show origin

* remote origin
URL: git://git.kernel.org/pub/scm/git/git.git
HEAD: master

3) Documents the new sethead verb. I also correct the git remote man page w/respect to the "-m <master>" option. The man page implied that the remote HEAD was set automatically when adding a remote (a la git clone), but this is not true. And, since I couldn't find anywhere else that the point of having a remote HEAD is documented, I documented it here.

Jay Soffian (3):
builtin-remote: move duplicated cleanup code its own function
builtin-remote: teach show to display remote HEAD
builtin-remote: add sethead verb

 Documentation/git-remote.txt |   20 +++++++-
 builtin-remote.c             |  108 ++++++++++++++++++++++++++++++++++++++---
 2 files changed, 118 insertions(+), 10 deletions(-)