Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions doc/cabal-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,23 @@ cabal update
project contains multiple remote package repositories it will update
the index of all of them (e.g. when using overlays).

Each repository argument has the form ``REPO`` or
``REPO,INDEX-STATE``. ``REPO`` is a repository identifier, and
``INDEX-STATE`` uses the same formats as :option:`--index-state`, such as
an ``@``-prefixed Unix timestamp, an ISO 8601 UTC timestamp, or ``HEAD``.
When an ``INDEX-STATE`` is supplied, it selects the revision of the global
package index for that repository; it does not set a project-local
``index-state``.

Some examples:

::

$ cabal update # update all remote repos
$ cabal update head.hackage # update only head.hackage
$ cabal update # update all remote repos
$ cabal update head.hackage # update only head.hackage
$ cabal update hackage.haskell.org,@1474732068 # use a Unix timestamp
$ cabal update hackage.haskell.org,2016-09-24T17:47:48Z
$ cabal update hackage.haskell.org,HEAD

cabal list
^^^^^^^^^^
Expand Down
Loading