Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sun, 31 Aug 2008 03:31:39 +0000 (20:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 31 Aug 2008 03:31:39 +0000 (20:31 -0700)
* maint:
gitattributes: -crlf is not binary
git-apply: Loosen "match_beginning" logic
Fix example in git-name-rev documentation
shell: do not play duplicated definition games to shrink the executable
Fix use of hardlinks in "make install"
pack-objects: Allow missing base objects when creating thin packs

1  2 
Documentation/gitattributes.txt
Makefile
index 5495d695c6f61982e01e2276d108b15dddb16c52,19938879376b635feeb6477e73e1e3e1e821d9cb..1f23d27a61dc01a5d3988afe4593f61ee3434c4d
@@@ -105,9 -105,8 +105,8 @@@ Set:
  
  Unset::
  
-       Unsetting the `crlf` attribute on a path is meant to
-       mark the path as a "binary" file.  The path never goes
-       through line endings conversion upon checkin/checkout.
+       Unsetting the `crlf` attribute on a path tells git not to
+       attempt any end-of-line conversion upon checkin or checkout.
  
  Unspecified::
  
@@@ -316,14 -315,10 +315,14 @@@ patterns are available
  
  - `pascal` suitable for source code in the Pascal/Delphi language.
  
 +- `python` suitable for source code in the Python language.
 +
  - `ruby` suitable for source code in the Ruby language.
  
  - `tex` suitable for source code for LaTeX documents.
  
 +- `html` suitable for HTML/XHTML documents.
 +
  
  Performing a three-way merge
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@@ -486,6 -481,41 +485,41 @@@ in the file.  E.g. the string `$Format:
  commit hash.
  
  
+ USING ATTRIBUTE MACROS
+ ----------------------
+ You do not want any end-of-line conversions applied to, nor textual diffs
+ produced for, any binary file you track.  You would need to specify e.g.
+ ------------
+ *.jpg -crlf -diff
+ ------------
+ but that may become cumbersome, when you have many attributes.  Using
+ attribute macros, you can specify groups of attributes set or unset at
+ the same time.  The system knows a built-in attribute macro, `binary`:
+ ------------
+ *.jpg binary
+ ------------
+ which is equivalent to the above.  Note that the attribute macros can only
+ be "Set" (see the above example that sets "binary" macro as if it were an
+ ordinary attribute --- setting it in turn unsets "crlf" and "diff").
+ DEFINING ATTRIBUTE MACROS
+ -------------------------
+ Custom attribute macros can be defined only in the `.gitattributes` file
+ at the toplevel (i.e. not in any subdirectory).  The built-in attribute
+ macro "binary" is equivalent to:
+ ------------
+ [attr]binary -diff -crlf
+ ------------
  EXAMPLE
  -------
  
diff --combined Makefile
index bf400e64f39e5967206c01d2266aca800d4db667,00991b7c12ab7d9b74efbb67ee407b5788b79984..20f028fffff314da453774fd50d0e99259d01f2c
+++ b/Makefile
@@@ -124,9 -124,6 +124,9 @@@ all:
  # Define USE_STDEV below if you want git to care about the underlying device
  # change being considered an inode change from the update-index perspective.
  #
 +# Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks
 +# field that counts the on-disk footprint in 512-byte blocks.
 +#
  # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8
  #
  # Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72.
@@@ -357,7 -354,6 +357,7 @@@ LIB_H += git-compat-util.
  LIB_H += graph.h
  LIB_H += grep.h
  LIB_H += hash.h
 +LIB_H += help.h
  LIB_H += list-objects.h
  LIB_H += ll-merge.h
  LIB_H += log-tree.h
@@@ -521,7 -517,6 +521,7 @@@ BUILTIN_OBJS += builtin-for-each-ref.
  BUILTIN_OBJS += builtin-fsck.o
  BUILTIN_OBJS += builtin-gc.o
  BUILTIN_OBJS += builtin-grep.o
 +BUILTIN_OBJS += builtin-help.o
  BUILTIN_OBJS += builtin-init-db.o
  BUILTIN_OBJS += builtin-log.o
  BUILTIN_OBJS += builtin-ls-files.o
@@@ -579,11 -574,9 +579,11 @@@ EXTLIBS 
  
  ifeq ($(uname_S),Linux)
        NO_STRLCPY = YesPlease
 +      THREADED_DELTA_SEARCH = YesPlease
  endif
  ifeq ($(uname_S),GNU/kFreeBSD)
        NO_STRLCPY = YesPlease
 +      THREADED_DELTA_SEARCH = YesPlease
  endif
  ifeq ($(uname_S),UnixWare)
        CC = cc
@@@ -681,7 -674,6 +681,7 @@@ ifeq ($(uname_S),FreeBSD
        BASIC_CFLAGS += -I/usr/local/include
        BASIC_LDFLAGS += -L/usr/local/lib
        DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
 +      THREADED_DELTA_SEARCH = YesPlease
  endif
  ifeq ($(uname_S),OpenBSD)
        NO_STRCASESTR = YesPlease
        NEEDS_LIBICONV = YesPlease
        BASIC_CFLAGS += -I/usr/local/include
        BASIC_LDFLAGS += -L/usr/local/lib
 +      THREADED_DELTA_SEARCH = YesPlease
  endif
  ifeq ($(uname_S),NetBSD)
        ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
        BASIC_CFLAGS += -I/usr/pkg/include
        BASIC_LDFLAGS += -L/usr/pkg/lib
        ALL_LDFLAGS += -Wl,-rpath,/usr/pkg/lib
 +      THREADED_DELTA_SEARCH = YesPlease
  endif
  ifeq ($(uname_S),AIX)
        NO_STRCASESTR=YesPlease
@@@ -759,7 -749,6 +759,7 @@@ ifneq (,$(findstring MINGW,$(uname_S))
        NO_SVN_TESTS = YesPlease
        NO_PERL_MAKEMAKER = YesPlease
        NO_POSIX_ONLY_PROGRAMS = YesPlease
 +      NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
        COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat
        COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
        COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
@@@ -874,9 -863,6 +874,9 @@@ endi
  ifdef NO_D_INO_IN_DIRENT
        BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT
  endif
 +ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
 +      BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT
 +endif
  ifdef NO_C99_FORMAT
        BASIC_CFLAGS += -DNO_C99_FORMAT
  endif
@@@ -1105,7 -1091,7 +1105,7 @@@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
                $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
  
 -help.o: help.c common-cmds.h GIT-CFLAGS
 +builtin-help.o: builtin-help.c common-cmds.h GIT-CFLAGS
        $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
                '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
                '-DGIT_MAN_PATH="$(mandir_SQ)"' \
@@@ -1232,9 -1218,7 +1232,9 @@@ endi
  git-%$X: %.o $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
  
 -git-imap-send$X: imap-send.o $(LIB_FILE)
 +git-imap-send$X: imap-send.o $(GITLIBS)
 +      $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 +              $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
  
  http.o http-walker.o http-push.o transport.o: http.h
  
@@@ -1364,7 -1348,7 +1364,7 @@@ install: al
        $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
        $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
        $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 -      $(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X '$(DESTDIR_SQ)$(bindir_SQ)'
 +      $(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X '$(DESTDIR_SQ)$(bindir_SQ)'
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
        $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
  ifndef NO_TCLTK
@@@ -1379,7 -1363,7 +1379,7 @@@ endi
        { $(RM) "$$execdir/git-add$X" && \
                ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
                cp git-add$X "$$execdir/git-add$X"; } && \
-       { $(foreach p,$(filter-out git-add,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
+       { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
                ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
                ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
                cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \