Commit Graph

23491 Commits

Author SHA1 Message Date
Junio C Hamano
9d7756e15c Merge branch 'bg/fix-t7003' into next
* bg/fix-t7003:
  t7003: Use test_commit instead of custom function
2010-09-13 11:27:30 -07:00
Brian Gernhardt
77f2e4f5f3 t7003: Use test_commit instead of custom function
t7003-filter-branch.sh had a make_commit() function that was identical
to test_commit() in test-lib.sh except that it used tr to create a
lowercase file name from the uppercase branch name instead of
appending ".t".

Not only is this unneeded code duplication, it also was something
simply waiting to fail on case-insensitive file systems.  So replace
all uses of make_commit with test_commit.

While we're editing the setup, chain it together with && so that
failures early in the sequence don't get lost and add a commit graph.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-13 10:59:06 -07:00
Junio C Hamano
ee5c7b80a6 Merge branch 'master' into next
* master:
  t3101: modernise style
  vcs-svn: Fix some printf format compiler warnings
  compat/nedmalloc: don't force NDEBUG on the rest of git
2010-09-12 14:05:29 -07:00
Junio C Hamano
4621733351 Merge branch 'jn/gitweb-test-lib' into next
* jn/gitweb-test-lib:
  t/gitweb-lib.sh: Use tabs for indent consistently
  t/gitweb-lib.sh: Use GIT_BUILD_DIR
2010-09-12 14:03:59 -07:00
Junio C Hamano
c9d05a661c Merge branch 'dr/maint-ls-tree-prefix-recursion-fix' into next
* dr/maint-ls-tree-prefix-recursion-fix:
  ls-tree $di $dir: do not mistakenly recurse into directories
2010-09-12 14:03:58 -07:00
Junio C Hamano
e29a02951d Merge branch 'by/line-log' into next
* by/line-log:
  log -L: do not free parents lists we might need again
2010-09-12 14:03:58 -07:00
Jakub Narebski
89d1b5b8f7 t/gitweb-lib.sh: Use tabs for indent consistently
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-12 14:01:59 -07:00
Jakub Narebski
b5d3450c91 t/gitweb-lib.sh: Use GIT_BUILD_DIR
Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY/.." (both defined in
t/test-lib.sh) in t/gitweb-lib.sh.  It better describes the intent.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-12 14:01:55 -07:00
Junio C Hamano
5879b6bbca Merge branch 'maint'
* maint:
  t3101: modernise style
  compat/nedmalloc: don't force NDEBUG on the rest of git

Conflicts:
	Makefile
2010-09-12 13:53:03 -07:00
Junio C Hamano
b294ed637d ls-tree $di $dir: do not mistakenly recurse into directories
When applying two pathspecs, one of which is named as a prefix to the
other, we mistakenly recursed into the shorter one.

Noticed and fixed by David Reis.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-12 13:52:03 -07:00
Junio C Hamano
e22148f406 t3101: modernise style
Also add a few " &&" cascade that were missing.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-12 13:46:58 -07:00
Thomas Rast
09457d2867 log -L: do not free parents lists we might need again
The parent rewriting code of 'git log -L' was too aggressive in
freeing memory: assign_range_to_parent() will free the commit->parents
field when it sees that a parent cannot pass off any blame (is a root
commit in rewritten history).

Its caller assign_parents_range() however will, upon finding the first
parent that takes *full* blame for all ranges, rewind and reinstate
all previous parents' line ranges and parent lists.  This resurrects
pointers to ranges that were freed in assign_range_to_parent() under
some circumstances.

Furthermore, we must not empty the parent lists either: the same
rewind/reinstate code relies on them.

Do both only if the commit was an ordinary (not merge or root) commit,
in which case the merge code-path discussed here is never taken.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-12 10:27:21 -07:00
Ramsay Jones
5418d96ddc vcs-svn: Fix some printf format compiler warnings
In particular, on systems that define uint32_t as an unsigned long,
gcc complains as follows:

      CC vcs-svn/fast_export.o
  vcs-svn/fast_export.c: In function `fast_export_modify':
  vcs-svn/fast_export.c:28: warning: unsigned int format, uint32_t arg (arg 2)
  vcs-svn/fast_export.c:28: warning: int format, uint32_t arg (arg 3)
  vcs-svn/fast_export.c: In function `fast_export_commit':
  vcs-svn/fast_export.c:42: warning: int format, uint32_t arg (arg 5)
  vcs-svn/fast_export.c:62: warning: int format, uint32_t arg (arg 2)
  vcs-svn/fast_export.c: In function `fast_export_blob':
  vcs-svn/fast_export.c:72: warning: int format, uint32_t arg (arg 2)
  vcs-svn/fast_export.c:72: warning: int format, uint32_t arg (arg 3)
      CC vcs-svn/svndump.o
  vcs-svn/svndump.c: In function `svndump_read':
  vcs-svn/svndump.c:260: warning: int format, uint32_t arg (arg 3)

In order to suppress the warnings we use the C99 format specifier
macros PRIo32 and PRIu32 from <inttypes.h>.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-12 10:24:55 -07:00
René Scharfe
d555ff5482 compat/nedmalloc: don't force NDEBUG on the rest of git
Define the nedmalloc feature configuration macros for nedmalloc.o, only.
This keeps assert(3) working for the rest of the git source; it was
turned off for nedmalloc users before by defining NDEBUG globally.

Also remove -DUSE_NED_ALLOCATOR as this macro isn't used anywhere.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-11 10:23:03 -07:00
Junio C Hamano
6997c03281 Merge branch 'master' into next
* master:
  Git 1.7.3 rc1
  Prepare for 1.7.3 rc1
  install-webdoc: keep installed RelNotes-*.txt
  Documentation: move RelNotes into a directory of their own
2010-09-10 11:56:07 -07:00
Junio C Hamano
3b3a8ed4be Git 1.7.3 rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.3-rc1
2010-09-10 11:55:55 -07:00
Junio C Hamano
5b45c55545 Merge branch 'np/relnotes-in-subdir'
* np/relnotes-in-subdir:
  install-webdoc: keep installed RelNotes-*.txt
  Documentation: move RelNotes into a directory of their own
2010-09-10 11:54:58 -07:00
Junio C Hamano
6070bac82a Prepare for 1.7.3 rc1 2010-09-10 11:54:34 -07:00
Junio C Hamano
67a51385eb Merge branch 'jl/fetch-submodule-recursive' into next
* jl/fetch-submodule-recursive:
  Submodules: Add the new "fetch" config option for fetch and pull
  fetch/pull: Recursively fetch populated submodules
2010-09-10 10:25:59 -07:00
Junio C Hamano
b509ebc5aa Merge branch 'ml/completion-zsh' into next
* ml/completion-zsh:
  completion: make compatible with zsh
2010-09-10 10:25:59 -07:00
Junio C Hamano
c23bd48ae7 Merge branch 'rr/format-patch-count-without-merges' into next
* rr/format-patch-count-without-merges:
  format-patch: Don't go over merge commits
  t4014-format-patch: Call test_tick before committing
2010-09-10 10:25:58 -07:00
Junio C Hamano
40fe79e532 Merge branch 'rr/fmt-merge-msg' into next
* rr/fmt-merge-msg:
  t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
  t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
  merge: Make 'merge.log' an integer or boolean option
  merge: Make '--log' an integer option for number of shortlog entries
  fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len

Conflicts:
	builtin/merge.c
2010-09-10 10:25:58 -07:00
Junio C Hamano
d39274db8a Merge branch 'po/sendemail' into next
* po/sendemail:
  New send-email option smtpserveroption.
  Remove @smtp_host_parts variable as not used.
  Minor indentation fix.
2010-09-10 10:25:58 -07:00
Junio C Hamano
c503fd517d Merge branch 'po/etc-gitattributes' into next
* po/etc-gitattributes:
  Add global and system-wide gitattributes

Conflicts:
	Documentation/config.txt
	Makefile
2010-09-10 10:25:57 -07:00
Junio C Hamano
2ab857287b Merge branch 'nd/index-doc' into next
* nd/index-doc:
  doc: technical details about the index file format
2010-09-10 10:25:57 -07:00
Junio C Hamano
3604fc3357 Merge branch 'jc/pickaxe-grep' into next
* jc/pickaxe-grep:
  diff/log -G<pattern>: tests
  git log/diff: add -G<regexp> that greps in the patch text
  diff: pass the entire diff-options to diffcore_pickaxe()
  gitdiffcore doc: update pickaxe description
2010-09-10 10:25:57 -07:00
Junio C Hamano
65a9cdead3 Merge branch 'en/tree-walk-optim' into next
* en/tree-walk-optim:
  diff_tree(): Skip skip_uninteresting() when all remaining paths interesting
  tree_entry_interesting(): Make return value more specific
  tree-walk: Correct bitrotted comment about tree_entry()
  Document pre-condition for tree_entry_interesting
2010-09-10 10:25:57 -07:00
Junio C Hamano
849b1bb5e7 Merge branch 'jl/fix-test' into next
* jl/fix-test:
  t1020: Get rid of 'cd "$HERE"' at the start of each test
  t2016 (checkout -p): add missing &&
  t1302 (core.repositoryversion): style tweaks
  t2105 (gitfile): add missing &&
  t1450 (fsck): remove dangling objects
  tests: subshell indentation stylefix
  Several tests: cd inside subshell instead of around
2010-09-10 10:25:56 -07:00
Junio C Hamano
2f3a995447 Merge branch 'jk/read-tree-empty' into next
* jk/read-tree-empty:
  read-tree: deprecate syntax without tree-ish args
2010-09-10 10:25:56 -07:00
Junio C Hamano
f1acd1005c Merge branch 'os/fix-rebase-diff-no-prefix' into next
* os/fix-rebase-diff-no-prefix:
  Add --src/dst-prefix to git-formt-patch in git-rebase.sh
2010-09-10 10:25:56 -07:00
Junio C Hamano
69e4b2347c Merge branch 'as/daemon-multi-listen' into next
* as/daemon-multi-listen:
  daemon: allow more than one host address given via --listen
  daemon: add helper function setup_named_sock()
2010-09-10 10:25:56 -07:00
Junio C Hamano
b76b831b70 Merge branch 'bc/fortran-userdiff' into next
* bc/fortran-userdiff:
  userdiff.c: add builtin fortran regex patterns
2010-09-10 10:25:56 -07:00
Junio C Hamano
53ebeba3f0 Merge branch 'kf/post-receive-sample-hook' into next
* kf/post-receive-sample-hook:
  post-receive-email: ensure sent messages are not empty
2010-09-10 10:25:56 -07:00
Junio C Hamano
f91d974a63 Merge branch 'ch/filter-branch-deprecate-remap-to-ancestor' into next
* ch/filter-branch-deprecate-remap-to-ancestor:
  filter-branch: retire --remap-to-ancestor
2010-09-10 10:25:55 -07:00
Junio C Hamano
ba139f1b6d Merge branch 'ch/maint-cannot-create-bundle-error' into next
* ch/maint-cannot-create-bundle-error:
  bundle: detect if bundle file cannot be created
2010-09-10 10:25:55 -07:00
Junio C Hamano
d59f2a298c Merge branch 'master' into next
* master:
  config.txt: fix placement of diff.noprefix
  t/t4018: avoid two unnecessary sub-shell invocations
2010-09-10 09:39:14 -07:00
Junio C Hamano
9ab5a338fc Merge branch 'maint'
* maint:
  config.txt: fix placement of diff.noprefix
2010-09-10 09:39:08 -07:00
Brandon Casey
909a5494f8 userdiff.c: add builtin fortran regex patterns
This adds fortran xfuncname and wordRegex patterns to the list of builtin
patterns.  The intention is for the patterns to be appropriate for all
versions of fortran including 77, 90, 95.  The patterns can be enabled by
adding the diff=fortran attribute to the .gitattributes file for the
desired file glob.

This also adds a new macro named IPATTERN which is just like the PATTERNS
macro except it sets the REG_ICASE flag so that case will be ignored.

The test code in t4018 and the docs were updated as appropriate.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-10 09:38:29 -07:00
Kevin P. Fleming
53cad69105 post-receive-email: ensure sent messages are not empty
Changes the logic in the script to determine whether an email message
will be sent before invoking the send_mail() function; otherwise, if
the logic determines that a message will not be sent, send_mail() will
cause an empty email to be sent. In addition, ensures that if multiple
refs are updated and a message cannot be sent for one of them,
the others are still processed normally.

Signed-off-by: Kevin P. Fleming <kpfleming@digium.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-10 09:37:51 -07:00
Mark Lodato
9904fadfea config.txt: fix placement of diff.noprefix
In git-config(1), diff.noprefix was placed in between
diff.mnemonicprefix and the list of mnemonic prefixes, which is
obviously incorrect and very confusing to readers.  Now, it is located
after the end of the explanation of mnemonicprefix, which makes much
more sense.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-10 09:31:13 -07:00
Brandon Casey
99f55ebc67 t/t4018: avoid two unnecessary sub-shell invocations
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-10 09:30:14 -07:00
Jan Krüger
fb1bb96516 read-tree: deprecate syntax without tree-ish args
Currently, read-tree can be run without tree-ish arguments, in which
case it will empty the index. Since this behavior is undocumented and
perhaps a bit too invasive to be the "default" action for read-tree,
deprecate it in favor of a new --empty option that does the same thing.

Signed-off-by: Jan Krüger <jk@jk.gs>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-10 08:37:14 -07:00
Junio C Hamano
a815a0fd47 Merge branch 'master' into next
* master:
  t/t4018: test whether the word_regex patterns compile
  xdiff-interface.c: always trim trailing space from xfuncname matches
  diff.c: call regfree to free memory allocated by regcomp when necessary
  t/t5510-fetch.sh: improve testing with explicit URL and merge spec
  builtin/fetch.c: comment that branch->remote_name is usable when has_merge
  Makefile: use compat regex on IRIX 6.5
  t/t7008: workaround broken handling of \000 by printf on IRIX
2010-09-09 17:29:45 -07:00
Junio C Hamano
8ac8cf5bc1 Merge branch 'maint'
* maint:
  xdiff-interface.c: always trim trailing space from xfuncname matches
  diff.c: call regfree to free memory allocated by regcomp when necessary
2010-09-09 17:29:40 -07:00
Brandon Casey
bff4206121 t/t4018: test whether the word_regex patterns compile
Previously (e3bf5e43), a test was added to test whether the builtin
xfuncname regular expressions could be compiled without error by regcomp.
Let's do the same for the word_regex patterns.  This should help catch any
cross-platform incompatibilities that exist between the pattern creator's
system and the various platforms that the test suite is commonly run on.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09 17:19:18 -07:00
Brandon Casey
1b6ecbad35 xdiff-interface.c: always trim trailing space from xfuncname matches
Generally, trailing space is removed from the string matched by the
xfuncname patterns.  The exception is when the matched string exceeds the
length of the fixed-size buffer that it will be copied in to.  But, a
string that exceeds the buffer can still contain trailing space in the
portion of the string that will be copied into the buffer.  So, simplify
this code slightly, and just perform the trailing space removal always.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09 17:18:29 -07:00
Brandon Casey
ef5644ea6e diff.c: call regfree to free memory allocated by regcomp when necessary
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09 17:18:04 -07:00
Brandon Casey
042cca3886 t/t5510-fetch.sh: improve testing with explicit URL and merge spec
Commit 6106ce46 introduced a test to demonstrate fetch's failure to
retrieve any objects or update FETCH_HEAD when it was supplied a repository
URL and the current branch had a configured merge spec.  This commit
expands the original test based on comments from Junio Hamano.  In addition
to actually verifying that the fetch updates FETCH_HEAD correctly, and does
not update the current branch, two more tests are added to ensure that the
merge configuration is ignored even when the supplied URL matches the URL
of the remote configured for the branch.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09 17:16:08 -07:00
Brandon Casey
f31dbdc7da builtin/fetch.c: comment that branch->remote_name is usable when has_merge
Save future readers the trouble of tracing code to determine that the two
uses of branch->remote_name are safe when has_merge is set, by adding a
comment explaining that it is so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09 17:15:58 -07:00
Brandon Casey
a1d558d254 Makefile: use compat regex on IRIX 6.5
The IRIX 6.5 regex.h header file defines REG_STARTEND, but the feature does
not appear to work.  Since REG_STARTEND is required for proper functioning
of git-grep, set NO_REGEX and use the alternative regex libraries in compat/

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09 17:11:06 -07:00