[PATCH 0/3] remote HEAD improvements
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Feb 11, 2009, 06:01 UTC
- Message-ID
- <1234332083-45147-1-git-send-email-jaysoffian@gmail.com>
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(-)