Merge branch 'mk/diff'
authorJunio C Hamano <junkio@cox.net>
Wed, 25 Apr 2007 05:12:48 +0000 (22:12 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 25 Apr 2007 05:12:48 +0000 (22:12 -0700)
* mk/diff:
Diff between two blobs should take mode changes into account now.
use mode of the tree in git-diff, if <tree>:<file> syntax is used
store mode in rev_list, if <tree>:<filename> syntax is used
add add_object_array_with_mode
add get_sha1_with_mode
Add S_IFINVALID mode

Documentation/gitattributes.txt
Makefile
contrib/fast-import/import-tars.perl
fast-import.c
git-applymbox.sh
git-quiltimport.sh
git-svn.perl
t/test-lib.sh
index d2edb9b14ae8fa0716d7139022ad4c7f61b355ed..857d55a409b80f0beaa8b98e1e04f922798241e3 100644 (file)
@@ -49,10 +49,12 @@ Set to a value::
 Unspecified::
 
        No glob pattern matches the path, and nothing says if
-       the path has or does not have the attribute.
+       the path has or does not have the attribute, the
+       attribute for the path is said to be Unspecified.
 
 When more than one glob pattern matches the path, a later line
-overrides an earlier line.
+overrides an earlier line.  This overriding is done per
+attribute.
 
 When deciding what attributes are assigned to a path, git
 consults `$GIT_DIR/info/attributes` file (which has the highest
@@ -215,7 +217,7 @@ String::
        merge driver.  The built-in 3-way merge driver can be
        explicitly specified by asking for "text" driver; the
        built-in "take the current branch" driver can be
-       requested by "binary".
+       requested with "binary".
 
 
 Defining a custom merge driver
index 65bd2dbf9d8089ba8c7bf20479605ef3b02b6a49..60c41fd0d830f3c2b9e37d80800a9e7e6b3e7445 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -141,7 +141,12 @@ prefix = $(HOME)
 bindir = $(prefix)/bin
 gitexecdir = $(bindir)
 template_dir = $(prefix)/share/git-core/templates/
-ETC_GITCONFIG = $(prefix)/etc/gitconfig
+ifeq ($(prefix),/usr)
+sysconfdir = /etc
+else
+sysconfdir = $(prefix)/etc
+endif
+ETC_GITCONFIG = $(sysconfdir)/gitconfig
 # DESTDIR=
 
 # default configuration for gitweb
@@ -160,7 +165,7 @@ GITWEB_FAVICON = git-favicon.png
 GITWEB_SITE_HEADER =
 GITWEB_SITE_FOOTER =
 
-export prefix bindir gitexecdir template_dir
+export prefix bindir gitexecdir template_dir sysconfdir
 
 CC = gcc
 AR = ar
index 5585a8b2c575f92e6154e03641b467e5e54509f4..184214689dfd3f1204546b060adbffd3f6d79bbe 100755 (executable)
                }
                print FI "\n";
 
-               my $path = "$prefix$name";
+               my $path;
+               if ($prefix) {
+                       $path = "$prefix/$name";
+               } else {
+                       $path = "$name";
+               }
                $files{$path} = [$next_mark++, $mode];
 
                $commit_time = $mtime if $mtime > $commit_time;
index cdd629d6bc547609daabab6c1f3b73939fddb7b9..c4c8cb905e3bcdfb131af40da9f7e29ca86b4a01 100644 (file)
@@ -673,7 +673,7 @@ static void fixup_header_footer(void)
 
        buf = xmalloc(buf_sz);
        for (;;) {
-               size_t n = xread(pack_fd, buf, buf_sz);
+               ssize_t n = xread(pack_fd, buf, buf_sz);
                if (!n)
                        break;
                if (n < 0)
@@ -904,6 +904,12 @@ static int store_object(
        if (e->offset) {
                duplicate_count_by_type[type]++;
                return 1;
+       } else if (find_sha1_pack(sha1, packed_git)) {
+               e->type = type;
+               e->pack_id = MAX_PACK_ID;
+               e->offset = 1; /* just not zero! */
+               duplicate_count_by_type[type]++;
+               return 1;
        }
 
        if (last && last->data && last->depth < max_depth) {
@@ -2021,6 +2027,7 @@ static void import_marks(const char *input_file)
                        e = insert_object(sha1);
                        e->type = type;
                        e->pack_id = MAX_PACK_ID;
+                       e->offset = 1; /* just not zero! */
                }
                insert_mark(mark, e);
        }
@@ -2086,6 +2093,7 @@ int main(int argc, const char **argv)
        if (i != argc)
                usage(fast_import_usage);
 
+       prepare_packed_git();
        start_packfile();
        for (;;) {
                read_next_command();
index 3efd6a746407bdc38ba9d251332427c508e5ee40..c18e80ff8cd5a66a64e22cf96e77fad519d33b5d 100755 (executable)
@@ -78,7 +78,7 @@ do
            git-mailinfo $keep_subject $utf8 \
                .dotest/msg .dotest/patch <$i >.dotest/info || exit 1
            test -s .dotest/patch || {
-               echo "Patch is empty.  Was is split wrong?"
+               echo "Patch is empty.  Was it split wrong?"
                exit 1
            }
            git-stripspace < .dotest/msg > .dotest/msg-clean
index 018cc75bd032fd337b559c14b85f51f0418447ff..a7a6757dd8a3e0ff2635537a83591169c259986f 100755 (executable)
@@ -74,7 +74,7 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
        echo $patch_name
        (cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
        test -s .dotest/patch || {
-               echo "Patch is empty.  Was is split wrong?"
+               echo "Patch is empty.  Was it split wrong?"
                exit 1
        }
 
index efc4c88a4ea158bd630a6f53a8346e344b360ed6..077d6b3a134fcb6c8f74f1473cbb9d36bdb7c6f9 100755 (executable)
@@ -1866,11 +1866,14 @@ sub make_log_entry {
        } elsif ($self->use_svnsync_props) {
                my $full_url = $self->svnsync->{url};
                $full_url .= "/$self->{path}" if length $self->{path};
+               remove_username($full_url);
                my $uuid = $self->svnsync->{uuid};
                $log_entry{metadata} = "$full_url\@$rev $uuid";
                $email ||= "$author\@$uuid"
        } else {
-               $log_entry{metadata} = $self->metadata_url. "\@$rev " .
+               my $url = $self->metadata_url;
+               remove_username($url);
+               $log_entry{metadata} = "$url\@$rev " .
                                       $self->ra->get_uuid;
                $email ||= "$author\@" . $self->ra->get_uuid;
        }
index c0754747fbc250274f069901703159ffd23faf86..f2c6bd3b01d39b8cc71bc624e0eaddc0681ae25e 100644 (file)
@@ -36,6 +36,10 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
 export EDITOR VISUAL
 
+# Protect ourselves from common misconfiguration to export
+# CDPATH into the environment
+unset CDPATH
+
 case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
        1|2|true)
                echo "* warning: Some tests will not work if GIT_TRACE" \