Thread (15 messages) flat view 15 messages, 3 authors, 2016-06-15
STALE3753d

[PATCH 0/3] remote HEAD improvements

From: Jay Soffian <hidden>
Date: 2016-06-15 22:46:08

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(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help