From: Junio C Hamano Date: Wed, 13 Dec 2006 19:08:20 +0000 (-0800) Subject: Merge branch 'np/addcommit' X-Git-Tag: v1.5.0-rc0~120 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/78ba00407cf69c9f57f17e07d156336ce47c2b03?ds=inline;hp=-c Merge branch 'np/addcommit' * np/addcommit: git-commit: allow --only to lose what was staged earlier. Documentation/git-commit: rewrite to make it more end-user friendly. make 'git add' a first class user friendly interface to the index --- 78ba00407cf69c9f57f17e07d156336ce47c2b03 diff --combined git-commit.sh index 7e9742d5e7,c829791171..05828bb113 --- a/git-commit.sh +++ b/git-commit.sh @@@ -350,19 -350,9 +350,9 @@@ t, refuse_partial "Cannot do a partial commit during a merge." fi TMP_INDEX="$GIT_DIR/tmp-index$$" - if test -z "$initial_commit" - then - # make sure index is clean at the specified paths, or - # they are additions. - dirty_in_index=`git-diff-index --cached --name-status \ - --diff-filter=DMTU HEAD -- "$@"` - test -z "$dirty_in_index" || - refuse_partial "Different in index and the last commit: - $dirty_in_index" - fi commit_only=`git-ls-files --error-unmatch -- "$@"` || exit - # Build the temporary index and update the real index + # Build a temporary index and update the real index # the same way. if test -z "$initial_commit" then @@@ -629,7 -619,4 +619,7 @@@ if test -x "$GIT_DIR"/hooks/post-commi then "$GIT_DIR"/hooks/post-commit fi + +test "$ret" = 0 && git-diff-tree --summary --root --no-commit-id HEAD + exit "$ret" diff --combined wt-status.c index df582a03ef,4b8b5705b4..6e9414dbb0 --- a/wt-status.c +++ b/wt-status.c @@@ -163,7 -163,7 +163,7 @@@ static void wt_status_print_changed_cb( int i; if (q->nr) wt_status_print_header("Changed but not updated", - "use git-update-index to mark for commit"); + "use git-add on files to include for commit"); for (i = 0; i < q->nr; i++) wt_status_print_filepair(WT_STATUS_CHANGED, q->queue[i]); if (q->nr) @@@ -297,11 -297,11 +297,11 @@@ void wt_status_print(struct wt_status * int git_status_config(const char *k, const char *v) { - if (!strcmp(k, "status.color")) { + if (!strcmp(k, "status.color") || !strcmp(k, "color.status")) { wt_status_use_color = git_config_colorbool(k, v); return 0; } - if (!strncmp(k, "status.color.", 13)) { + if (!strncmp(k, "status.color.", 13) || !strncmp(k, "color.status", 13)) { int slot = parse_status_slot(k, 13); color_parse(v, k, wt_status_colors[slot]); }