1
0
mirror of https://github.com/git/git.git synced 2024-10-23 02:49:36 +02:00
Commit Graph

27837 Commits

Author SHA1 Message Date
Junio C Hamano
8f2c0995b6 Merge branch 'js/configure-libintl' into maint
* js/configure-libintl:
  configure: don't use -lintl when there is no gettext support
2012-02-26 17:04:53 -08:00
Junio C Hamano
4d06691eec Sync with 1.7.8.5 2012-02-26 16:42:35 -08:00
Junio C Hamano
c524ceb12f Git 1.7.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.8.5
2012-02-26 16:40:20 -08:00
Michał Kiedrowicz
fba4f1259d grep -P: Fix matching ^ and $
When "git grep" is run with -P/--perl-regexp, it doesn't match ^ and $ at
the beginning/end of the line.  This is because PCRE normally matches ^
and $ at the beginning/end of the whole text, not for each line, and "git
grep" passes a large chunk of text (possibly containing many lines) to
pcre_exec() and then splits the text into lines.

This makes "git grep -P" behave differently from "git grep -E" and also
from "grep -P" and "pcregrep":

	$ cat file
	a
	 b
	$ git grep --no-index -P '^ ' file
	$ git grep --no-index -E '^ ' file
	file: b
	$ grep -c -P '^ ' file
	 b
	$ pcregrep -c '^ ' file
	 b

Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:34:03 -08:00
Jim Meyering
f0c5793b37 am: don't infloop for an empty input file
git-am.sh's check_patch_format function would attempt to preview
the patch to guess its format, but would go into an infinite loop
when the patch file happened to be empty.  The solution: exit the
loop when "read" fails, not when the line var, "$l1" becomes empty.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:32:54 -08:00
Andrew Wong
ad687b447a rebase -m: only call "notes copy" when rewritten exists and is non-empty
This prevents a shell error complaining rebase-merge/rewritten doesn't exist.

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:32:37 -08:00
Pete Wyckoff
09ccbd34f4 git-p4: remove bash-ism in t9800
This works in both bash and dash:

    $ bash -c 'VAR=1 env' | grep VAR
    VAR=1
    $ dash -c 'VAR=1 env' | grep VAR
    VAR=1

But environment variables assigned this way are not necessarily propagated
through a function in POSIX compliant shells:

    $ bash -c 'f() { "$@"
    }; VAR=1 f "env"' | grep VAR
    VAR=1
    $ dash -c 'f() { "$@"
    }; VAR=1 f "env"' | grep VAR

Fix constructs like this, in particular, setting variables through
test_must_fail.

Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:20:18 -08:00
Pete Wyckoff
8d93a5ac68 git-p4: remove bash-ism in t9809
Plain old $# works to count the number of arguments in
either bash or dash, even if the arguments have spaces.

Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:19:22 -08:00
Pete Wyckoff
543987bd47 git-p4: fix submit regression with clientSpec and subdir clone
When the --use-client-spec is given to clone, and the clone
path is a subset of the full tree as specified in the client,
future submits will go to the wrong place.

Factor out getClientSpec() so both clone/sync and submit can
use it.  Introduce getClientRoot() that is needed for the client
spec case, and use it instead of p4Where().

Test the five possible submit behaviors (add, modify, rename,
copy, delete).

Reported-by: Laurent Charrière <lcharriere@promptu.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:14:29 -08:00
Pete Wyckoff
a93d33ee7b git-p4: set useClientSpec variable on initial clone
If --use-client-spec was given, set the matching configuration
variable.  This is necessary to ensure that future submits
work properly.

The alternatives of requiring the user to set it, or providing
a command-line option on every submit, are error prone.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 16:14:20 -08:00
Dmitry V. Levin
39cb6445d9 Makefile: add thread-utils.h to LIB_H
Starting with commit v1.7.8-165-g0579f91, grep.h includes
thread-utils.h, so the latter has to be added to LIB_H.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-26 14:31:26 -08:00
Matthieu Moy
07f050c999 README: point to Documentation/SubmittingPatches
It was indeed not obvious for new contributors to find this document in
the source tree, since there were no reference to it outside the
Documentation/ directory.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23 11:35:59 -08:00
Junio C Hamano
8c80ff362f Document merge.branchdesc configuration variable
This was part of the "branch description" feature in the larger
"help people communicate better during their pull based workflow"
topic, but was never documented.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23 11:20:15 -08:00
Junio C Hamano
78f4c9f625 Git 1.7.9.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.9.2
2012-02-22 17:48:01 -08:00
Philip Jägenstedt
514a529d25 completion: use tabs for indentation
CodingGuidlines confidently declares "We use tabs for indentation."
It would be a shame if it were caught lying.

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22 13:57:38 -08:00
Philip Jägenstedt
176158cabd completion: remove stale "to submit patches" documentation
It was out-of-sync with the reality of who works on this
script. Defer (silently) to Documentation/SubmittingPatches
like all other code.

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22 13:57:05 -08:00
Junio C Hamano
72d5e74e99 Update draft release notes to 1.7.9.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21 15:16:34 -08:00
Junio C Hamano
e147e9693a Merge branch 'cb/receive-pack-keep-errors' into maint
* cb/receive-pack-keep-errors:
  do not override receive-pack errors
2012-02-21 15:14:41 -08:00
Junio C Hamano
c7707a4354 Merge branch 'cb/transfer-no-progress' into maint
* cb/transfer-no-progress:
  push/fetch/clone --no-progress suppresses progress output
2012-02-21 15:14:37 -08:00
Junio C Hamano
0cfba96121 Merge branch 'jk/git-dir-lookup' into maint
* jk/git-dir-lookup:
  standardize and improve lookup rules for external local repos
2012-02-21 15:13:16 -08:00
Junio C Hamano
a67c235448 Merge branch 'jc/diff-stat-scaler' into maint
* jc/diff-stat-scaler:
  diff --stat: show bars of same length for paths with same amount of changes
2012-02-21 15:00:33 -08:00
Junio C Hamano
c17ff2a361 Merge branch 'zj/term-columns' into maint
* zj/term-columns:
  pager: find out the terminal width before spawning the pager
2012-02-21 15:00:15 -08:00
Junio C Hamano
1e2545c687 Merge branch 'cb/maint-rev-list-verify-object' into maint
* cb/maint-rev-list-verify-object:
  git rev-list: fix invalid typecast
2012-02-21 14:59:35 -08:00
Junio C Hamano
c1ed5e6b14 Merge branch 'cb/maint-t5541-make-server-port-portable' into maint
* cb/maint-t5541-make-server-port-portable:
  t5541: check error message against the real port number used
2012-02-21 14:57:40 -08:00
Junio C Hamano
ef55bd78e7 Merge branch 'dp/i18n-libcharset' into maint
* dp/i18n-libcharset:
  Makefile: introduce CHARSET_LIB to link with -lcharset
2012-02-21 14:57:14 -08:00
Junio C Hamano
6f61eb2017 Merge branch 'jk/grep-binary-attribute' into maint
* jk/grep-binary-attribute:
  grep: pre-load userdiff drivers when threaded
  grep: load file data after checking binary-ness
  grep: respect diff attributes for binary-ness
  grep: cache userdiff_driver in grep_source
  grep: drop grep_buffer's "name" parameter
  convert git-grep to use grep_source interface
  grep: refactor the concept of "grep source" into an object
  grep: move sha1-reading mutex into low-level code
  grep: make locking flag global
2012-02-21 14:57:05 -08:00
Junio C Hamano
093b194cc5 Merge branch 'nd/diffstat-gramnum' into maint
* nd/diffstat-gramnum:
  Use correct grammar in diffstat summary line
2012-02-21 14:56:39 -08:00
Junio C Hamano
f3ccea8dd4 Merge branch 'nd/find-pack-entry-recent-cache-invalidation' into maint
* nd/find-pack-entry-recent-cache-invalidation:
  find_pack_entry(): do not keep packed_git pointer locally
  sha1_file.c: move the core logic of find_pack_entry() into fill_pack_entry()
2012-02-21 14:56:36 -08:00
Junio C Hamano
655c3ed58b Merge branch 'tt/profile-build-fix' into maint
* tt/profile-build-fix:
  Makefile: fix syntax for older make
  Fix build problems related to profile-directed optimization
2012-02-21 14:56:06 -08:00
Junio C Hamano
014578e0d0 Merge branch 'fc/zsh-completion' into maint
* fc/zsh-completion:
  completion: simplify __gitcomp and __gitcomp_nl implementations
  completion: use ls -1 instead of rolling a loop to do that ourselves
  completion: work around zsh option propagation bug
2012-02-21 14:55:50 -08:00
Christian Hammerl
f24a595f72 completion: Allow dash as the first character for __git_ps1
If the argument for `__git_ps1` begins with a dash, `printf` tries to
interpret it as an option which results in an error message.
The problem is solved by adding '--' before the argument to tell
`printf` to not interpret the following argument as an option.
Adding '--' directly to the argument does not help because the argument
is enclosed by double quotes.

Signed-off-by: Christian Hammerl <info@christian-hammerl.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21 12:38:07 -08:00
Junio C Hamano
233054d114 Update draft release notes to 1.7.9.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-20 00:14:00 -08:00
John Szakmeister
a8356d43e3 configure: don't use -lintl when there is no gettext support
The current configure script uses -lintl if gettext is not found in the C
library, but does so before checking if there is libintl.h available in
the first place, in which case we would later define NO_GETTEXT.

Instead, check for the existence of libintl.h first. Only when libintl.h
exists and libintl is not in libc, ask for -lintl.

Signed-off-by: John Szakmeister <john@szakmeister.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-20 00:01:53 -08:00
Jakub Narebski
fc8fcd27e6 gitweb: Fix 'grep' search for multiple matches in file
Commit ff7f218 (gitweb: Fix file links in "grep" search, 2012-01-05),
added $file_href variable, to reduce duplication and have the fix
applied in single place.

Unfortunately it made variable defined inside the loop, not taking into
account the fact that $file_href was set only if file changed.
Therefore for files with multiple matches $file_href was undefined for
second and subsequent matches.

Fix this bug by moving $file_href declaration outside loop.

Adds tests for almost all forms of sarch in gitweb, which were missing
from testuite.  Note that it only tests if there are no warnings, and
it doesn't check that gitweb finds what it should find.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-19 22:21:35 -08:00
Junio C Hamano
d1ba7a4cb7 Update draft release notes to 1.7.9.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-16 14:26:32 -08:00
Junio C Hamano
147d071816 Merge branch 'jc/checkout-out-of-unborn' into maint
* jc/checkout-out-of-unborn:
  git checkout -b: allow switching out of an unborn branch
2012-02-16 14:18:06 -08:00
Junio C Hamano
57d6b07f6b Merge branch 'jc/maint-mailmap-output' into maint
* jc/maint-mailmap-output:
  mailmap: always return a plain mail address from map_user()
2012-02-16 14:18:03 -08:00
Junio C Hamano
f3f3c4dec6 Merge branch 'jk/prompt-fallback-to-tty' into maint
* jk/prompt-fallback-to-tty:
  prompt: fall back to terminal if askpass fails
  prompt: clean up strbuf usage
2012-02-16 14:18:00 -08:00
Junio C Hamano
35c60a0807 Merge branch 'jn/gitweb-search-utf-8' into maint
* jn/gitweb-search-utf-8:
  gitweb: Allow UTF-8 encoded CGI query parameters and path_info
2012-02-16 14:17:58 -08:00
Junio C Hamano
6c63ab3ca7 Merge branch 'jc/maint-commit-ignore-i-t-a' into maint
* jc/maint-commit-ignore-i-t-a:
  commit: ignore intent-to-add entries instead of refusing

Conflicts:
	cache-tree.c
2012-02-16 14:08:00 -08:00
Junio C Hamano
c6a4e3f7a7 Merge branch 'mm/empty-loose-error-message' into maint
* mm/empty-loose-error-message:
  fsck: give accurate error message on empty loose object files
2012-02-16 14:00:25 -08:00
Junio C Hamano
f342afafce Merge branch 'nk/ctype-for-perf' into maint
* nk/ctype-for-perf:
  ctype: implement islower/isupper macro
  ctype.c only wants git-compat-util.h
2012-02-16 14:00:16 -08:00
Junio C Hamano
e6d88ca87c Merge branch 'jx/i18n-more-marking' into maint
* jx/i18n-more-marking:
  i18n: format_tracking_info "Your branch is behind" message
  i18n: git-commit whence_s "merge/cherry-pick" message
2012-02-16 13:59:53 -08:00
Zbigniew Jędrzejewski-Szmek
68e4b552a1 man: rearrange git synopsis to fit in 80 lines
The line was extended in 2dd8c3 ('git: add --info-path and --man-path
options'), and the formatted man output stopped fitting into the 80
column window.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-16 13:01:31 -08:00
Ralf Thielow
a7fab08b6e completion: --list option for git-branch
Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-16 12:33:50 -08:00
Junio C Hamano
5639786f30 Merge branch 'rt/completion-branch-edit-desc' into maint
* rt/completion-branch-edit-desc:
  completion: --edit-description option for git-branch
2012-02-16 12:33:46 -08:00
Junio C Hamano
2eeeef24ff diff --stat: show bars of same length for paths with same amount of changes
When commit 3ed74e6 (diff --stat: ensure at least one '-' for deletions,
and one '+' for additions, 2006-09-28) improved the output for files with
tiny modifications, we accidentally broke the logic to ensure that two
equal sized changes are shown with the bars of the same length, even when
rounding errors exist.

Compute the length of the graph bars, using the same "non-zero changes is
shown with at least one column" scaling logic, but by scaling the sum of
additions and deletions to come up with the total length of the bar (this
ensures that two equal sized changes result in bars of the same length),
and then scaling the smaller of the additions or deletions. The other side
is computed as the difference between the two.

This makes the apportioning between additions and deletions less accurate
due to rounding errors, but it is much less noticeable than two files with
the same amount of change showing bars of different length.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-14 14:21:49 -08:00
Junio C Hamano
90020e3bcd Git 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.9.1
2012-02-14 09:53:38 -08:00
Junio C Hamano
a95750c4e8 Merge branch 'jk/maint-tag-show-fixes' into maint
* jk/maint-tag-show-fixes:
  tag: do not show non-tag contents with "-n"
  tag: die when listing missing or corrupt objects
  tag: fix output of "tag -n" when errors occur

Conflicts:
	t/t7004-tag.sh
2012-02-13 23:31:27 -08:00
Junio C Hamano
801b28a34a Merge branch 'bw/inet-pton-ntop-compat' into maint
* bw/inet-pton-ntop-compat:
  Drop system includes from inet_pton/inet_ntop compatibility wrappers
2012-02-13 23:26:31 -08:00