aboutsummaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-09-29 11:04:20 -0700
committerShawn O. Pearce <spearce@spearce.org>2008-09-29 11:04:20 -0700
commit9800c0df412869c7949935b61581b9361fc49bd1 (patch)
tree837cb43f80452126e46ff5de641f14b7b349484f /merge-recursive.c
parent9ba929ed652f5ed7707f1c684999af4ad02c4925 (diff)
parent5a139ba483efea47e103fef47afe87157e3bba77 (diff)
downloadgit-9800c0df412869c7949935b61581b9361fc49bd1.tar.gz
git-9800c0df412869c7949935b61581b9361fc49bd1.tar.xz
Merge branch 'bc/master-diff-hunk-header-fix'
* bc/master-diff-hunk-header-fix: Clarify commit error message for unmerged files Use strchrnul() instead of strchr() plus manual workaround Use remove_path from dir.c instead of own implementation Add remove_path: a function to remove as much as possible of a path git-submodule: Fix "Unable to checkout" for the initial 'update' Clarify how the user can satisfy stash's 'dirty state' check. t4018-diff-funcname: test syntax of builtin xfuncname patterns t4018-diff-funcname: test syntax of builtin xfuncname patterns make "git remote" report multiple URLs diff hunk pattern: fix misconverted "\{" tex macro introducers diff: fix "multiple regexp" semantics to find hunk header comment diff: use extended regexp to find hunk headers diff: use extended regexp to find hunk headers diff.*.xfuncname which uses "extended" regex's for hunk header selection diff.c: associate a flag with each pattern and use it for compiling regex diff.c: return pattern entry pointer rather than just the hunk header pattern Conflicts: builtin-merge-recursive.c t/t7201-co.sh xdiff-interface.h
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 08917314f..6bc3eac85 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -19,6 +19,7 @@
#include "interpolate.h"
#include "attr.h"
#include "merge-recursive.h"
+#include "dir.h"
static struct tree *shift_tree_object(struct tree *one, struct tree *two)
{
@@ -392,22 +393,6 @@ static int update_stages(const char *path, struct diff_filespec *o,
return 0;
}
-static int remove_path(const char *name)
-{
- char *slash, *dirs;
-
- if (unlink(name))
- return -1;
- dirs = xstrdup(name);
- while ((slash = strrchr(name, '/'))) {
- *slash = '\0';
- if (rmdir(name) != 0)
- break;
- }
- free(dirs);
- return 0;
-}
-
static int remove_file(struct merge_options *o, int clean,
const char *path, int no_wd)
{