Commit graph

22800 commits

Author SHA1 Message Date
Brandon Casey 40919c483a Makefile: link builtins residing in bin directory to main git binary too
To conserve space/improve file caching we try to make hard or symbolic links
from each builtin program to the main git executable rather than having
each be a complete duplicate copy of it.  We weren't doing this for the
builtin programs residing in the bin directory though.  So, let's do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-25 22:33:23 -07:00
Junio C Hamano c4818faf81 Merge branch 'maint-1.7.0' into maint-1.7.1
* maint-1.7.0:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
2010-07-25 21:53:27 -07:00
Junio C Hamano 28bf4ba014 Merge branch 'maint-1.6.6' into maint-1.7.0
* maint-1.6.6:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
2010-07-25 21:52:48 -07:00
Junio C Hamano ad33605406 Merge branch 'maint-1.6.5' into maint-1.6.6
* maint-1.6.5:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
2010-07-25 21:52:29 -07:00
Stephen Boyd d8e3ac7e72 request-pull.txt: Document -p option
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-25 21:52:19 -07:00
Junio C Hamano a07b10c8f9 Merge branch 'maint-1.6.4' into maint-1.6.5
* maint-1.6.4:
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
2010-07-25 21:51:58 -07:00
Greg Brockman 1b0b962d77 Check size of path buffer before writing into it
This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents

  gitdir: (something really long)

Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-25 10:33:47 -07:00
Dan McGee 4bdf85995b git-instaweb: Don't assume Apache executable is named apache2
On Arch Linux, the executable for the Apache HTTP server keeps
the 'httpd' name and is not named 'apache2'. The path to the
server modules also contains 'httpd' rather than 'apache2'.
Remove some of these assumptions and add the httpd name in where
it may be required. Finally, make some slight style adjustments
to the code we are touching to make it fit the style of the rest
of the script.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-07-23 11:16:05 -07:00
Dan McGee 2989f516d5 git-instaweb: Fix Apache environment variable passing
We were passing the non-existent GIT_EXEC_DIR through instead of the real
GIT_EXEC_PATH. In addition, these weren't being passed at all for CGI (non
mod_perl) execution so get them included there as well.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-07-23 11:13:47 -07:00
Dan McGee 1849f01b5b git-instaweb: Fix custom apache log placement
'CustomLog' is provided by mod_log_config so we need to include the module
in our generated config. This was added in d94775e1f9.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-07-23 11:10:21 -07:00
Junio C Hamano 64fdc08dac Git 1.7.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-21 12:55:50 -07:00
Junio C Hamano 6e6842e36f tests: correct "does reflog exist?" tests
These two tests weren't about how "git reflog show <branch>" exits when
there is no reflog, but were about "checkout" and "branch" create or not
create reflog when creating a new <branch>.  Update the tests to check
what we are interested in, using "git rev-parse --verify".

Also lose tests based on "test -f .git/logs/refs/heads/<branch>" from
nearby, to avoid exposing this particular implementation detail
unnecessarily.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-21 12:54:48 -07:00
Brandon Casey b1edaf669d t/: work around one-shot variable assignment with test_must_fail
See e200783255

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-21 11:54:34 -07:00
Jonathan Nieder bdcaa325b4 t/README: correct an exception when breaking a && chain in tests
The correct advice should have been taken from c289c31 (t/t7006: ignore
return status of shell's unset builtin, 2010-06-02).  A real-life issue
we experienced was with "unset", not with "export" (exporting an
unset variable may have similar portability issues, though).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-21 11:52:26 -07:00
Brandon Casey 77b5be2aba t/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail
The '!()' notation is interpreted as a pattern-list on Ksh.  The Ksh man
page describe it as follows:

   !(pattern-list)
      Matches anything except one of the given patterns.

Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list.  If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-20 11:37:45 -07:00
Brandon Casey 460d562eab t/t3700: convert two uses of negation operator '!' to use test_must_fail
These two lines use the negation '!' operator to negate the result of a
simple command.  Since these commands do not contain any pipes or other
complexities, the test_must_fail function can be used and is preferred
since it will additionally detect termination due to a signal.

This was noticed because the second use of '!' does not include a space
between the '!' and the opening parens.  Ksh interprets this as follows:

   !(pattern-list)
      Matches anything except one of the given patterns.

Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list.  If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-20 11:37:26 -07:00
Junio C Hamano 5f7baac1e3 Merge branch 'maint'
* maint:
  t/README: clarify test_must_fail description
  Check size of path buffer before writing into it

Conflicts:
	t/README
2010-07-20 11:29:30 -07:00
Brandon Casey 971ecbd1f8 t/README: clarify test_must_fail description
Some have found the wording of the description to be somewhat ambiguous
with respect to when it is desirable to use test_must_fail instead of
"! <git-command>".  Tweak the wording somewhat to hopefully clarify that
it is _because_ test_must_fail can detect segmentation fault that it is
desirable to use it instead of "! <git-command>".

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-20 11:26:39 -07:00
Greg Brockman 3c9d0414ed Check size of path buffer before writing into it
This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents

  gitdir: (something really long)

Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-20 09:17:39 -07:00
Junio C Hamano c5212b87da Merge branch 'maint'
* maint:
  update-server-info: Shorten read_pack_info_file()
  Documentation: Explain git-mergetool's use of temporary files
2010-07-19 11:21:08 -07:00
Ralf Thielow c173dad587 update-server-info: Shorten read_pack_info_file()
The correct responses to a D and a T line in .git/objects/info/packs
are the same, so combine their case arms.  In both cases we already
‘goto’ out of the switch so while at it, remove a redundant ‘break’
to avoid yet another line of code.

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Reviewed-by: Jonathan Nieder <jrnieder <at> gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:13:52 -07:00
Ævar Arnfjörð Bjarmason f0e5a4b7f3 git add: Add --ignore-missing to SYNOPSIS
All the git add options were listed in the synopsis until the
--ignore-missing option was added. Change that so that the git add
documentation now has the complete listing.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:11:46 -07:00
Ævar Arnfjörð Bjarmason 1f74574ba2 git submodule add: Remove old docs about implicit -f
git submodule add no longer implicitly adds with --force. Remove
references to the old functionality in the documentation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:11:07 -07:00
Jens Lehmann d27b876b28 git submodule add: Require the new --force option to add ignored paths
To make the behavior of "git submodule add" more consistent with "git add"
ignored submodule paths should not be silently added when they match an
entry in a .gitignore file. To be able to override that default behavior
in the same way as we can do that for "git add", the new option "--force"
is introduced.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:10:43 -07:00
Junio C Hamano 8fbe9b32ce Merge branch 'jl/add-n-ignore-missing'
* jl/add-n-ignore-missing:
  git add: Add the "--ignore-missing" option for the dry run
2010-07-19 11:09:38 -07:00
David Aguilar d1cc4621ed Documentation: Explain git-mergetool's use of temporary files
'git mergetool' creates '*.orig' backup files in its
default configuration.  Mention this in its documentation.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 09:16:09 -07:00
Thomas Rast 6e90f7b8df Documentation/reset: move "undo permanently" example behind "make topic"
I consider the latter usage more important.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 09:12:42 -07:00
Thomas Rast 8bb95bbca7 Documentation/reset: reorder examples to match description
A previous commit moved the <paths> mode (undoes git-add) to the front
in the description, so make the examples follow the same order.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 09:12:07 -07:00
Thomas Rast 28bb4b276a Documentation/reset: promote 'examples' one section up
Move the examples section upwards, before the discussion that gives
the gory details.  Adjust the style of the heading accordingly.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 09:10:24 -07:00
Thomas Rast 7b8cd49d5c Documentation/reset: separate options by mode
Remove all but -q from the OPTIONS section, and instead explain the
options separated by usage mode, since they only apply to one each.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 08:11:33 -07:00
Thomas Rast bb59b7fffc Documentation/git-reset: reorder modes for soft-mixed-hard progression
Reorder the documetation so that the soft/mixed/hard modes are in this
order.  This way they form a natural progression towards changing more
of the state.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 08:11:04 -07:00
Sergey Vlasov 8ac3a66702 git-svn: write memoized data explicitly to avoid Storable bug
Apparently using the Storable module during global destruction is
unsafe - there is a bug which can cause segmentation faults:

  http://rt.cpan.org/Public/Bug/Display.html?id=36087
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482355

The persistent memoization support introduced in commit 8bff7c538
relied on global destruction to write cached data, which was leading
to segfaults in some Perl configurations.  Calling Memoize::unmemoize
in the END block forces the cache writeout to be performed earlier,
thus avoiding the bug.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-07-19 06:31:04 +00:00
Junio C Hamano 24e7a5be37 Merge branch 'jc/diff-merge-base-multi'
* jc/diff-merge-base-multi:
  diff A...B: do not limit the syntax too narrowly
2010-07-16 15:45:35 -07:00
Thomas Rast 7ea3ddf818 Only run aggregate-results over actual counts
The current make target 'aggregate-results' scanned all files matching
test-results/t*-*.  Normally these are only the test counts (and the
exit values, which are ignored), but with --tee the suite also dumps
all output.  Furthermore, with --verbose t1450 contains several lines
starting with "broken link from ..." which matches the criteria used
by aggregate-results.sh.

Rename the counts output files to *.counts, and only scan those.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16 13:25:01 -07:00
Jonathan Nieder e605164d1d Add a sample user for the svndump library
The svn-fe tool takes a Subversion dump file as input and produces
a fast-import stream as output.  This can be useful as a low-level
tool in building other importers, or for debugging the vcs-svn
library.

 make svn-fe
 make svn-fe.1

to test.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16 13:21:47 -07:00
Junio C Hamano 7a0e4d7c39 diff A...B: do not limit the syntax too narrowly
Earlier we tried to make sure that the trees we get are what A...B
syntax produced, by checking that earlier ones are all marked
uninteresting (which has to be true as they are merge bases),
there are two remaining ones that are interesting, and they are
marked as non-symmetric-left and symmetric-left respectively.

The "the last two must be interesting" condition is however wrong when one
is an ancestor of the other between A and B (i.e. fast-forward).  In such
a case, one of them is marked uninteresting.
2010-07-16 12:08:27 -07:00
Jonathan Nieder 9644c06163 Export parse_date_basic() to convert a date string to timestamp
approxidate() is not appropriate for reading machine-written dates
because it guesses instead of erroring out on malformed dates.
parse_date() is less convenient since it returns its output as a
string.  So export the underlying function that writes a timestamp.

While at it, change the return value to match the usual convention:
return 0 for success and -1 for failure.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15 15:35:12 -07:00
Junio C Hamano 53b304224a Merge branch 'jn/paginate-fix'
* jn/paginate-fix:
  git --paginate: paginate external commands again
  git --paginate: do not commit pager choice too early
  tests: local config file should be honored from subdirs of toplevel
  t7006: test pager configuration for several git commands
  t7006 (pager): introduce helper for parameterized tests

Conflicts:
	t/t7006-pager.sh
2010-07-15 12:09:14 -07:00
Junio C Hamano ea56a7ed97 Merge branch 'wp/merge-tree-fix'
* wp/merge-tree-fix:
  merge-tree: fix where two branches share no changes
  add basic tests for merge-tree
2010-07-15 12:08:41 -07:00
Junio C Hamano 4bd874c8f3 Merge branch 'js/merge-rr-fix'
* js/merge-rr-fix:
  MERGE_RR is in .git, not .git/rr-cache
2010-07-15 12:08:36 -07:00
Junio C Hamano 4cd1b99c32 Merge branch 'jc/diff-merge-base-multi'
* jc/diff-merge-base-multi:
  diff A...B: give one possible diff when there are more than one merge-base
2010-07-15 12:08:25 -07:00
Junio C Hamano a8b7fcffdd Merge branch 'ns/merge-recursive-uptodate'
* ns/merge-recursive-uptodate:
  merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency
2010-07-15 12:08:11 -07:00
Junio C Hamano c257bbb559 Merge branch 'jn/tests'
* jn/tests:
  t3000 (ls-files -o): modernize style
2010-07-15 12:08:04 -07:00
Junio C Hamano 90a0f1b44b Merge branch 'eb/doc-log-manpage'
* eb/doc-log-manpage:
  Reorganize `git-log' man page to clarify common diff options.
2010-07-15 12:07:56 -07:00
Junio C Hamano a7d7853463 Merge branch 'jn/grep-open'
* jn/grep-open:
  grep -O: Do not pass color sequences as filenames to pager
2010-07-15 12:07:18 -07:00
Junio C Hamano cb597adb5c Merge branch 'mg/revision-doc'
* mg/revision-doc:
  Documentation: link to gitrevisions rather than git-rev-parse
  Documentation: gitrevisions
  Documentation: split off rev doc into include file
2010-07-15 12:07:01 -07:00
Junio C Hamano bff6e86b3d Merge branch 'jk/maint-status-keep-index-timestamp'
* jk/maint-status-keep-index-timestamp:
  do not write out index when status does not have to
2010-07-15 12:06:55 -07:00
Junio C Hamano 754e66b7a0 Merge branch 'jc/rebase-i-commit-msg-fix'
* jc/rebase-i-commit-msg-fix:
  rebase-i: do not get fooled by a log message ending with backslash
  rebase-i: style fix
2010-07-15 12:06:48 -07:00
Junio C Hamano 849865733f Merge branch 'ab/submodule-add-f'
* ab/submodule-add-f:
  git submodule: add submodules with git add -f <path>
2010-07-15 12:06:25 -07:00
Junio C Hamano aa57328d60 Merge branch 'bc/maint-makefile-fixes'
* bc/maint-makefile-fixes:
  Makefile: work around ksh's failure to handle missing list argument to for loop
  Makefile: remove some unnecessary curly braces
2010-07-15 12:06:11 -07:00