Staging
v0.8.1
Revision 47ee06f1224cc355d0d5fffb0a65b831790b2845 authored by Jeff King on 05 January 2008, 09:57:44 UTC, committed by Junio C Hamano on 07 January 2008, 02:41:44 UTC
There are two possible confusions with the color.interactive
description:

  1. the short name "interactive" implies that it covers all
     interactive commands; let's explicitly make it so, even
     though there are no other interactive commands which
     currently use it

  2. Not all parts of "git add --interactive" are controlled
     by color.interactive (specifically, the diffs require
     tweaking color.diff). So let's clarify that it applies
     only to displays and prompts.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f87e310
Raw File
builtin-diff-files.c
/*
 * GIT - The information manager from hell
 *
 * Copyright (C) Linus Torvalds, 2005
 */
#include "cache.h"
#include "diff.h"
#include "commit.h"
#include "revision.h"
#include "builtin.h"

static const char diff_files_usage[] =
"git-diff-files [-q] [-0/-1/2/3 |-c|--cc|--no-index] [<common diff options>] [<path>...]"
COMMON_DIFF_OPTIONS_HELP;

int cmd_diff_files(int argc, const char **argv, const char *prefix)
{
	struct rev_info rev;
	int nongit = 0;
	int result;

	prefix = setup_git_directory_gently(&nongit);
	init_revisions(&rev, prefix);
	git_config(git_diff_basic_config); /* no "diff" UI options */
	rev.abbrev = 0;

	if (!setup_diff_no_index(&rev, argc, argv, nongit, prefix))
		argc = 0;
	else
		argc = setup_revisions(argc, argv, &rev, NULL);
	if (!rev.diffopt.output_format)
		rev.diffopt.output_format = DIFF_FORMAT_RAW;
	result = run_diff_files_cmd(&rev, argc, argv);
	return diff_result_code(&rev.diffopt, result);
}
back to top