Commit graph

22773 commits

Author SHA1 Message Date
Junio C Hamano 0d0ba03a18 Merge branch 'maint'
* maint:
  gitweb: clarify search results page when no matching commit found
  Documentation: add a FILES section for show-ref
  Makefile: add missing dependency on http.h
  Makefile: add missing dependencies on url.h
  Documentation/git-log: Clarify --full-diff
  git-rebase: fix typo when parsing --force-rebase
  imap-send: Fix sprintf usage
  prune: allow --dry-run for -n and --verbose for -v
  notes: allow --dry-run for -n and --verbose for -v
  Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C
  Documentation: cite git-am from git-apply
  t7003: fix subdirectory-filter test
  Allow "check-ref-format --branch" from subdirectory
  check-ref-format: handle subcommands in separate functions
  pretty-options.txt: match --format's documentation with implementation.
2010-08-09 13:05:47 -07:00
Jonathan Nieder 497d9c3439 gitweb: clarify search results page when no matching commit found
When searching commits for a string that never occurs, the results
page looks something like this:

	projects / foo.git / search                                 \o/
	summary | ... | tree          [commit] search: [ kfjdkas ] [ ]re
	first ⋅ prev ⋅ next

	Merge branch 'maint'

	Foo: a demonstration project

Without a list of hits to compare it to, the header describing the
commit named by the hash parameter (usually HEAD) may itself look
like a hit.  Add some text (“No match.”) to replace the empty
list of hits and avoid this confusion.

While at it, remove some nearby dead code, left behind from a
simplification a few years ago (v1.5.4-rc0~276^2~4, 2007-11-01).

Noticed-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 13:05:35 -07:00
Jonathan Nieder 977ed83a6d Documentation: add a FILES section for show-ref
A peek at where the refs are kept might help understanding, even if,
as the DESCRIPTION section suggests, direct access is not part of the
public API.

Balance that out with a pointer to update-ref.

Suggested-by: Geoff Russell <geoffrey.russell@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 12:33:50 -07:00
Jonathan Nieder 48c250a121 Makefile: add missing dependency on http.h
v1.7.1-rc0~65^2~2 (http: init and cleanup separately from
http-walker, 2010-03-02) introduced a direct dependency from
http-fetch on the HTTP request library.  Declare it.

Detected with "make CHECK_HEADER_DEPENDENCIES=1".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 12:13:27 -07:00
Jonathan Nieder 5fedde3cb3 Makefile: add missing dependencies on url.h
v1.7.2-rc0~56^2 and its parent (decode file:// and ssh://
URLs, 2010-05-23) introduced a new url library.  Update the
Makefile with the relevant dependencies.

Detected with "make CHECK_HEADER_DEPENDENCIES=1".

Cc: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 12:12:22 -07:00
Michael J Gruber b1c7946d0c Documentation/git-log: Clarify --full-diff
The current description gives the impression that "--full-diff" affects
"log -p" only.

Make it clearer that it affects all diff-based output types.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 11:53:32 -07:00
Willy Tarreau 1bc6bf6dea git-rebase: fix typo when parsing --force-rebase
Due to two missing hyphens, The "force" keyword on the command line
would be taken as an alias for the --force-rebase option.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 11:51:50 -07:00
Ævar Arnfjörð Bjarmason 1702b1381e imap-send: Fix sprintf usage
When composing a command for the imap server, imap-send uses a single
nfsnprintf() invocation for brevity instead of dealing separately with
the case when there is a message to be sent and the case when there
isn’t.  The unused argument in the second case, while valid, is
confusing for static analyzers and human readers.

v1.6.4-rc0~117 (imap-send: add support for IPv6, 2009-05-25)
mistakenly used %hu as the format for an int “port”, by analogy with
existing usage for the unsigned short “addr.sin_port”.  Use %d
instead.

Noticed with clang.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 11:35:46 -07:00
René Scharfe 24aea03313 prune: allow --dry-run for -n and --verbose for -v
For consistency with other git commands, let git prune accept the long
options --dry-run and --verbose for the respective short ones -n and -v.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 10:13:18 -07:00
René Scharfe e93487d2f0 notes: allow --dry-run for -n and --verbose for -v
For consistency with other git commands, let the prune subcommand of
git notes accept the long options --dry-run and --verbose for the
respective short ones -n and -v.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 10:12:50 -07:00
Junio C Hamano d7d1c79cec Merge branch 'webrick' of git://git.bogomips.org/git-svn
* 'webrick' of git://git.bogomips.org/git-svn:
  instaweb: add access+error logging for WEBrick
  instaweb: minimize moving parts for WEBrick
  instaweb: fix WEBrick server support
2010-08-09 09:46:52 -07:00
Matthieu Moy cf958afd83 Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C
These options take an optional argument, but this optional argument was
not documented.

Original patch by Matthieu Moy, but documentation for -B mostly copied
from the explanations of Junio C Hamano.

While we're there, fix a typo in a comment in diffcore.h.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 09:16:11 -07:00
Brad King 08b2982645 Documentation: cite git-am from git-apply
Users reading git-apply documentation may also be interested in git-am,
especially after receiving an email created with git-format-patch.  The
documentation for git-am already references git-apply.  Add the reverse.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 09:15:41 -07:00
Thomas Rast 3c8710aeaa t7003: fix subdirectory-filter test
The test would not fail if the filtering failed to do anything, since
in

  test -z "$(git diff HEAD directorymoved:newsubdir)"'

'directorymoved:newsubdir' is not valid, so git-diff fails without
printing anything on stdout.  But then the exit status of git-diff is
lost, whereas test -z "" succeeds.

Use 'git diff --exit-code' instead, which does the right thing and has
the added bonus of showing the differences if there are any.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09 09:15:01 -07:00
Jonathan Nieder 49cc460d88 Allow "check-ref-format --branch" from subdirectory
check-ref-format --branch requires access to the repository
to resolve refs like @{-1}.

Noticed by Nguyễn Thái Ngọc Duy.

Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-06 10:01:45 -07:00
Jonathan Nieder cfbe22f03f check-ref-format: handle subcommands in separate functions
The code for each subcommand should be easier to read and manipulate
this way.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-06 10:00:39 -07:00
Junio C Hamano 730901ab00 Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git svn: URL-decode left-hand side of svn refspec
2010-08-06 09:06:20 -07:00
Matthieu Moy 2429e8da95 pretty-options.txt: match --format's documentation with implementation.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-05 09:49:49 -07:00
Eric Wong e9323e7f09 instaweb: add access+error logging for WEBrick
This allows WEBrick to support all the logging functionality
in a manner consistent with the other web servers.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2010-08-05 08:51:26 +00:00
Eric Wong f46e130439 instaweb: minimize moving parts for WEBrick
Since there are WEBrick configuration settings (including the
upcoming AccessLog support) that cannot be represented in YAML
and require Ruby anyways, the YAML config file is an unnecessary
layer of complexity.

Additionally, the shell script wrapper to start WEBrick is
unecessary since our generated Ruby script can be made
executable in the same manner with /usr/bin/env.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2010-08-05 08:51:26 +00:00
Eric Wong 422bff2802 instaweb: fix WEBrick server support
This has been broken since commit be5347b ("httpd logs in a
"$httpd_only" subdirectory").

Since WEBrick has no other way of preserving environment
variables needed for gitweb, we create a shell script wrapper
that sets the environment variables as our CGI interpreter
to run gitweb.cgi.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2010-08-05 08:51:26 +00:00
Steven Walter 46cb16fb59 git svn: URL-decode left-hand side of svn refspec
This change allows git-svn to handle an URL with colons in the path

[ew: rewritten to use uri_decode() function]

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2010-08-05 06:33:23 +00:00
Junio C Hamano 721e76cbfa Merge branch 'maint'
* maint:
  contrib/svn-fe: Add the svn-fe target to .gitignore
  contrib/svn-fe: Fix IncludePath
  Fix DIFF_QUEUE_CLEAR refactoring
  git-gui: fix size and position of window panes on startup
  git-gui: mc cannot be used before msgcat has been loaded
  git-gui: use textconv filter for diff and blame
  git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
  git-gui: fix shortcut creation on cygwin
  git-gui: fix PATH environment for mingw development environment
  git-gui: fix usage of _gitworktree when creating shortcut for windows
  git-gui: fix "Explore Working Copy" for Windows again
  git-gui: fix usage of themed widgets variable
  git-gui: Handle failure of core.worktree to identify the working directory.
  git-gui: check whether systems nice command works or disable it
2010-08-03 15:20:01 -07:00
Junio C Hamano 608169da5b Merge branch 'gp/pack-refs-remove-empty-dirs'
* gp/pack-refs-remove-empty-dirs:
  pack-refs: remove newly empty directories
2010-08-03 15:19:02 -07:00
Junio C Hamano bb89e84f95 Merge branch 'sv/maint-diff-q-clear-fix' into maint
* sv/maint-diff-q-clear-fix:
  Fix DIFF_QUEUE_CLEAR refactoring
2010-08-03 15:17:34 -07:00
Junio C Hamano 7b6e6b3fb2 Merge branch 'rr/svn-fe' into maint
* rr/svn-fe:
  contrib/svn-fe: Add the svn-fe target to .gitignore
  contrib/svn-fe: Fix IncludePath
2010-08-03 15:17:11 -07:00
Junio C Hamano e9aa24123d Merge branch 'pt/git-gui' into maint
* pt/git-gui:
  git-gui: fix size and position of window panes on startup
  git-gui: mc cannot be used before msgcat has been loaded
  git-gui: use textconv filter for diff and blame
  git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
  git-gui: fix shortcut creation on cygwin
  git-gui: fix PATH environment for mingw development environment
  git-gui: fix usage of _gitworktree when creating shortcut for windows
  git-gui: fix "Explore Working Copy" for Windows again
  git-gui: fix usage of themed widgets variable
  git-gui: Handle failure of core.worktree to identify the working directory.
  git-gui: check whether systems nice command works or disable it
2010-08-03 15:16:38 -07:00
Ramkumar Ramachandra 755a605d6e contrib/svn-fe: Add the svn-fe target to .gitignore
Add the svn-fe target to .gitignroe.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-03 06:49:22 -07:00
Ramkumar Ramachandra 199f549874 contrib/svn-fe: Fix IncludePath
Include the path "../../vcs-svn" while compiling it in the Makefile
and change svn-fe.c to include svndump.h.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-03 06:49:20 -07:00
Junio C Hamano e7bdd1b90b Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git svn: fix dcommit to work with touched files
  git svn: add an option to recode pathnames
2010-08-02 15:38:55 -07:00
Elijah Newren 9f9aa76130 upload-pack: Improve error message when bad ref requested
When printing an error message saying a ref was requested that we do not
have, only print that ref, rather than the ref and everything sent to us
on the same packet line (e.g. protocol support specifications).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 15:31:59 -07:00
Jared Hance b73f294150 Document git-instaweb start/stop/restart
The flags --start, --stop, and --restart can be used without the "--".
Document this feature.

Signed-off-by: Jared Hance <jaredhance@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 15:18:18 -07:00
Jakub Narebski 0b45010e76 gitweb: Fix typo in run() subroutine
Run $post_dispatch_hook->() not $pre_dispatch_hook->() after each
request.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 15:01:14 -07:00
David D. Kilzer 181264ad59 git svn: fix dcommit to work with touched files
The dcommit command fails if an otherwise unmodified file has
been touched in the working directory:

    Cannot dcommit with a dirty index.  Commit your changes
    first, or stash them with `git stash'.

This happens because "git diff-index" reports a difference
between the index and the filesystem:

    :100644 100644 d00491...... 000000...... M      file

The fix is to run "git update-index --refresh" before
"git diff-index" as is done in git-rebase and
git-rebase--interactive before "git diff-files".

This changes dcommit to display a list of modified files before
exiting.

Also add a similar test case for "git svn rebase".

[ew: rearranged commit message subject]

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-08-02 21:21:56 +00:00
Thomas Rast 8497421715 ls-files: learn a debugging dump format
Teach git-ls-files a new option --debug that just tacks all available
data from the cache onto each file's line.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 13:16:16 -07:00
Junio C Hamano 9d52f15af7 Merge branch 'maint'
* maint:
  test-lib: Remove 3 year old no-op --no-python option
  test-lib: Ignore --quiet under a TAP harness
  Documentation/rev-parse: quoting is required with --parseopt
  Documentation: reporting bugs
  Fix git rebase --continue to work with touched files
  Document ls-files -t as semi-obsolete.
2010-08-02 12:02:16 -07:00
Junio C Hamano 7d808125a0 Merge branch 'ab/tap' into maint
* ab/tap:
  test-lib: Remove 3 year old no-op --no-python option
  test-lib: Ignore --quiet under a TAP harness
2010-08-02 11:53:58 -07:00
Ævar Arnfjörð Bjarmason d596f33abb test-lib: Remove 3 year old no-op --no-python option
The --no-python option was added to test-lib.sh by Johannes Schindelin
in early 2006 in abb7c7b3. It was later turned into a no-op by Junio C
Hamano in 7cdbff14 the same year.

Over three years is long enough before removing this old wart which
was retained for backwards compatibility. Our tests have been using
NO_PYTHON and "test_have_prereq PYTHON" for a long time now.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 11:53:52 -07:00
Ævar Arnfjörð Bjarmason 092c433407 test-lib: Ignore --quiet under a TAP harness
Running the tests with --quiet under a TAP harness will always fail,
since a TAP harness always needs actual test output to go along with
the plan that's being emitted.

Change the test-lib.sh to ignore the --quiet option under
HARNESS_ACTIVE to work around this. Then users that have --quiet in
their GIT_TEST_OPTS can run tests under prove(1) without everything
breaking.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 11:53:48 -07:00
Jared Hance 8a883b0260 builtin/push.c: remove useless temporary variable
Creating a variable nr here to use throughout the function only to change
refspec_nr to nr at the end, having not used refspec_nr the entire time,
is rather pointless. Instead, simply increment refspec_nr.

While at it, use ALLOC_GROW() instead of xrealloc().

Signed-off-by: Jared Hance <jaredhance@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 11:53:18 -07:00
Junio C Hamano c01a29c74f Merge git://repo.or.cz/git-gui into pt/git-gui
* git://repo.or.cz/git-gui:
  git-gui: fix size and position of window panes on startup
  git-gui: mc cannot be used before msgcat has been loaded
  git-gui: use textconv filter for diff and blame
  git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
  git-gui: fix shortcut creation on cygwin
  git-gui: fix PATH environment for mingw development environment
  git-gui: fix usage of _gitworktree when creating shortcut for windows
  git-gui: fix "Explore Working Copy" for Windows again
  git-gui: fix usage of themed widgets variable
  git-gui: Handle failure of core.worktree to identify the working directory.
  git-gui: check whether systems nice command works or disable it
2010-08-02 09:28:30 -07:00
Thomas Rast ac2e1e632e Documentation/rev-parse: quoting is required with --parseopt
When calling rev-parse --parseopt, as in the (now fixed) documented
example

  eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"

the outermost quoting is required, as otherwise all runs of arbitrary
whitespace inside the resulting 'set -- ...' call would be collapsed
into a single space.

This was exposed as a result of our new use of cat <<\EOF since
47e9cd2 (parseopt: wrap rev-parse --parseopt usage for eval
consumption, 2010-06-12), but has always been a problem when handling
arguments containing e.g. newlines.

Point this out in the documentation, and in particular correct the
example that did not have the quotes.

Noticed-by: Joshua Jensen <jjensen@workspacewhiz.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 09:11:28 -07:00
Junio C Hamano c97ca277a9 Documentation: reporting bugs
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 09:07:39 -07:00
Junio C Hamano ee38d823f7 Fix DIFF_QUEUE_CLEAR refactoring
It introduced a macro to reduce repeated assignments to three fields,
but an unrelated and incorrect change snuck in by mistake, which broke
commands like "git diff-files -p --submodule".

Noticed by Sven Verdoolaege.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-02 08:30:02 -07:00
Pat Thoyts 2810a58dba git-gui: fix size and position of window panes on startup
The themed panedwindow needs to have the sash position set after the
widget has been mapped therefore apply this setting in the Map event
binding. To avoid visible redraws as the application is constructed
the main window should be withdrawn until all the widgets have been added

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-02 13:42:45 +01:00
Pat Thoyts 9cb268c426 git-gui: mc cannot be used before msgcat has been loaded
If someone attempts to use an older version that Tk 8.4 the error was
masked by the lack of a mc command.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-02 12:13:05 +01:00
Clément Poulain 1fbaccad4d git-gui: use textconv filter for diff and blame
Create a checkbox "Use Textconv For Diffs and Blame" in git-gui options.
If checked and if the driver for the concerned file exists, git-gui calls diff
and blame with --textconv option

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30 10:05:27 +01:00
Pat Thoyts 85123549f0 git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
On Windows the Control-C binding is used to copy and is mapped to the Tk
virtual event <<Copy>>. In the initial git-gui dialog this is also bound
as an accelerator for the Clone menu item. The effect is that both bindings
run, copying the text but resetting the clone page or switching to the clone
page when the user tries to copy text from one of the entry fields.
This patch avoids this by using Control-L instead for Windows only.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30 10:05:27 +01:00
Heiko Voigt fc17e5e5bd git-gui: fix shortcut creation on cygwin
When the user tried to create a desktop icon with git gui on cygwin
wscript was complaining about an unknown option and displaying the
non-native path as such.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30 10:05:26 +01:00
Heiko Voigt 4c79adc5c0 git-gui: fix PATH environment for mingw development environment
When creating a desktop shortcut from the gui the shortcut directly
starts wish with the git-gui script. In the msysgit development
environment some dll's reside in the mingw/bin directory which causes
that git can not start because libiconv2.dll is not found.

When using such a link the error is even more cryptic stating:
"child killed: unknown signal"

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30 09:57:26 +01:00