aboutsummaryrefslogtreecommitdiff
path: root/vcs-svn/repo_tree.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-02-26 05:21:29 -0600
committerJonathan Nieder <jrnieder@gmail.com>2011-02-26 05:21:29 -0600
commita62bbf8f01c6b19cd1a5cf92a98f612176aa2b67 (patch)
treebd50276e3e4d2bacd5890a962f8db06414c251f0 /vcs-svn/repo_tree.c
parentb1c9b798a6dd391aeaea31663a65164815701244 (diff)
parent9e8c532108b9078812f23c53a2df3509e7ce71bf (diff)
downloadgit-a62bbf8f01c6b19cd1a5cf92a98f612176aa2b67.tar.gz
git-a62bbf8f01c6b19cd1a5cf92a98f612176aa2b67.tar.xz
Merge commit 'jn/svn-fe' of git://github.com/gitster/git into svn-fe
* git://github.com/gitster/git: vcs-svn: Allow change nodes for root of tree (/) vcs-svn: Implement Prop-delta handling vcs-svn: Sharpen parsing of property lines vcs-svn: Split off function for handling of individual properties vcs-svn: Make source easier to read on small screens vcs-svn: More dump format sanity checks vcs-svn: Reject path nodes without Node-action vcs-svn: Delay read of per-path properties vcs-svn: Combine repo_replace and repo_modify functions vcs-svn: Replace = Delete + Add vcs-svn: handle_node: Handle deletion case early vcs-svn: Use mark to indicate nodes with included text vcs-svn: Unclutter handle_node by introducing have_props var vcs-svn: Eliminate node_ctx.mark global vcs-svn: Eliminate node_ctx.srcRev global vcs-svn: Check for errors from open() vcs-svn: Allow simple v3 dumps (no deltas yet) Conflicts: t/t9010-svn-fe.sh vcs-svn/svndump.c
Diffstat (limited to 'vcs-svn/repo_tree.c')
-rw-r--r--vcs-svn/repo_tree.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/vcs-svn/repo_tree.c b/vcs-svn/repo_tree.c
index e3d1fa354..491f0135a 100644
--- a/vcs-svn/repo_tree.c
+++ b/vcs-svn/repo_tree.c
@@ -175,25 +175,18 @@ void repo_add(uint32_t *path, uint32_t mode, uint32_t blob_mark)
repo_write_dirent(path, mode, blob_mark, 0);
}
-uint32_t repo_replace(uint32_t *path, uint32_t blob_mark)
+uint32_t repo_modify_path(uint32_t *path, uint32_t mode, uint32_t blob_mark)
{
- uint32_t mode = 0;
struct repo_dirent *src_dent;
src_dent = repo_read_dirent(active_commit, path);
- if (src_dent != NULL) {
- mode = src_dent->mode;
- repo_write_dirent(path, mode, blob_mark, 0);
- }
- return mode;
-}
-
-void repo_modify(uint32_t *path, uint32_t mode, uint32_t blob_mark)
-{
- struct repo_dirent *src_dent;
- src_dent = repo_read_dirent(active_commit, path);
- if (src_dent != NULL && blob_mark == 0)
+ if (!src_dent)
+ return 0;
+ if (!blob_mark)
blob_mark = src_dent->content_offset;
+ if (!mode)
+ mode = src_dent->mode;
repo_write_dirent(path, mode, blob_mark, 0);
+ return mode;
}
void repo_delete(uint32_t *path)