git/Documentation
Junio C Hamano b77e3bdd97 symbolic-ref: teach "--[no-]recurse" option
Suppose you are managing many maintenance tracks in your project,
and some of the more recent ones are maint-2.36 and maint-2.37.
Further imagine that your project recently tagged the official 2.38
release, which means you would need to start maint-2.38 track soon,
by doing:

  $ git checkout -b maint-2.38 v2.38.0^0
  $ git branch --list 'maint-2.3[6-9]'
  * maint-2.38
    maint-2.36
    maint-2.37

So far, so good.  But it also is reasonable to want not to have to
worry about which maintenance track is the latest, by pointing a
more generic-sounding 'maint' branch at it, by doing:

  $ git symbolic-ref refs/heads/maint refs/heads/maint-2.38

which would allow you to say "whichever it is, check out the latest
maintenance track", by doing:

  $ git checkout maint
  $ git branch --show-current
  maint-2.38

It is arguably better to say that we are on 'maint-2.38' rather than
on 'maint', and "git merge/pull" would record "into maint-2.38" and
not "into maint", so I think what we have is a good behaviour.

One thing that is slightly irritating, however, is that I do not
think there is a good way (other than "cat .git/HEAD") to learn that
you checked out 'maint' to get into that state.  Just like the output
of "git branch --show-current" shows above, "git symbolic-ref HEAD"
would report 'refs/heads/maint-2.38', bypassing the intermediate
symbolic ref at 'refs/heads/maint' that is pointed at by HEAD.

The internal resolve_ref() API already has the necessary support for
stopping after resolving a single level of a symbolic-ref, and we
can expose it by adding a "--[no-]recurse" option to the command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-09 12:31:24 -07:00
..
RelNotes Git 2.36.2 2022-06-23 12:40:44 +02:00
config Sync with 2.35.4 2022-06-23 12:36:12 +02:00
howto
technical Merge branch 'rc/fetch-refetch' 2022-04-04 10:56:23 -07:00
.gitattributes
.gitignore
CodingGuidelines Merge branch 'jc/coding-guidelines-decl-in-for-loop' 2022-04-04 10:56:24 -07:00
Makefile Documentation/Makefile: fix "make info" regression in dad9cd7d51 2022-04-06 09:43:48 -07:00
MyFirstContribution.txt
MyFirstObjectWalk.txt MyFirstObjectWalk: update recommended usage 2022-03-09 10:25:27 -08:00
SubmittingPatches SubmittingPatches: use more stable git.ozlabs.org URL 2022-05-11 08:19:08 -07:00
asciidoc.conf
asciidoctor-extensions.rb
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
config.txt Git 2.35.2 2022-04-11 16:44:45 -07:00
date-formats.txt
diff-format.txt
diff-generate-patch.txt
diff-options.txt
doc-diff
docbook-xsl.css
docbook.xsl
everyday.txto
fetch-options.txt Merge branch 'rc/fetch-refetch' 2022-04-04 10:56:23 -07:00
fix-texi.perl
git-add.txt
git-am.txt
git-annotate.txt
git-apply.txt
git-archimport.txt
git-archive.txt
git-bisect-lk2009.txt
git-bisect.txt
git-blame.txt
git-branch.txt
git-bugreport.txt
git-bundle.txt bundle: move capabilities to end of 'verify' 2022-03-23 13:13:59 -07:00
git-cat-file.txt Documentation: add --batch-command to cat-file synopsis 2022-04-07 13:31:54 -07:00
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt
git-cherry-pick.txt
git-cherry.txt
git-citool.txt
git-clean.txt
git-clone.txt
git-column.txt
git-commit-graph.txt
git-commit-tree.txt
git-commit.txt
git-config.txt
git-count-objects.txt
git-credential-cache--daemon.txt doc: replace "--" with {litdd} in credential-cache/fsmonitor 2022-04-06 16:06:06 -07:00
git-credential-cache.txt
git-credential-store.txt
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt
git-daemon.txt
git-describe.txt
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt
git-difftool.txt
git-fast-export.txt
git-fast-import.txt
git-fetch-pack.txt builtin/fetch-pack: add --refetch option 2022-03-28 10:25:52 -07:00
git-fetch.txt fetch: fetch unpopulated, changed submodules 2022-03-16 16:08:59 -07:00
git-filter-branch.txt
git-fmt-merge-msg.txt
git-for-each-ref.txt
git-for-each-repo.txt
git-format-patch.txt
git-fsck-objects.txt
git-fsck.txt
git-fsmonitor--daemon.txt doc: replace "--" with {litdd} in credential-cache/fsmonitor 2022-04-06 16:06:06 -07:00
git-gc.txt
git-get-tar-commit-id.txt
git-grep.txt
git-gui.txt
git-hash-object.txt
git-help.txt
git-hook.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt
git-index-pack.txt index-pack: document and test the --promisor option 2022-03-09 10:25:26 -08:00
git-init-db.txt
git-init.txt
git-instaweb.txt
git-interpret-trailers.txt
git-log.txt
git-ls-files.txt
git-ls-remote.txt
git-ls-tree.txt ls-tree doc: document interaction with submodules 2022-04-08 11:21:11 -07:00
git-mailinfo.txt
git-mailsplit.txt
git-maintenance.txt maintenance: fix synopsis in documentation 2022-03-15 10:52:43 -07:00
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt
git-mergetool--lib.txt
git-mergetool.txt
git-mktag.txt
git-mktree.txt
git-multi-pack-index.txt
git-mv.txt
git-name-rev.txt
git-notes.txt
git-p4.txt
git-pack-objects.txt
git-pack-redundant.txt
git-pack-refs.txt
git-patch-id.txt
git-prune-packed.txt
git-prune.txt
git-pull.txt
git-push.txt
git-quiltimport.txt
git-range-diff.txt
git-read-tree.txt Merge branch 'nj/read-tree-doc-reffix' 2022-03-13 22:56:18 +00:00
git-rebase.txt rebase: use correct base for --keep-base when a branch is given 2022-04-21 09:35:45 -07:00
git-receive-pack.txt
git-reflog.txt
git-remote-ext.txt
git-remote-fd.txt
git-remote-helpers.txto
git-remote.txt
git-repack.txt
git-replace.txt
git-request-pull.txt
git-rerere.txt
git-reset.txt reset: remove 'reset.refresh' config option 2022-03-23 14:39:45 -07:00
git-restore.txt
git-rev-list.txt
git-rev-parse.txt
git-revert.txt
git-rm.txt
git-send-email.txt
git-send-pack.txt
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt
git-show-branch.txt
git-show-index.txt
git-show-ref.txt
git-show.txt
git-sparse-checkout.txt Merge branch 'en/present-despite-skipped' 2022-03-09 13:38:23 -08:00
git-stage.txt
git-stash.txt
git-status.txt
git-stripspace.txt
git-submodule.txt
git-svn.txt
git-switch.txt
git-symbolic-ref.txt symbolic-ref: teach "--[no-]recurse" option 2022-10-09 12:31:24 -07:00
git-tag.txt
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt doc: replace "--" with {litdd} in credential-cache/fsmonitor 2022-04-06 16:06:06 -07:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-version.txt
git-web--browse.txt
git-whatchanged.txt
git-worktree.txt Merge branch 'pw/worktree-list-with-z' 2022-04-04 10:56:25 -07:00
git-write-tree.txt
git.txt
gitattributes.txt userdiff: add builtin diff driver for kotlin language. 2022-03-12 18:15:47 -08:00
gitcli.txt
gitcore-tutorial.txt
gitcredentials.txt
gitcvs-migration.txt
gitdiffcore.txt
giteveryday.txt
gitfaq.txt
gitglossary.txt
githooks.txt
gitignore.txt
gitk.txt
gitmailmap.txt
gitmodules.txt
gitnamespaces.txt
gitremote-helpers.txt
gitrepository-layout.txt
gitrevisions.txt
gitsubmodules.txt
gittutorial-2.txt
gittutorial.txt
gitweb.conf.txt
gitweb.txt
gitworkflows.txt
glossary-content.txt
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
line-range-options.txt
lint-gitlink.perl
lint-man-end-blurb.perl
lint-man-section-order.perl
manpage-base-url.xsl.in
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage.xsl
merge-options.txt
merge-strategies.txt
object-format-disclaimer.txt
pretty-formats.txt
pretty-options.txt
pull-fetch-param.txt
ref-reachability-filters.txt
rev-list-description.txt
rev-list-options.txt
revisions.txt
sequencer.txt
signoff-option.txt
texi.xsl
trace2-target-values.txt
transfer-data-leaks.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt