git/diff-no-index.c

/*
 * "diff --no-index" support
 * Copyright (c) 2007 by Johannes Schindelin
 * Copyright (c) 2008 by Junio C Hamano
 */

#include "git-compat-util.h"
#include "abspath.h"
#include "color.h"
#include "commit.h"
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
#include "revision.h"
#include "parse-options.h"
#include "string-list.h"
#include "dir.h"

static int read_directory_contents(const char *path, struct string_list *list)
{}

/*
 * This should be "(standard input)" or something, but it will
 * probably expose many more breakages in the way no-index code
 * is bolted onto the diff callchain.
 */
static const char file_from_standard_input[] =;

/*
 * For paths given on the command-line we treat "-" as stdin and named
 * pipes and symbolic links to named pipes specially.
 */
enum special {};

static int get_mode(const char *path, int *mode, enum special *special)
{}

static void populate_common(struct diff_filespec *s, struct strbuf *buf)
{}

static void populate_from_pipe(struct diff_filespec *s)
{}

static void populate_from_stdin(struct diff_filespec *s)
{}

static struct diff_filespec *noindex_filespec(const char *name, int mode,
					      enum special special)
{}

static int queue_diff(struct diff_options *o,
		      const char *name1, const char *name2, int recursing)
{}

/* append basename of F to D */
static void append_basename(struct strbuf *path, const char *dir, const char *file)
{}

/*
 * DWIM "diff D F" into "diff D/F F" and "diff F D" into "diff F D/F"
 * Note that we append the basename of F to D/, so "diff a/b/file D"
 * becomes "diff a/b/file D/file", not "diff a/b/file D/a/b/file".
 */
static void fixup_paths(const char **path, struct strbuf *replacement)
{}

static const char * const diff_no_index_usage[] =;

int diff_no_index(struct rev_info *revs,
		  int implicit_no_index,
		  int argc, const char **argv)
{}