diff options
-rw-r--r-- | Documentation/git-clone.txt | 21 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | diff-lib.c (renamed from diff.c) | 7 | ||||
-rwxr-xr-x | git-merge.sh | 2 | ||||
-rwxr-xr-x | git-repack.sh | 8 | ||||
-rw-r--r-- | git.c | 2 | ||||
-rw-r--r-- | templates/hooks--pre-commit | 3 |
7 files changed, 34 insertions, 11 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 9ac54c282..131e44574 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -10,6 +10,7 @@ SYNOPSIS -------- [verse] 'git-clone' [-l [-s]] [-q] [-n] [--bare] [-o <name>] [-u <upload-pack>] + [--reference <repository>] <repository> [<directory>] DESCRIPTION @@ -46,10 +47,18 @@ OPTIONS -s:: When the repository to clone is on the local machine, instead of using hard links, automatically setup - .git/objects/info/alternatives to share the objects + .git/objects/info/alternates to share the objects with the source repository. The resulting repository starts out without any object of its own. +--reference <repository>:: + If the reference repository is on the local machine + automatically setup .git/objects/info/alternates to + obtain objects from the reference repository. Using + an already existing repository as an alternate will + require less objects to be copied from the repository + being cloned, reducing network and local storage costs. + --quiet:: -q:: Operate quietly. This flag is passed to "rsync" and @@ -112,6 +121,16 @@ $ git show-branch ------------ +Clone from upstream while borrowing from an existing local directory:: ++ +------------ +$ git clone --reference my2.6 \ + git://git.kernel.org/pub/scm/.../linux-2.7 \ + my2.7 +$ cd my2.7 +------------ + + Create a bare repository to publish your changes to the public:: + ------------ @@ -199,7 +199,7 @@ LIB_H = \ tree-walk.h log-tree.h DIFF_OBJS = \ - diff.o diffcore-break.o diffcore-order.o \ + diff-lib.o diffcore-break.o diffcore-order.o \ diffcore-pickaxe.o diffcore-rename.o tree-diff.o combine-diff.o \ diffcore-delta.o log-tree.o @@ -250,13 +250,14 @@ static void show_stats(struct diffstat_t* data) for (i = 0; i < data->nr; i++) { struct diffstat_file *file = data->files[i]; + len = strlen(file->name); + if (max_len < len) + max_len = len; + if (file->is_binary || file->is_unmerged) continue; if (max_change < file->added + file->deleted) max_change = file->added + file->deleted; - len = strlen(file->name); - if (max_len < len) - max_len = len; } for (i = 0; i < data->nr; i++) { diff --git a/git-merge.sh b/git-merge.sh index 78ab422e4..b834e79c9 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -335,5 +335,5 @@ Conflicts: then git-rerere fi - die "Automatic merge failed; fix up by hand" + die "Automatic merge failed; fix conflicts and then commit the result." fi diff --git a/git-repack.sh b/git-repack.sh index a5d349fd0..e0c9f323c 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -5,9 +5,9 @@ USAGE='[-a] [-d] [-f] [-l] [-n] [-q]' . git-sh-setup - + no_update_info= all_into_one= remove_redundant= -local= quiet= no_reuse_delta= +local= quiet= no_reuse_delta= extra= while case "$#" in 0) break ;; esac do case "$1" in @@ -17,6 +17,8 @@ do -q) quiet=-q ;; -f) no_reuse_delta=--no-reuse-delta ;; -l) local=--local ;; + --window=*) extra="$extra $1" ;; + --depth=*) extra="$extra $1" ;; *) usage ;; esac shift @@ -40,7 +42,7 @@ case ",$all_into_one," in find . -type f \( -name '*.pack' -o -name '*.idx' \) -print` ;; esac -pack_objects="$pack_objects $local $quiet $no_reuse_delta" +pack_objects="$pack_objects $local $quiet $no_reuse_delta$extra" name=$(git-rev-list --objects --all $rev_list 2>&1 | git-pack-objects --non-empty $pack_objects .tmp-pack) || exit 1 @@ -331,8 +331,6 @@ static int cmd_log(int argc, const char **argv, char **envp) init_revisions(&rev); rev.always_show_header = 1; rev.diffopt.recursive = 1; - rev.combine_merges = 1; - rev.ignore_merges = 0; return cmd_log_wc(argc, argv, envp, &rev); } diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit index 43d3b6ef4..723a9ef21 100644 --- a/templates/hooks--pre-commit +++ b/templates/hooks--pre-commit @@ -61,6 +61,9 @@ perl -e ' if (/^\s* /) { bad_line("indent SP followed by a TAB", $_); } + if (/^(?:[<>=]){7}/) { + bad_line("unresolved merge conflict", $_); + } } } exit($found_bad); |