Merge branch 'np/addcommit'
authorJunio C Hamano <junkio@cox.net>
Wed, 13 Dec 2006 19:08:20 +0000 (11:08 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 13 Dec 2006 19:08:20 +0000 (11:08 -0800)
* 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

1  2 
git-commit.sh
wt-status.c
diff --combined git-commit.sh
index 7e9742d5e7e830e109f8c1c0f1fea5749502e430,c829791171b2984318aadb63b5b71289b858a7d3..05828bb113d715a1067838ed2ac58ad8db06bf34
@@@ -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 df582a03ef37284496b29a83b3e0bc798e6e4664,4b8b5705b4debaf9d55d02a41f74b8d4da215e97..6e9414dbb07f1457eb436907a77d14476a6e6b1f
@@@ -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]);
        }