Code

git.git
14 years agofix multiple issues with t5300
Nicolas Pitre [Thu, 4 Feb 2010 03:48:26 +0000 (22:48 -0500)]
fix multiple issues with t5300

First of all, trying to run 'git verify-pack' on packs  produced by
the tests using pack.packSizeLimit always failed.  After lots of digging
and head scratching, it turns out that the preceeding test simulating
a SHA1 collision did leave the repository quite confused, impacting
subsequent tests.

So let's move that destructive test last, and add tests to run
verify-pack on the output from those packSizeLimit tests to catch such
goofage.

Finally, group those packSizeLimit tests together.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Simplify (and fix) chop_str
John 'Warthog9' Hawley [Wed, 3 Feb 2010 11:28:28 +0000 (12:28 +0100)]
gitweb: Simplify (and fix) chop_str

The chop_str subroutine is meant to be used on strings (such as commit
description / title) *before* HTML escaping, which means before
applying esc_html or equivalent.

Therefore get rid of the failed attempt to always remove full HTML
entities (like e.g. &amp; or &nbsp;).  It is not necessary (HTML
entities gets added later), and it can cause chop_str to chop a string
incorrectly.

Specifically:

     API & protocol: support option to force written data immediately to disk

from http://git.kernel.org/?p=daemon/distsrv/chunkd.git;a=commit;h=3b02f749df2cb1288f345a689d85e7061f507e54

The short version of the title gets chopped to

     API ...

where it should be

     API & protocol: support option to force written data...

Noticed-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitk: Fix copyright symbol in About box message
Paul Mackerras [Wed, 3 Feb 2010 21:49:00 +0000 (08:49 +1100)]
gitk: Fix copyright symbol in About box message

Somehow it got corrupted in commit d93f1713 ("gitk: Use themed tk
widgets").

Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogrep: simplify assignment of ->fixed
René Scharfe [Wed, 3 Feb 2010 18:16:30 +0000 (19:16 +0100)]
grep: simplify assignment of ->fixed

After 885d211e, the value of the ->fixed pattern option only depends on
the grep option of the same name.  Regex flags don't matter any more,
because fixed mode and regex mode are strictly separated.  Thus we can
simply copy the value from struct grep_opt to struct grep_pat, as we do
already for ->word_regexp and ->ignore_case.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'ms/filter-branch-submodule'
Junio C Hamano [Wed, 3 Feb 2010 05:48:34 +0000 (21:48 -0800)]
Merge branch 'ms/filter-branch-submodule'

* ms/filter-branch-submodule:
  filter-branch: Add tests for submodules in tree-filter
  filter-branch: Fix to allow replacing submodules with another content

14 years agoMerge branch 'jh/gitweb-caching' (early part)
Junio C Hamano [Wed, 3 Feb 2010 05:48:22 +0000 (21:48 -0800)]
Merge branch 'jh/gitweb-caching' (early part)

* 'jh/gitweb-caching' (early part):
  gitweb: Add optional extra parameter to die_error, for extended explanation
  gitweb: add a "string" variant of print_sort_th
  gitweb: add a "string" variant of print_local_time
  gitweb: Check that $site_header etc. are defined before using them
  gitweb: Makefile improvements
  gitweb: Load checking
  gitweb: Make running t9501 test with '--debug' reliable and usable

14 years agoMerge branch 'bw/no-python-autoconf'
Junio C Hamano [Wed, 3 Feb 2010 05:48:13 +0000 (21:48 -0800)]
Merge branch 'bw/no-python-autoconf'

* bw/no-python-autoconf:
  configure: Allow --without-python
  configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM

14 years agoMerge branch 'sp/fast-import-large-blob'
Junio C Hamano [Wed, 3 Feb 2010 05:47:51 +0000 (21:47 -0800)]
Merge branch 'sp/fast-import-large-blob'

* sp/fast-import-large-blob:
  fast-import: Stream very large blobs directly to pack

14 years agoCorrect spelling of 'REUC' extension
Shawn O. Pearce [Tue, 2 Feb 2010 15:33:28 +0000 (07:33 -0800)]
Correct spelling of 'REUC' extension

The new dircache extension CACHE_EXT_RESOLVE_UNDO, whose value is
0x52455543, is actually the ASCII sequence 'REUC', not the ASCII
sequence 'REUN'.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-gui: update french translation
Emmanuel Trillaud [Tue, 2 Feb 2010 11:59:34 +0000 (12:59 +0100)]
git-gui: update french translation

Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoJakub's changes broke the progress message slightly.
Avery Pennarun [Tue, 2 Feb 2010 15:30:11 +0000 (10:30 -0500)]
Jakub's changes broke the progress message slightly.

We really need that ^M (\r), not a ^J (\n) if we want the status message to
overwrite itself nicely.

14 years agoMerge branch 'master' of git://github.com/psionides/git-subtree
Avery Pennarun [Tue, 2 Feb 2010 15:25:58 +0000 (10:25 -0500)]
Merge branch 'master' of git://github.com/psionides/git-subtree

* 'master' of git://github.com/psionides/git-subtree:
  improved rev_is_descendant_of_branch() function
  added temporary test dirs to gitignore
  added tests for recent changes
  fixed bug in commit message for split
  changed alias for --prefix from -p to -P
  fix for subtree split not finding proper base for new commits
  allow using --branch with existing branches if it makes sense
  added -m/--message option for setting merge commit message
  added -p alias for --prefix

14 years agoFix refspecs in given example for git subtree pull.
Arlen Cuss [Tue, 19 Jan 2010 19:51:19 +0000 (12:51 -0700)]
Fix refspecs in given example for git subtree pull.

(Updated slightly by apenwarr)

14 years agogit-gui: update Japanese translation
Nanako Shiraishi [Tue, 2 Feb 2010 10:20:21 +0000 (19:20 +0900)]
git-gui: update Japanese translation

Update ja.po to match 2010-01-26 version of pot file.

Signed-off-by: しらいし ななこ <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agobuild: make code "-Wpointer-arith" clean
Junio C Hamano [Tue, 2 Feb 2010 06:04:03 +0000 (22:04 -0800)]
build: make code "-Wpointer-arith" clean

Recently introduced resolve_undo_read() expected arithmetic to (void *)
to work on byte-addresses.  Correct this.

Noticed by Brandon Casey.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconfigure: Allow --without-python
Ben Walton [Mon, 1 Feb 2010 02:15:05 +0000 (21:15 -0500)]
configure: Allow --without-python

This patch allows someone to use configure to build git while at the
same time disabling the python remote helper code.  It leverages the
ability of GIT_ARG_SET_PATH to accept an optional second argument
indicating that --without-$PROGRAM is acceptable.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconfigure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM
Ben Walton [Mon, 1 Feb 2010 02:15:04 +0000 (21:15 -0500)]
configure: Allow GIT_ARG_SET_PATH to handle --without-PROGRAM

Add an optional second argument to both GIT_ARG_SET_PATH and
GIT_CONF_APPEND_PATH such that any value of the second argument will
enable configure to set NO_$PROGRAM in addition to an empty
$PROGRAM_PATH.  This is initially useful for allowing configure to
disable the use of python, as the remote helper code has nothing
leveraging it yet.

The Makefile already recognizes NO_PYTHON, but configure provided no
way to set it appropriately.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'sp/maint-fast-import-large-blob' into sp/fast-import-large-blob
Junio C Hamano [Mon, 1 Feb 2010 20:41:31 +0000 (12:41 -0800)]
Merge branch 'sp/maint-fast-import-large-blob' into sp/fast-import-large-blob

* sp/maint-fast-import-large-blob:
  fast-import: Stream very large blobs directly to pack
  bash: don't offer remote transport helpers as subcommands

Conflicts:
fast-import.c

14 years agofast-import: Stream very large blobs directly to pack
Shawn O. Pearce [Mon, 1 Feb 2010 17:27:35 +0000 (09:27 -0800)]
fast-import: Stream very large blobs directly to pack

If a blob is larger than the configured big-file-threshold, instead
of reading it into a single buffer obtained from malloc, stream it
onto the end of the current pack file.  Streaming the larger objects
into the pack avoids the 4+ GiB memory footprint that occurs when
fast-import is processing 2+ GiB blobs.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-p4: Fix sync errors due to new server version
Pal-Kristian Engstad [Fri, 22 Jan 2010 02:33:00 +0000 (18:33 -0800)]
git-p4: Fix sync errors due to new server version

Fix sync errors due to new Perforce servers.

The P4D/NTX64/2009.2/228098 (2009/12/16) server reports
'move/delete' instead of 'delete'. This causes the Perforce
depot and the git repo to get out of sync. Fixed by adding
the new status string.

Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdates for dirty submodules in release notes and user manual
Jens Lehmann [Mon, 1 Feb 2010 18:09:39 +0000 (19:09 +0100)]
Updates for dirty submodules in release notes and user manual

In the release notes "git status" was not mentioned, also shortly explain
the "-dirty" output generated by diff.

Added a paragraph to the "Pitfalls with submodules" section in
user-manual.txt describing new and old behavior of "git status" and "git
diff" for dirty submodules.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'sb/maint-octopus' into maint-1.6.5
Junio C Hamano [Mon, 1 Feb 2010 08:06:11 +0000 (00:06 -0800)]
Merge branch 'sb/maint-octopus' into maint-1.6.5

* sb/maint-octopus:
  octopus: remove dead code
  octopus: reenable fast-forward merges
  octopus: make merge process simpler to follow

14 years agoMerge branch 'bg/maint-add-all-doc' into maint-1.6.5
Junio C Hamano [Mon, 1 Feb 2010 08:04:12 +0000 (00:04 -0800)]
Merge branch 'bg/maint-add-all-doc' into maint-1.6.5

* bg/maint-add-all-doc:
  git-rm doc: Describe how to sync index & work tree
  git-add/rm doc: Consistently back-quote
  Documentation: 'git add -A' can remove files

14 years agoMakefile: always remove .depend directories on 'make clean'
Jonathan Nieder [Sun, 31 Jan 2010 21:37:25 +0000 (15:37 -0600)]
Makefile: always remove .depend directories on 'make clean'

Even if COMPUTE_HEADER_DEPENDENCIES is not set, some .o.d files
might be lying around from previous builds when it was.  This
is especially likely because using the CHECK_HEADER_DEPENDENCIES
feature requires building sometimes with COMPUTE... on and
sometimes with it off.  At the end of such an exercise, to get
a blank slate, the user ought to be able to just run 'make clean'.
Make it so.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMakefile: tuck away generated makefile fragments in .depend
Jonathan Nieder [Sun, 31 Jan 2010 21:23:53 +0000 (15:23 -0600)]
Makefile: tuck away generated makefile fragments in .depend

When building with COMPUTE_HEADER_DEPENDENCIES on, save
dependency information to .depend/ instead of deps/ so it does
not show up in ‘ls’ output.  Otherwise, the extra directories can
be distracting.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.0
Junio C Hamano [Sun, 31 Jan 2010 20:20:30 +0000 (12:20 -0800)]
Update draft release notes to 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'dm/make-threaded-simplify'
Junio C Hamano [Sun, 31 Jan 2010 20:09:35 +0000 (12:09 -0800)]
Merge branch 'dm/make-threaded-simplify'

* dm/make-threaded-simplify:
  Make NO_PTHREADS the sole thread configuration variable

14 years agoDo not install shell libraries executable
Jonathan Nieder [Sun, 31 Jan 2010 19:46:53 +0000 (11:46 -0800)]
Do not install shell libraries executable

Some scripts are expected to be sourced instead of executed on their own.
Avoid some confusion by not marking them executable.

The executable bit was confusing the valgrind support of our test scripts,
which assumed that any executable without a #!-line should be intercepted
and run through valgrind.  So during valgrind-enabled tests, any script
sourcing these files actually sourced the valgrind interception script
instead.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake NO_PTHREADS the sole thread configuration variable
Dan McGee [Sat, 30 Jan 2010 01:22:19 +0000 (19:22 -0600)]
Make NO_PTHREADS the sole thread configuration variable

When the first piece of threaded code was introduced in commit 8ecce684, it
came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,
more threaded code has come into the codebase and a NO_PTHREADS option has
also been added. Get rid of the original option as the newer, more generic
option covers everything we need.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoRPM packaging: use %global inside %{!?...}
Junio C Hamano [Sun, 31 Jan 2010 19:11:16 +0000 (11:11 -0800)]
RPM packaging: use %global inside %{!?...}

According to
https://www.redhat.com/archives/fedora-devel-list/2010-January/msg00093.html

scope of %define lasts until the end brace; earlier RPM up to Fedora 12
didn't necessarily honor the scope, but later versions corrected the bug.

Problem and solution both pointed out by Todd Zullinger.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomention new shell execution behavior in release notes
Jeff King [Sun, 31 Jan 2010 09:14:46 +0000 (04:14 -0500)]
mention new shell execution behavior in release notes

This is already in the "bells and whistles" section, but it also has a
slight chance of breakage, so let's also mention it in the "changed
behaviors" section.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix memory leak in submodule.c
Jens Lehmann [Sun, 31 Jan 2010 16:43:49 +0000 (17:43 +0100)]
Fix memory leak in submodule.c

The strbuf used in add_submodule_odb() was never released. So for every
submodule - populated or not - we leaked its object directory name when
using "git diff*" with the --submodule option.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix typos in technical documentation.
Ralf Wildenhues [Sun, 31 Jan 2010 13:24:39 +0000 (14:24 +0100)]
Fix typos in technical documentation.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agolib-patch-mode.sh: Fix permission
Junio C Hamano [Sun, 31 Jan 2010 00:04:25 +0000 (16:04 -0800)]
lib-patch-mode.sh: Fix permission

In the same sprit as 4848509 (Fix permissions on test scripts,
2007-04-13), t/lib-patch-mode.sh should not be executable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge commit 'b319ef7' into jc/maint-fix-test-perm
Junio C Hamano [Sun, 31 Jan 2010 00:03:10 +0000 (16:03 -0800)]
Merge commit 'b319ef7' into jc/maint-fix-test-perm

* commit 'b319ef7': (8132 commits)
  Add a small patch-mode testing library
  git-apply--interactive: Refactor patch mode code
  t8005: Nobody writes Russian in shift_jis
  Fix severe breakage in "git-apply --whitespace=fix"
  Update release notes for 1.6.4
  After renaming a section, print any trailing variable definitions
  Make section_name_match start on '[', and return the length on success
  send-email: detect cycles in alias expansion
  Show the presence of untracked files in the bash prompt.
  SunOS grep does not understand -C<n> nor -e
  Fix export_marks() error handling.
  git repack: keep commits hidden by a graft
  Add a test showing that 'git repack' throws away grafted-away parents
  git branch: clean up detached branch handling
  git branch: avoid unnecessary object lookups
  git branch: fix performance problem
  git svn: fix shallow clone when upstream revision is too new
  do_one_ref(): null_sha1 check is not about broken ref
  configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing
  janitor: useless checks before free
  ...

14 years agot6000lib: Fix permission
Junio C Hamano [Sat, 30 Jan 2010 23:59:09 +0000 (15:59 -0800)]
t6000lib: Fix permission

4848509 (Fix permissions on test scripts, 2007-04-13) forgot to make
this included file non-executable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Add optional extra parameter to die_error, for extended explanation
John 'Warthog9' Hawley [Sat, 30 Jan 2010 22:30:44 +0000 (23:30 +0100)]
gitweb: Add optional extra parameter to die_error, for extended explanation

Add a 3rd, optional, parameter to die_error to allow for extended error
information to be output along with what the error was.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: add a "string" variant of print_sort_th
John 'Warthog9' Hawley [Sat, 30 Jan 2010 22:30:43 +0000 (23:30 +0100)]
gitweb: add a "string" variant of print_sort_th

Add a function (named format_sort_th) that returns the string that
print_sort_th would print.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: add a "string" variant of print_local_time
John 'Warthog9' Hawley [Sat, 30 Jan 2010 22:30:42 +0000 (23:30 +0100)]
gitweb: add a "string" variant of print_local_time

Add a function (named format_local_time) that returns the string that
print_local_time would print.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Check that $site_header etc. are defined before using them
John 'Warthog9' Hawley [Sat, 30 Jan 2010 22:30:41 +0000 (23:30 +0100)]
gitweb: Check that $site_header etc. are defined before using them

If one of $site_header, $site_footer or $home_text is not defined, you
get extraneous errors in the web logs, for example (line wrapped for
better readibility):

 [Wed Jan 13 16:55:42 2010] [error] [client ::1] [Wed Jan 13 16:55:42 2010]
 gitweb.cgi: Use of uninitialized value $site_header in -f at
 /var/www/gitweb/gitweb.cgi line 3287., referer: http://git/gitweb.cgi

This ensures that those variables are defined before trying to use it.

Note that such error can happen only because of an error in gitweb
config file; building gitweb.cgi can make mentioned variables holding
empty string (it is even the default), but they are still defined.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Makefile improvements
John 'Warthog9' Hawley [Sat, 30 Jan 2010 22:30:40 +0000 (23:30 +0100)]
gitweb: Makefile improvements

Adjust the main Makefile so you can simply run

     make gitweb

which in turn calls gitweb/Makefile.  This means that in order to
generate gitweb, you can simply run 'make' from gitweb subdirectory:

     cd gitweb
     make

Targets gitweb/gitweb.cgi and (dependent on JSMIN being defined)
gitweb/gitweb.min.js in main Makefile are preserved for backward
compatibility.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Load checking
John 'Warthog9' Hawley [Sat, 30 Jan 2010 22:30:39 +0000 (23:30 +0100)]
gitweb: Load checking

This changes slightly the behavior of gitweb, so that it verifies
that the box isn't inundated with before attempting to serve gitweb.
If the box is overloaded, it basically returns a 503 Server Unavailable
until the load falls below the defined threshold.  This helps dramatically
if you have a box that's I/O bound, reaches a certain load and you
don't want gitweb, the I/O hog that it is, increasing the pain the
server is already undergoing.

This behavior is controlled by $maxload configuration variable.
Default is a load of 300, which for most cases should never be hit.
Unset it (set it to undefined value, i.e. undef) to turn off checking.

Currently it requires that '/proc/loadavg' file exists, otherwise the
load check is bypassed (load is taken to be 0).  So platforms that do
not implement '/proc/loadavg' currently cannot use this feature
(provisions are included for additional checks to be added by others).

There is simple test in t/t9501-gitweb-standalone-http-status.sh to
check that it correctly returns "503 Service Unavailable" if load is
too high, and also if there are any Perl warnings or errors.

Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Make running t9501 test with '--debug' reliable and usable
Jakub Narebski [Sat, 30 Jan 2010 22:30:38 +0000 (23:30 +0100)]
gitweb: Make running t9501 test with '--debug' reliable and usable

Remove test_debug lines after 'snapshots: tgz only default format
enabled' and 'snapshots: all enabled in default, use default disabled
value' tests.  Those tests constitute of multiple gitweb_run
invocation, therefore outputting gitweb.output for the last gitweb_run
wouldn't help much in debugging test failure, and can only confuse.

For snapshot tests which check for "200 OK" status, change
  test_debug 'cat gitweb.output'
to
  test_debug 'cat gitweb.headers'
Otherwise when running this test with '--debug' option,
t/t9501-gitweb-standalone-http-status.sh would dump *binary data* (the
snapshot itself) to standard output, which can mess up state of terminal
due to term control characters which can be embedded in output.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agois_submodule_modified(): fix breakage with external GIT_INDEX_FILE v1.7.0-rc1
Junio C Hamano [Sat, 30 Jan 2010 20:08:26 +0000 (12:08 -0800)]
is_submodule_modified(): fix breakage with external GIT_INDEX_FILE

Even when the environment was given for the top-level process, checking
in the submodule work tree should use the index file associated with the
work tree of the submodule.  Do not export it to the environment.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoRPM packaging: don't include foreign-scm-helper bits yet
Junio C Hamano [Sat, 30 Jan 2010 17:45:11 +0000 (09:45 -0800)]
RPM packaging: don't include foreign-scm-helper bits yet

The files in /usr/lib/python* are only the support infrastructure for
foreign scm interface yet to be written and/or shipped with git.  Don't
include them in the binary package (this will also free us from Python
dependency).

When we ship with foreign scm interface, we will need to package these
files with it in a separate subpackage, but we are not there yet.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep: Fix two memory leaks
Dan McGee [Sat, 30 Jan 2010 15:42:58 +0000 (09:42 -0600)]
grep: Fix two memory leaks

We duplicate the grep_opt structure when using grep threads, but didn't
later free either the patterns attached to this new structure or the
structure itself.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorebase: don't invoke the pager for each commit summary
Markus Heidelberg [Sat, 30 Jan 2010 16:23:37 +0000 (17:23 +0100)]
rebase: don't invoke the pager for each commit summary

This regression was introduced by commit 0aa958d (rebase: replace
antiquated sed invocation, 2010-01-24), which changed the invocation of
"git rev-list | sed" to "git log".

It can be reproduced by something like this:
$ git rebase -s recursive origin/master

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.0
Junio C Hamano [Sat, 30 Jan 2010 07:38:31 +0000 (23:38 -0800)]
Update draft release notes to 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sat, 30 Jan 2010 07:36:17 +0000 (23:36 -0800)]
Merge branch 'maint'

* maint:
  fix memcpy of overlapping area

14 years agoMerge branch 'maint-1.6.5' into maint
Junio C Hamano [Sat, 30 Jan 2010 07:36:13 +0000 (23:36 -0800)]
Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
  fix memcpy of overlapping area

14 years agorequest-pull: avoid mentioning that the start point is a single commit
Miklos Vajna [Fri, 29 Jan 2010 14:17:59 +0000 (15:17 +0100)]
request-pull: avoid mentioning that the start point is a single commit

Previously we ran shortlog on the start commit which always printed
"(1)" after the start commit, which gives no information, but makes the
output less easy to read.  Instead of giving the author name of the
commit, use the space for committer timestamp to help recipient judge
the freshness of the offered branch more easily.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoReword "detached HEAD" notification
Junio C Hamano [Sat, 30 Jan 2010 06:03:24 +0000 (22:03 -0800)]
Reword "detached HEAD" notification

The old "advice" message explained how to create a branch after going into
a detached HEAD state but didn't make it clear why the user may want to do
so.  Also "moving to ... which isn't a local branch" was unclear if it is
complaining, if it is describing the new state, or if it is explaining why
the HEAD is detached (the true reason is the last one).

Give the established phrase 'detached HEAD' first to make it easy for
users to look up the concept in documentation, and briefly describe what
can be done in the state (i.e. play around without having to clean up)
before telling the user how to keep what was done during the temporary
state.

Allow the long description to be hidden by setting advice.detachedHead
configuration to false.

We might want to customize the advice depending on how the commit to check
out was spelled (e.g. instead of "new-branch-name", we way want to say
"topic" when "git checkout origin/topic" triggered this message) in later
updates, but this encapsulates that into a separate function and it should
be a good first step.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoImplement pthread_cond_broadcast on Windows
Johannes Sixt [Fri, 29 Jan 2010 23:54:05 +0000 (00:54 +0100)]
Implement pthread_cond_broadcast on Windows

See http://www.cse.wustl.edu/~schmidt/win32-cv-1.html, section "The
SignalObjectAndWait solution". But note that this implementation does not
use SignalObjectAndWait (which is needed to achieve fairness, but we do
not need fairness).

Note that our implementations of pthread_cond_broadcast and
pthread_cond_signal require that they are invoked with the mutex held that
is used in the pthread_cond_wait calls.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoIf deriving SVN_SSH from GIT_SSH on msys, also add quotes
Sebastian Schuberth [Sat, 23 Jan 2010 14:20:28 +0000 (15:20 +0100)]
If deriving SVN_SSH from GIT_SSH on msys, also add quotes

In contrast to GIT_SSH, SVN_SSH requires quotes for paths that contain
spaces. As GIT_SSH will not work if it contains quotes, it is safe to
assume it never contains quotes. Also, adding quotes to SVN_SSH for paths
that do not contain spaces does no harm. So we always add quotes when
deriving SVN_SSH from GIT_SSH on msys.

This fixes msysGit issue 385, see
http://code.google.com/p/msysgit/issues/detail?id=385

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Fri, 29 Jan 2010 20:57:44 +0000 (12:57 -0800)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Update German translation
  gitk: Add French translation
  gitk: update Italian translation
  gitk: Update Swedish translation
  gitk: Adjust two equal strings which differed in whitespace
  gitk: Display submodule diffs with appropriate encoding
  gitk: Fix display of newly-created tags
  gitk: Enable gitk to create tags with messages
  gitk: Update Hungarian translation
  gitk: Add Hungarian translation
  gitk: Add "--no-replace-objects" option

14 years agoadd shebang line to git-mergetool--lib.sh
Jeff King [Fri, 29 Jan 2010 10:37:23 +0000 (05:37 -0500)]
add shebang line to git-mergetool--lib.sh

Even though this script is expected to be sourced instead of
executed on its own, the #!/bin/sh line provides simple
documentation about what format the file is in.

In particular, the lack of such a line was confusing the
valgrind support of our test scripts, which assumed that any
executable without a #!-line should be intercepted and run
through valgrind. So during valgrind-enabled tests, any
script sourcing this file actually sourced the valgrind
interception script instead.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofix off-by-one allocation error
Jeff King [Fri, 29 Jan 2010 10:31:30 +0000 (05:31 -0500)]
fix off-by-one allocation error

Caught by valgrind in t5516. Reading the code shows we
malloc enough for our string, but not trailing NUL.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofix memcpy of overlapping area
Jeff King [Fri, 29 Jan 2010 10:28:44 +0000 (05:28 -0500)]
fix memcpy of overlapping area

Caught by valgrind in t5500, but it is pretty obvious from
reading the code that this is shifting elements of an array
to the left, which needs memmove.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Shawn O. Pearce [Fri, 29 Jan 2010 15:58:56 +0000 (07:58 -0800)]
Merge branch 'maint'

* maint:
  git-gui: fix shortcut for menu "Commit/Revert Changes"

14 years agogit-gui: fix shortcut for menu "Commit/Revert Changes"
Heiko Voigt [Fri, 29 Jan 2010 15:57:48 +0000 (16:57 +0100)]
git-gui: fix shortcut for menu "Commit/Revert Changes"

The shortcut was not properly recognized previously.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogitk: Update German translation
Christian Stimming [Fri, 29 Jan 2010 11:55:14 +0000 (22:55 +1100)]
gitk: Update German translation

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogitk: Add French translation
Emmanuel Trillaud [Tue, 12 Jan 2010 13:02:50 +0000 (14:02 +0100)]
gitk: Add French translation

Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
Signed-off-by: Thomas Moulard <thomas.moulard@gmail.com>
Signed-off-by: Guy Brand <gb@unistra.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogitk: update Italian translation
Michele Ballabio [Fri, 29 Jan 2010 11:51:28 +0000 (22:51 +1100)]
gitk: update Italian translation

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogitk: Update Swedish translation
Peter Krefting [Fri, 29 Jan 2010 11:50:29 +0000 (22:50 +1100)]
gitk: Update Swedish translation

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogit-gui: Quote git path when starting another gui in a submodule
Jens Lehmann [Thu, 28 Jan 2010 21:20:39 +0000 (22:20 +0100)]
git-gui: Quote git path when starting another gui in a submodule

In do_git_gui the path of the git executable has to be put into a
list, otherwise calling it will fail when when spaces are present
in its path.

Reported-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoMerge branch 'maint'
Junio C Hamano [Thu, 28 Jan 2010 22:33:33 +0000 (14:33 -0800)]
Merge branch 'maint'

* maint:
  bash: don't offer remote transport helpers as subcommands

14 years agobash: support 'git notes' and its subcommands
SZEDER Gábor [Thu, 28 Jan 2010 01:05:55 +0000 (02:05 +0100)]
bash: support 'git notes' and its subcommands

... and it will offer refs unless after -m or -F, because these two
options require a non-ref argument.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofilter-branch: Add tests for submodules in tree-filter
Michal Sojka [Thu, 28 Jan 2010 09:08:47 +0000 (10:08 +0100)]
filter-branch: Add tests for submodules in tree-filter

Add tests to make sure that:

1) a submodule can be removed and its content replaced with regular files
   ('rewrite submodule with another content'). This test passes only with
   the previous patch applied.

2) it is possible to replace submodule revision by direct index
   manipulation ('replace submodule revision'). Although it would be
   better to run such a filter in --index-filter, this test shows that
   this functionality is not broken by the previous patch. This succeeds
   both with and without the previous patch.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofilter-branch: Fix to allow replacing submodules with another content
Michal Sojka [Thu, 28 Jan 2010 09:08:46 +0000 (10:08 +0100)]
filter-branch: Fix to allow replacing submodules with another content

When git filter-branch is used to replace a submodule with another
content, it always fails on the first commit.

Consider a repository with submod directory containing a submodule.  The
following command to remove the submodule and replace it with a file fails:

    git filter-branch --tree-filter 'rm -rf submod &&
                                     git rm -q submod &&
                                     mkdir submod &&
                                     touch submod/file'

with an error:

    error: submod: is a directory - add files inside instead

The reason is that git diff-index, which generates the first part of the
list of files updated by the tree filter, emits also the removed submodule
even if it was replaced by a real directory.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agobash: don't offer remote transport helpers as subcommands
SZEDER Gábor [Fri, 22 Jan 2010 10:54:51 +0000 (11:54 +0100)]
bash: don't offer remote transport helpers as subcommands

Since commits a2d725b7 (Use an external program to implement fetching
with curl, 2009-08-05) and c9e388bb (Make the
"traditionally-supported" URLs a special case, 2009-09-03) remote
transport helpers like 'remote-ftp' and 'remote-curl' are offered by the
completion script as available subcommands.  Not good, since they are
helpers, therefore should not be offered, so filter them out.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogrep --quiet: finishing touches
Junio C Hamano [Thu, 28 Jan 2010 20:33:42 +0000 (12:33 -0800)]
grep --quiet: finishing touches

Name the option "--quiet" not "--quick", document it, and add tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoreject @{-1} not at beginning of object name
Jeff King [Thu, 28 Jan 2010 09:56:43 +0000 (04:56 -0500)]
reject @{-1} not at beginning of object name

Something like foo@{-1} is nonsensical, as the @{-N} syntax
is reserved for "the Nth last branch", and is not an actual
reflog selector. We should not feed such nonsense to
approxidate at all.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofix parsing of @{-1}@{u} combination
Jeff King [Thu, 28 Jan 2010 09:52:22 +0000 (04:52 -0500)]
fix parsing of @{-1}@{u} combination

Previously interpret_branch_name would see @{-1} and stop
parsing, leaving the @{u} as cruft that provoked an error.
Instead, we should recurse if there is more to parse.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotest combinations of @{} syntax
Jeff King [Thu, 28 Jan 2010 09:50:20 +0000 (04:50 -0500)]
test combinations of @{} syntax

Now that we have several different types of @{} syntax, it
is a good idea to test them together, which reveals some
failures.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorerere: fix too-short initialization
Jeff King [Thu, 28 Jan 2010 14:52:16 +0000 (09:52 -0500)]
rerere: fix too-short initialization

This was caused by a typo in the sizeof parameter, and meant
we looked at uninitialized memory.  Caught by valgrind in
t2030.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-gui: update Italian translation
Michele Ballabio [Mon, 7 Sep 2009 16:45:16 +0000 (18:45 +0200)]
git-gui: update Italian translation

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: Update Swedish translation (520t0f0u)
Peter Krefting [Thu, 28 Jan 2010 12:57:34 +0000 (13:57 +0100)]
git-gui: Update Swedish translation (520t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agot0101: use absolute date
Jeff King [Thu, 28 Jan 2010 08:52:18 +0000 (03:52 -0500)]
t0101: use absolute date

The original version used relative approxidates, which don't
reproduce as reliably as absolute ones. Commit 6c647a fixed
this for one case, but missed the "silly" case.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'fk/threaded-grep'
Junio C Hamano [Thu, 28 Jan 2010 08:46:45 +0000 (00:46 -0800)]
Merge branch 'fk/threaded-grep'

* fk/threaded-grep:
  Threaded grep
  grep: expose "status-only" feature via -q

14 years agoMerge branch 'gp/maint-cvsserver'
Junio C Hamano [Thu, 28 Jan 2010 08:46:33 +0000 (00:46 -0800)]
Merge branch 'gp/maint-cvsserver'

* gp/maint-cvsserver:
  git-cvsserver: allow regex metacharacters in CVSROOT

14 years agotests: update tests that used to fail
Junio C Hamano [Thu, 28 Jan 2010 08:41:52 +0000 (00:41 -0800)]
tests: update tests that used to fail

"diff --cc" output t4038 tests was fixed by b810cbb (diff --cc: a lost
line at the beginning of the file is shown incorrectly, 2009-07-22), which
was actually the commit that introduced this test..

An error in "git merge -s resolve" t6035 tests was fixed by 730f728
(unpack-trees.c: look ahead in the index, 2009-09-20).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-gui: use themed tk widgets with Tk 8.5
Pat Thoyts [Tue, 26 Jan 2010 00:05:31 +0000 (00:05 +0000)]
git-gui: use themed tk widgets with Tk 8.5

This patch enables the use of themed Tk widgets with Tk 8.5 and above.
These make a significant difference on Windows in making the
application appear native. On Windows and MacOSX ttk defaults to the
native look as much as possible. On X11 the user may select a theme
using the TkTheme XRDB resource class by adding an line to the
.Xresources file. The set of installed theme names is available using
the Tk command 'ttk::themes'. The default on X11 is similar to the current
un-themed style - a kind of thin bordered motif look.

A new git config variable 'gui.usettk' may be set to disable this if
the user prefers the classic Tk look. Using Tk 8.4 will also avoid the
use of themed widgets as these are only available since 8.5.

Some support is included for Tk 8.6 features (themed spinbox and native
font chooser for MacOSX and Windows).

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: Update German translation (12 new or changed strings).
Christian Stimming [Tue, 26 Jan 2010 21:26:45 +0000 (22:26 +0100)]
git-gui: Update German translation (12 new or changed strings).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoMerge branch 'jc/upstream-reflog'
Junio C Hamano [Wed, 27 Jan 2010 22:58:21 +0000 (14:58 -0800)]
Merge branch 'jc/upstream-reflog'

* jc/upstream-reflog:
  Fix log -g this@{upstream}

14 years agoMerge branch 'jc/maint-reflog-bad-timestamp'
Junio C Hamano [Wed, 27 Jan 2010 22:57:37 +0000 (14:57 -0800)]
Merge branch 'jc/maint-reflog-bad-timestamp'

* jc/maint-reflog-bad-timestamp:
  t0101: use a fixed timestamp when searching in the reflog
  Update @{bogus.timestamp} fix not to die()
  approxidate_careful() reports errorneous date string

14 years agoMerge branch 'il/maint-colon-address'
Junio C Hamano [Wed, 27 Jan 2010 22:56:42 +0000 (14:56 -0800)]
Merge branch 'il/maint-colon-address'

* il/maint-colon-address:
  Allow use of []-wrapped addresses in git://
  Support addresses with ':' in git-daemon

14 years agoMerge branch 'il/maint-xmallocz'
Junio C Hamano [Wed, 27 Jan 2010 22:56:38 +0000 (14:56 -0800)]
Merge branch 'il/maint-xmallocz'

* il/maint-xmallocz:
  Fix integer overflow in unpack_compressed_entry()
  Fix integer overflow in unpack_sha1_rest()
  Fix integer overflow in patch_delta()
  Add xmallocz()

14 years agoMerge branch 'jh/maint-config-file-prefix'
Junio C Hamano [Wed, 27 Jan 2010 22:56:25 +0000 (14:56 -0800)]
Merge branch 'jh/maint-config-file-prefix'

* jh/maint-config-file-prefix:
  builtin-config: Fix crash when using "-f <relative path>" from non-root dir

14 years agotransport_get(): drop unnecessary check for !remote
Junio C Hamano [Wed, 27 Jan 2010 20:22:37 +0000 (12:22 -0800)]
transport_get(): drop unnecessary check for !remote

At the beginning of the function we make sure remote is not NULL, and
the remainder of the funciton already depends on it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix remote.<remote>.vcs
Ilari Liusvaara [Wed, 27 Jan 2010 17:53:17 +0000 (19:53 +0200)]
Fix remote.<remote>.vcs

remote.<remote>.vcs causes remote->foreign_vcs to be set on entry to
transport_get(). Unfortunately, the code assumed that any such entry
is stale from previous round.

Fix this by making VCS set by URL to be volatile w.r.t. transport_get()
instead.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot0101: use a fixed timestamp when searching in the reflog
Junio C Hamano [Wed, 27 Jan 2010 18:54:22 +0000 (10:54 -0800)]
t0101: use a fixed timestamp when searching in the reflog

That will give us a better reproducibility during tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate @{bogus.timestamp} fix not to die()
Junio C Hamano [Wed, 27 Jan 2010 18:53:09 +0000 (10:53 -0800)]
Update @{bogus.timestamp} fix not to die()

The caller will say "It is not a valid object name" if it wants to, and
some callers may even try to see if it names an object and otherwise try to
see if it is a path.

Pointed out by Jeff King.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoTeach Makefile to check header dependencies
Jonathan Nieder [Tue, 26 Jan 2010 15:57:15 +0000 (09:57 -0600)]
Teach Makefile to check header dependencies

Add a target to use the gcc-generated makefile snippets for
dependencies on header files to check the hard-coded dependencies.

With this patch applied, if any dependencies are missing, then

make clean
make COMPUTE_HEADER_DEPENDENCIES=YesPlease
make CHECK_HEADER_DEPENDENCIES=YesPlease

will produce an error message like the following:

CHECK fast-import.o
missing dependencies: exec_cmd.h
make: *** [fast-import.o] Error 1

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
14 years agoMakefile: list standalone program object files in PROGRAM_OBJS
Jonathan Nieder [Tue, 26 Jan 2010 15:54:23 +0000 (09:54 -0600)]
Makefile: list standalone program object files in PROGRAM_OBJS

Because of new commands like git-remote-http, the OBJECTS list
contains fictitious objects such as remote-http.o.  Thus any
out-of-tree rules that require all $(OBJECTS) to be buildable
are broken.  Add a list of real program objects to avoid this
problem.

To avoid duplication of effort, calculate the command list in
the PROGRAMS variable using the expansion of PROGRAM_OBJS.
This calculation occurs at the time $(PROGRAMS) is expanded,
so later additions to PROGRAM_OBJS will be reflected in it,
provided they occur before the build rules begin on line 1489.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
14 years agoMerge branch 'jl/diff-submodule-ignore'
Junio C Hamano [Wed, 27 Jan 2010 06:53:13 +0000 (22:53 -0800)]
Merge branch 'jl/diff-submodule-ignore'

* jl/diff-submodule-ignore:
  Teach diff --submodule that modified submodule directory is dirty
  git diff: Don't test submodule dirtiness with --ignore-submodules
  Make ce_uptodate() trustworthy again

14 years agowork around an obnoxious bash "safety feature" on OpenBSD
Junio C Hamano [Wed, 27 Jan 2010 00:29:30 +0000 (16:29 -0800)]
work around an obnoxious bash "safety feature" on OpenBSD

Bash (4.0.24) on OpenBSD 4.6 refuses to run this snippet:

    $ cat gomi.sh
    #!/bin/sh
    one="/var/tmp/1 1"
    rm -f /var/tmp/1 "/var/tmp/1 1"
    echo hello >$one
    $ sh gomi.sh; ls /var/tmp/1*
    /var/tmp/1 1
    $ bash gomi.sh; ls /var/tmp/1*
    gomi.sh: line 4: $one: ambiguous redirect
    ls: /var/tmp/1*: No such file or directory

Every competent shell programmer knows that a <$word in redirection is not
subject to field splitting (POSIX.1 "2.7 Redirection" explicitly lists the
kind of expansion performed: "... the word that follows the redirection
operator shall be subjected to ...", and "Field Splitting" is not among
them).

Some clueless folks apparently decided that users need to be protected in
the name of "security", however.

Output from "git grep -e '> *\$' -- '*.sh'" indicates that rebase-i
suffers from this bogus "safety".  Work it around by surrounding the
variable reference with a dq pair.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-gui: Update translation template
Shawn O. Pearce [Tue, 26 Jan 2010 23:47:45 +0000 (15:47 -0800)]
git-gui: Update translation template

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agofix portability issues with $ in double quotes
Stephen Boyd [Tue, 26 Jan 2010 23:08:31 +0000 (15:08 -0800)]
fix portability issues with $ in double quotes

Using a dollar sign in double quotes isn't portable. Escape them with
a backslash or replace the double quotes with single quotes.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoapproxidate_careful() reports errorneous date string
Junio C Hamano [Tue, 26 Jan 2010 19:58:00 +0000 (11:58 -0800)]
approxidate_careful() reports errorneous date string

For a long time, the time based reflog syntax (e.g. master@{yesterday})
didn't complain when the "human readable" timestamp was misspelled, as
the underlying mechanism tried to be as lenient as possible.  The funny
thing was that parsing of "@{now}" even relied on the fact that anything
not recognized by the machinery returned the current timestamp.

Introduce approxidate_careful() that takes an optional pointer to an
integer, that gets assigned 1 when the input does not make sense as a
timestamp.

As I am too lazy to fix all the callers that use approxidate(), most of
the callers do not take advantage of the error checking, but convert the
code to parse reflog to use it as a demonstration.

Tests are mostly from Jeff King.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix log -g this@{upstream}
Junio C Hamano [Tue, 26 Jan 2010 21:48:28 +0000 (13:48 -0800)]
Fix log -g this@{upstream}

It showed the correct objects but walked a wrong reflog.
Again, tests are from Jeff King.

Signed-off-by: Junio C Hamano <gitster@pobox.com>