Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
Cabal
Commits
dcfdc9cf
Commit
dcfdc9cf
authored
1 year ago
by
Gershom Bazerman
Committed by
Hécate Moonlight
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
cleanup and document a global repo flag
parent
47eb77ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cabal-install/src/Distribution/Client/CmdUpdate.hs
+6
-4
6 additions, 4 deletions
cabal-install/src/Distribution/Client/CmdUpdate.hs
with
6 additions
and
4 deletions
cabal-install/src/Distribution/Client/CmdUpdate.hs
+
6
−
4
View file @
dcfdc9cf
...
...
@@ -199,10 +199,12 @@ updateRepo verbosity _updateFlags repoCtxt (repo, indexState) = do
-- NB: always update the timestamp, even if we didn't actually
-- download anything
writeIndexTimestamp
index
indexState
ce
<-
if
repoContextIgnoreExpiry
repoCtxt
then
Just
`
fmap
`
getCurrentTime
else
return
Nothing
updated
<-
Sec
.
uncheckClientErrors
$
Sec
.
checkForUpdates
repoSecure
ce
-- typically we get the current time to check expiry against
-- but if the flag is set, we don't.
now
<-
case
repoContextIgnoreExpiry
repoCtxt
of
False
->
Just
<$>
getCurrentTime
True
->
pure
Nothing
updated
<-
Sec
.
uncheckClientErrors
$
Sec
.
checkForUpdates
repoSecure
now
-- this resolves indexState (which could be HEAD) into a timestamp
new_ts
<-
currentIndexTimestamp
(
lessVerbose
verbosity
)
repoCtxt
repo
let
rname
=
remoteRepoName
(
repoRemote
repo
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment