Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-model
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
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
Renaud Boyer
swh-model
Commits
d5d5beec
Commit
d5d5beec
authored
8 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
Improve docstrings
parent
0fc6af87
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
swh/model/git.py
+6
-5
6 additions, 5 deletions
swh/model/git.py
with
6 additions
and
5 deletions
swh/model/git.py
+
6
−
5
View file @
d5d5beec
...
...
@@ -282,15 +282,16 @@ def walk_and_compute_sha1_from_directory(rootdir,
def
recompute_sha1_in_memory
(
root
,
deeper_rootdir
,
objects
):
"""
Recompute git sha1 from directory deeper_rootdir to root.
This function relies exclusively on objects for hashes.
It expects the deeper_rootdir and every key below that path to be updated.
This function relies exclusively on `objects` for hashes. It
expects the deeper_rootdir and every key below that path to be
already updated.
Args:
- root: Upper root directory (so same as
objects[ROOT_TREE_KEY][0][
'
path
'
])
- rootdir: Root directory from which beginning the git hash computation
- deeper_rootdir: Root directory from which the git hash
computation begins
- objects: objects dictionary as per returned by
`walk_and_compute_sha1_from_directory`
...
...
@@ -307,7 +308,7 @@ def recompute_sha1_in_memory(root, deeper_rootdir, objects):
Note:
One special key is ROOT_TREE_KEY to indicate the upper root of the
directory (this is the revision
'
s directory).
directory (this is the revision
'
s
target
directory).
Raises:
Nothing
...
...
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