Merge branch 'jc/pull'
authorJunio C Hamano <junkio@cox.net>
Fri, 24 Mar 2006 07:47:32 +0000 (23:47 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 24 Mar 2006 07:47:32 +0000 (23:47 -0800)
* jc/pull:
  git-pull: reword "impossible to fast-forward" message.
  git-pull: further safety while on tracking branch.

Documentation/git-grep.txt
Documentation/git-whatchanged.txt
git-fetch.sh
git-send-email.perl

index fbd2394..d55456a 100644 (file)
@@ -24,13 +24,13 @@ OPTIONS
 
 <option>...::
        Either an option to pass to `grep` or `git-ls-files`.
-
-       The following are the specific `git-ls-files` options
-       that may be given: `-o`, `--cached`, `--deleted`, `--others`,
-       `--killed`, `--ignored`, `--modified`, `--exclude=*`,
-       `--exclude-from=*`, and `--exclude-per-directory=*`.
-
-       All other options will be passed to `grep`.
++
+The following are the specific `git-ls-files` options
+that may be given: `-o`, `--cached`, `--deleted`, `--others`,
+`--killed`, `--ignored`, `--modified`, `--exclude=\*`,
+`--exclude-from=\*`, and `--exclude-per-directory=\*`.
++
+All other options will be passed to `grep`.
 
 <pattern>::
        The pattern to look for.  The first non option is taken
index f02f939..641cb7e 100644 (file)
@@ -47,9 +47,9 @@ OPTIONS
        By default, differences for merge commits are not shown.
        With this flag, show differences to that commit from all
        of its parents.
-
-       However, it is not very useful in general, although it
-       *is* useful on a file-by-file basis.
++
+However, it is not very useful in general, although it
+*is* useful on a file-by-file basis.
 
 Examples
 --------
index 0346d4a..6835634 100755 (executable)
@@ -179,6 +179,7 @@ fast_forward_local () {
                        ;;
                *)
                        echo >&2 "  not updating."
+                       exit 1
                        ;;
                esac
            }
index 7c8d512..b220d11 100755 (executable)
@@ -307,6 +307,7 @@ $subject = $initial_subject;
 foreach my $t (@files) {
        open(F,"<",$t) or die "can't open file $t";
 
+       my $author_not_sender = undef;
        @cc = @initial_cc;
        my $found_mbox = 0;
        my $header_done = 0;
@@ -321,7 +322,12 @@ foreach my $t (@files) {
                                        $subject = $1;
 
                                } elsif (/^(Cc|From):\s+(.*)$/) {
-                                       next if ($2 eq $from && $suppress_from);
+                                       if ($2 eq $from) {
+                                               next if ($suppress_from);
+                                       }
+                                       else {
+                                               $author_not_sender = $2;
+                                       }
                                        printf("(mbox) Adding cc: %s from line '%s'\n",
                                                $2, $_) unless $quiet;
                                        push @cc, $2;
@@ -360,6 +366,9 @@ foreach my $t (@files) {
                }
        }
        close F;
+       if (defined $author_not_sender) {
+               $message = "From: $author_not_sender\n\n$message";
+       }
 
        $cc = join(", ", unique_email_list(@cc));