Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eduardo Trujillo
hgit
Commits
9d7e98d9
Unverified
Commit
9d7e98d9
authored
6 years ago
by
Vincent Hanquez
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #10 from Luabee/patch-1
Fixed withCurrentRepo examples
parents
0e47ae7e
8903b08d
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
Data/Git/Monad.hs
+3
-3
3 additions, 3 deletions
Data/Git/Monad.hs
with
3 additions
and
3 deletions
Data/Git/Monad.hs
+
3
−
3
View file @
9d7e98d9
...
@@ -581,8 +581,8 @@ deleteFile path = do
...
@@ -581,8 +581,8 @@ deleteFile path = do
--
--
-- Example:
-- Example:
--
--
-- > withCurrentRepo $
-- > withCurrentRepo $
do
-- > (r, ()) <- withNewCommit person Nothing $ do
-- > (r, ()) <- withNewCommit person
(
Nothing
:: Maybe (Ref SHA1))
$ do
-- > setMessage "inital commit"
-- > setMessage "inital commit"
-- > setFile ["README.md"] "# My awesome project\n\nthis is a new project\n"
-- > setFile ["README.md"] "# My awesome project\n\nthis is a new project\n"
-- > branchWrite "master" r
-- > branchWrite "master" r
...
@@ -592,7 +592,7 @@ deleteFile path = do
...
@@ -592,7 +592,7 @@ deleteFile path = do
-- parent is already set to the Reference associated to the revision.
-- parent is already set to the Reference associated to the revision.
-- You can, change the parents if you wish to erase, or replace, this value.
-- You can, change the parents if you wish to erase, or replace, this value.
--
--
-- > withCurrentRepo $
-- > withCurrentRepo $
do
-- > readmeContent <- withCommit (Just "master") $ getFile ["README.md"]
-- > readmeContent <- withCommit (Just "master") $ getFile ["README.md"]
-- > (r, ()) <- withNewCommit person (Just "master") $ do
-- > (r, ()) <- withNewCommit person (Just "master") $ do
-- > setMessage "update the README"
-- > setMessage "update the README"
...
...
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