Code

modify/delete conflict resolution overwrites untracked file
[git.git] / builtin-ls-tree.c
index 0da047c3bd40f4a7db43f70e2e00c0adcf673188..cb61717685b09a2e409440206e27fce68831e04d 100644 (file)
@@ -23,7 +23,7 @@ static int chomp_prefix;
 static const char *ls_tree_prefix;
 
 static const char ls_tree_usage[] =
-       "git-ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";
+       "git ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";
 
 static int show_recursive(const char *base, int baselen, const char *pathname)
 {
@@ -66,17 +66,16 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
                /*
                 * Maybe we want to have some recursive version here?
                 *
-                * Something like:
+                * Something similar to this incomplete example:
                 *
                if (show_subprojects(base, baselen, pathname)) {
-                       if (fork()) {
-                               chdir(base);
-                               exec ls-tree;
-                       }
-                       waitpid();
+                       struct child_process ls_tree;
+
+                       ls_tree.dir = base;
+                       ls_tree.argv = ls-tree;
+                       start_command(&ls_tree);
                }
                 *
-                * ..or similar..
                 */
                type = commit_type;
        } else if (S_ISDIR(mode)) {