From: Junio C Hamano Date: Sat, 16 Jun 2007 08:22:10 +0000 (-0700) Subject: Merge branch 'maint' to sync with GIT 1.5.2.2 X-Git-Tag: v1.5.3-rc0~92 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5bd148bfe8a4f2df8487e029cd4ee6809bc4c963?ds=inline;hp=-c Merge branch 'maint' to sync with GIT 1.5.2.2 --- 5bd148bfe8a4f2df8487e029cd4ee6809bc4c963 diff --combined .gitignore index bd49cd4627,b7546a5591..e8b060cbe4 --- a/.gitignore +++ b/.gitignore @@@ -7,6 -7,8 +7,6 @@@ git-add--interactiv git-am git-annotate git-apply -git-applymbox -git-applypatch git-archimport git-archive git-bisect @@@ -40,7 -42,6 +40,7 @@@ git-fast-impor git-fetch git-fetch--tool git-fetch-pack +git-filter-branch git-findtags git-fmt-merge-msg git-for-each-ref @@@ -125,7 -126,6 +125,7 @@@ git-ssh-pus git-ssh-upload git-status git-stripspace +git-submodule git-svn git-svnimport git-symbolic-ref @@@ -152,14 -152,13 +152,14 @@@ test-delt test-dump-cache-tree test-genrandom test-match-trees +test-sha1 common-cmds.h *.tar.gz *.dsc *.deb - git-core.spec + git.spec *.exe -*.[ao] +*.[aos] *.py[co] config.mak autom4te.cache diff --combined Documentation/asciidoc.conf index 99302c5beb,e061f73867..6b6220dfdb --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@@ -8,7 -8,8 +8,8 @@@ # the command. [attributes] - caret=^ + plus=+ + caret=^ startsb=[ endsb=] tilde=~ @@@ -54,3 -55,5 +55,3 @@@ ifdef::backend-xhtml11[ [gitlink-inlinemacro] {target}{0?({0})} endif::backend-xhtml11[] - - diff --combined Documentation/git-cvsexportcommit.txt index 827711c3c9,f3590dee04..6c423e3a2f --- a/Documentation/git-cvsexportcommit.txt +++ b/Documentation/git-cvsexportcommit.txt @@@ -8,25 -8,25 +8,25 @@@ git-cvsexportcommit - Export a single c SYNOPSIS -------- -'git-cvsexportcommit' [-h] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID +'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID DESCRIPTION ----------- Exports a commit from GIT to a CVS checkout, making it easier -to merge patches from a git repository into a CVS repository. +to merge patches from a git repository into a CVS repository. -Execute it from the root of the CVS working copy. GIT_DIR must be defined. +Execute it from the root of the CVS working copy. GIT_DIR must be defined. See examples below. -It does its best to do the safe thing, it will check that the files are -unchanged and up to date in the CVS checkout, and it will not autocommit +It does its best to do the safe thing, it will check that the files are +unchanged and up to date in the CVS checkout, and it will not autocommit by default. Supports file additions, removals, and commits that affect binary files. If the commit is a merge commit, you must tell git-cvsexportcommit what parent -should the changeset be done against. +should the changeset be done against. OPTIONS ------- @@@ -55,12 -55,9 +55,12 @@@ Force the parent commit, even if it is not a direct parent. -m:: - Prepend the commit message with the provided prefix. + Prepend the commit message with the provided prefix. Useful for patch series and the like. +-u:: + Update affected files from cvs repository before attempting export. + -v:: Verbose. @@@ -73,10 -70,10 +73,10 @@@ Merge one patch into CVS: $ export GIT_DIR=~/project/.git $ cd ~/project_cvs_checkout $ git-cvsexportcommit -v -$ cvs commit -F .mgs +$ cvs commit -F .mgs ------------ - Merge pending patches into CVS automatically -- only if you really know what you are doing :: + Merge pending patches into CVS automatically -- only if you really know what you are doing:: + ------------ $ export GIT_DIR=~/project/.git @@@ -95,3 -92,4 +95,3 @@@ Documentation by Martin Langhoff Signed-off-by: David S. Miller @@@ -167,7 -167,7 +167,7 @@@ index 8be626f..d7aac9d 10064 --- a/Documentation/networking/xfrm_sync.txt +++ b/Documentation/networking/xfrm_sync.txt @@ -47,10 +47,13 @@ aevent_id structure looks like: - + struct xfrm_aevent_id { struct xfrm_usersa_id sa_id; + xfrm_address_t saddr; @@@ -1057,7 -1057,7 +1057,7 @@@ $ git sho ------------------------------------------------- As a special shortcut, - + ------------------------------------------------- $ git commit -a ------------------------------------------------- @@@ -1555,7 -1555,7 +1555,7 @@@ history Fortunately, git also keeps a log, called a "reflog", of all the previous values of each branch. So in this case you can still find the -old history using, for example, +old history using, for example, ------------------------------------------------- $ git log master@{1} @@@ -1631,7 -1631,7 +1631,7 @@@ If you decide you want the history back reference pointing to it, for example, a new branch: ------------------------------------------------ -$ git branch recovered-branch 7281251ddd +$ git branch recovered-branch 7281251ddd ------------------------------------------------ Other types of dangling objects (blobs and trees) are also possible, and @@@ -1794,7 -1794,7 +1794,7 @@@ like this you push your personal repo ------------------> your public repo - ^ | + ^ | | | | you pull | they pull | | @@@ -2360,7 -2360,7 +2360,7 @@@ the result would create a new merge com \ \ a--b--c--m <-- mywork ................................................ - + However, if you prefer to keep the history in mywork a simple series of commits without any merges, you may instead choose to use gitlink:git-rebase[1]: @@@ -2736,7 -2736,7 +2736,7 @@@ must have at least one root, and while root objects together into one project by creating a commit object which has two or more separate roots as its ultimate parents, that's probably just going to confuse people. So aim for the notion of "one root object -per project", even if git itself does not enforce that. +per project", even if git itself does not enforce that. A <> symbolically identifies and can be used to sign other objects. It contains the identifier and type of @@@ -2757,8 -2757,8 +2757,8 @@@ As a result, the general consistency o independently of the contents or the type of the object: all objects can be validated by verifying that (a) their hashes match the content of the file and (b) the object successfully inflates to a stream of bytes that - forms a sequence of + + + + . + forms a sequence of {plus} {plus} {plus} {plus} . The structured objects can further have their structure and connectivity to other objects verified. This is generally done with @@@ -2955,7 -2955,7 +2955,7 @@@ cache, and the normal operation is to r known tree object, or update/compare it with a live tree that is being developed. If you blow the directory cache away entirely, you generally haven't lost any information as long as you have the name of the tree -that it described. +that it described. At the same time, the index is at the same time also the staging area for creating new trees, and creating a new tree always @@@ -2975,7 -2975,7 +2975,7 @@@ Generally, all "git" operations work o work *purely* on the index file (showing the current state of the index), but most operations move data to and from the index file. Either from the database or from the working directory. Thus there are four -main combinations: +main combinations: [[working-directory-to-index]] working directory -> index @@@ -3438,7 -3438,7 +3438,7 @@@ because you interrupted a "git fetch" w leaving _some_ of the new objects in the object database, but just dangling and useless. -Anyway, once you are sure that you're not interested in any dangling +Anyway, once you are sure that you're not interested in any dangling state, you can just prune all unreachable objects: ------------------------------------------------ @@@ -3449,12 -3449,12 +3449,12 @@@ and they'll be gone. But you should onl repository - it's kind of like doing a filesystem fsck recovery: you don't want to do that while the filesystem is mounted. -(The same is true of "git-fsck" itself, btw - but since -git-fsck never actually *changes* the repository, it just reports -on what it found, git-fsck itself is never "dangerous" to run. -Running it while somebody is actually changing the repository can cause -confusing and scary messages, but it won't actually do anything bad. In -contrast, running "git prune" while somebody is actively changing the +(The same is true of "git-fsck" itself, btw - but since +git-fsck never actually *changes* the repository, it just reports +on what it found, git-fsck itself is never "dangerous" to run. +Running it while somebody is actually changing the repository can cause +confusing and scary messages, but it won't actually do anything bad. In +contrast, running "git prune" while somebody is actively changing the repository is a *BAD* idea). [[birdview-on-the-source-code]] diff --combined Makefile index a70277b441,50e7bb39b5..c09dfaf3f0 --- a/Makefile +++ b/Makefile @@@ -107,6 -107,8 +107,8 @@@ all: # Define USE_STDEV below if you want git to care about the underlying device # change being considered an inode change from the update-cache perspective. # + # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8 + # # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's # MakeMaker (e.g. using ActiveState under Cygwin). # @@@ -144,8 -146,8 +146,8 @@@ STRIP ?= stri prefix = $(HOME) bindir = $(prefix)/bin gitexecdir = $(bindir) -sharedir = $(prefix)/share/ -template_dir = $(sharedir)/git-core/templates/ +sharedir = $(prefix)/share +template_dir = $(sharedir)/git-core/templates ifeq ($(prefix),/usr) sysconfdir = /etc else @@@ -206,10 -208,10 +208,10 @@@ SCRIPT_SH = git-repack.sh git-request-pull.sh git-reset.sh \ git-sh-setup.sh \ git-tag.sh git-verify-tag.sh \ - git-applymbox.sh git-applypatch.sh git-am.sh \ + git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ git-merge-resolve.sh git-merge-ours.sh \ - git-lost-found.sh git-quiltimport.sh + git-lost-found.sh git-quiltimport.sh git-submodule.sh SCRIPT_PERL = \ git-add--interactive.perl \ @@@ -238,6 -240,7 +240,6 @@@ PROGRAMS = git-convert-objects$X git-fetch-pack$X \ git-hash-object$X git-index-pack$X git-local-fetch$X \ git-fast-import$X \ - git-merge-base$X \ git-daemon$X \ git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \ git-peek-remote$X git-receive-pack$X \ @@@ -295,8 -298,7 +297,8 @@@ LIB_H = diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \ run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \ tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \ - utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h mailmap.h + utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h \ + mailmap.h remote.h DIFF_OBJS = \ diff.o diff-lib.o diffcore-break.o diffcore-order.o \ @@@ -318,7 -320,7 +320,7 @@@ LIB_OBJS = write_or_die.o trace.o list-objects.o grep.o match-trees.o \ alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \ color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \ - convert.o attr.o decorate.o progress.o mailmap.o symlinks.o + convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o BUILTIN_OBJS = \ builtin-add.o \ @@@ -410,6 -412,7 +412,7 @@@ ifeq ($(uname_S),SunOS NEEDS_NSL = YesPlease SHELL_PATH = /bin/bash NO_STRCASESTR = YesPlease + NO_HSTRERROR = YesPlease ifeq ($(uname_R),5.8) NEEDS_LIBICONV = YesPlease NO_UNSETENV = YesPlease @@@ -654,6 -657,10 +657,10 @@@ endi ifdef NO_PERL_MAKEMAKER export NO_PERL_MAKEMAKER endif + ifdef NO_HSTRERROR + COMPAT_CFLAGS += -DNO_HSTRERROR + COMPAT_OBJS += compat/hstrerror.o + endif ifeq ($(TCLTK_PATH),) NO_TCLTK=NoThanks @@@ -684,6 -691,10 +691,10 @@@ ifndef endif endif + ifdef ASCIIDOC8 + export ASCIIDOC8 + endif + # Shell quote (do not use $(call) to accommodate ancient setups); SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) @@@ -735,13 -746,9 +746,13 @@@ gitk-wish: gitk GIT-GUI-VAR chmod +x $@+ && \ mv -f $@+ $@ -git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS +git.o: git.c common-cmds.h GIT-CFLAGS + $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \ + $(ALL_CFLAGS) -c $(filter %.c,$^) + +git$X: git.o $(BUILTIN_OBJS) $(GITLIBS) $(QUIET_LINK)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \ - $(ALL_CFLAGS) -o $@ $(filter %.c,$^) \ + $(ALL_CFLAGS) -o $@ $(filter %.c,$^) git.o \ $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS) help.o: common-cmds.h @@@ -752,8 -759,6 +763,8 @@@ git-merge-subtree$X: git-merge-recursiv $(BUILT_INS): git$X $(QUIET_BUILT_IN)rm -f $@ && ln git$X $@ +common-cmds.h: ./generate-cmdlist.sh + common-cmds.h: $(wildcard Documentation/git-*.txt) $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@ @@@ -851,8 -856,6 +862,8 @@@ git$X git.spec %.o: %.c GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< +%.s: %.c GIT-CFLAGS + $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $< %.o: %.S $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< @@@ -949,7 -952,7 +960,7 @@@ endi ### Testing rules -TEST_PROGRAMS = test-chmtime$X test-genrandom$X +TEST_PROGRAMS = test-chmtime$X test-genrandom$X test-date$X test-delta$X test-sha1$X test-match-trees$X all:: $(TEST_PROGRAMS) @@@ -962,12 -965,26 +973,12 @@@ export NO_SVN_TEST test: all $(MAKE) -C t/ all -test-date$X: test-date.c date.o ctype.o - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) test-date.c date.o ctype.o - -test-delta$X: test-delta.o diff-delta.o patch-delta.o $(GITLIBS) - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) - -test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS) - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) +test-date$X: date.o ctype.o -test-sha1$X: test-sha1.o $(GITLIBS) - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) +test-delta$X: diff-delta.o patch-delta.o -test-match-trees$X: test-match-trees.o $(GITLIBS) - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) - -test-chmtime$X: test-chmtime.c - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $< - -test-genrandom$X: test-genrandom.c - $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $< +test-%$X: test-%.o $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) check-sha1:: test-sha1$X ./test-sha1.sh @@@ -1058,9 -1075,8 +1069,9 @@@ dist-doc clean: rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \ - test-chmtime$X test-genrandom$X $(LIB_FILE) $(XDIFF_LIB) + $(LIB_FILE) $(XDIFF_LIB) rm -f $(ALL_PROGRAMS) $(BUILT_INS) git$X + rm -f $(TEST_PROGRAMS) rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags rm -rf autom4te.cache rm -f configure config.log config.mak.autogen config.mak.append config.status config.cache diff --combined revision.c index b12c25e2b0,e43c648978..1f4590b896 --- a/revision.c +++ b/revision.c @@@ -114,7 -114,12 +114,7 @@@ void mark_parents_uninteresting(struct } } -void add_pending_object(struct rev_info *revs, struct object *obj, const char *name) -{ - add_pending_object_with_mode(revs, obj, name, S_IFINVALID); -} - -void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode) +static void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode) { if (revs->no_walk && (obj->flags & UNINTERESTING)) die("object ranges do not make sense when not walking revisions"); @@@ -124,11 -129,6 +124,11 @@@ (struct commit *)obj, name); } +void add_pending_object(struct rev_info *revs, struct object *obj, const char *name) +{ + add_pending_object_with_mode(revs, obj, name, S_IFINVALID); +} + static struct object *get_reference(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags) { struct object *object; @@@ -262,7 -262,7 +262,7 @@@ static void file_change(struct diff_opt options->has_changes = 1; } -int rev_compare_tree(struct rev_info *revs, struct tree *t1, struct tree *t2) +static int rev_compare_tree(struct rev_info *revs, struct tree *t1, struct tree *t2) { if (!t1) return REV_TREE_NEW; @@@ -276,7 -276,7 +276,7 @@@ return tree_difference; } -int rev_same_tree_as_empty(struct rev_info *revs, struct tree *t1) +static int rev_same_tree_as_empty(struct rev_info *revs, struct tree *t1) { int retval; void *tree; @@@ -881,7 -881,6 +881,7 @@@ int setup_revisions(int argc, const cha const char **unrecognized = argv + 1; int left = 1; int all_match = 0; + int regflags = 0; /* First, search for "--" */ seen_dashdash = 0; @@@ -1153,14 -1152,6 +1153,14 @@@ add_message_grep(revs, arg+7); continue; } + if (!prefixcmp(arg, "--extended-regexp")) { + regflags |= REG_EXTENDED; + continue; + } + if (!prefixcmp(arg, "--regexp-ignore-case")) { + regflags |= REG_ICASE; + continue; + } if (!strcmp(arg, "--all-match")) { all_match = 1; continue; @@@ -1180,7 -1171,8 +1180,8 @@@ opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i); if (opts > 0) { - revs->diff = 1; + if (strcmp(argv[i], "-z")) + revs->diff = 1; i += opts - 1; continue; } @@@ -1209,9 -1201,6 +1210,9 @@@ } } + if (revs->grep_filter) + revs->grep_filter->regflags |= regflags; + if (show_merge) prepare_show_merge(revs); if (def && !revs->pending.nr) {