Commit graph

28025 commits

Author SHA1 Message Date
Steven Walter 379862ec5a git-svn.perl: fix a false-positive in the "already exists" test
open_or_add_dir checks to see if the directory already exists or not.
If it already exists and is not a directory, then we fail.  However,
open_or_add_dir did not previously account for the possibility that the
path did exist as a file, but is deleted in the current commit.

In order to prevent this legitimate case from failing, open_or_add_dir
needs to know what files are deleted in the current commit.
Unfortunately that information has to be plumbed through a couple of
layers.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21 21:37:31 +00:00
Steven Walter 5ec514bd2f git-svn.perl: perform deletions before anything else
If we delete a file and recreate it as a directory in a single commit,
we have to tell the server about the deletion first or else we'll get
"RA layer request failed: Server sent unexpected return value (405
Method Not Allowed) in response to MKCOL request"

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21 21:37:31 +00:00
Wei-Yin Chen (陳威尹) 6aa17fc69b git-svn: Fix time zone in --localtime
Use numerical form of time zone to replace alphabetic time zone
abbreviation generated by "%Z". "%Z" is not portable and contain
ambiguity for many areas. For example, CST could be "Central
Standard Time" (GMT-0600) and "China Standard Time" (GMT+0800).
Alphabetic time zone abbreviation is meant for human readability,
not for specifying a time zone for machines.

Failed case can be illustrated like this in linux shell:
  > echo $TZ
  Asia/Taipei
  > date +%Z
  CST
  > env TZ=`date +%Z` date
  Mon Dec 19 06:03:04 CST 2011
  > date
  Mon Dec 19 14:03:04 CST 2011

[ew: fixed bad package reference inside Git::SVN::Log]

Signed-off-by: Wei-Yin Chen (陳威尹) <chen.weiyin@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21 21:37:31 +00:00
Ævar Arnfjörð Bjarmason 83cf21f985 git-svn: un-break "git svn rebase" when log.abbrevCommit=true
Change git-svn to use git-rev-list(1) instead of git-log(1) since the
latter is porcelain that'll cause "git svn rebase" to fail completely
if log.abbrevCommit is set to true in the configuration.

Without this patch the code will fail to parse a SHA1, and then just
spew a bunch of "Use of uninitialized value $hash in string eq"
warnings at "if ($c && $c eq $hash) { ..." and never do anything
useful.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21 21:37:31 +00:00
Ævar Arnfjörð Bjarmason b380e3a792 git-svn: remove redundant porcelain option to rev-list
Change an invocation of git-rev-list(1) to not use --no-color,
git-rev-list(1) will always ignore that option and the --color option,
so there's no need to pass it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21 21:37:31 +00:00
Frederic Heitzmann 7b151f492d completion: add --interactive option to git svn dcommit
see afd7f1e for more details on git svn dcommit --interactive

Signed-off-by: Frederic Heitzmann <frederic.heitzmann@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21 21:37:31 +00:00
Junio C Hamano b3a769dc35 Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-20 00:29:40 -08:00
Junio C Hamano 76bdcf0ee3 Merge branch 'tg/tag-points-at'
* tg/tag-points-at:
  builtin/tag.c: Fix a sparse warning
  tag: add --points-at list option
2012-02-20 00:15:28 -08:00
Junio C Hamano 8c60fcbcfd Merge branch 'jc/diff-stat-scaler'
* jc/diff-stat-scaler:
  diff --stat: show bars of same length for paths with same amount of changes
2012-02-20 00:15:15 -08:00
Junio C Hamano 4d9e079e82 Merge branch 'zj/decimal-width'
* zj/decimal-width:
  make lineno_width() from blame reusable for others

Conflicts:
	cache.h
	pager.c
2012-02-20 00:15:11 -08:00
Junio C Hamano 583c389e7e Merge branch 'zj/term-columns'
* zj/term-columns:
  pager: find out the terminal width before spawning the pager
2012-02-20 00:15:06 -08:00
Junio C Hamano 592d051759 Merge branch 'cb/transfer-no-progress'
* cb/transfer-no-progress:
  push/fetch/clone --no-progress suppresses progress output
2012-02-20 00:14:55 -08:00
Junio C Hamano 13dd790bbe Merge branch 'cb/receive-pack-keep-errors'
* cb/receive-pack-keep-errors:
  do not override receive-pack errors
2012-02-20 00:14:50 -08:00
Junio C Hamano 030a360849 Merge branch 'cb/maint-t5541-make-server-port-portable'
* cb/maint-t5541-make-server-port-portable:
  t5541: check error message against the real port number used
2012-02-20 00:14:46 -08:00
Junio C Hamano abce5decd8 Merge branch 'cb/maint-rev-list-verify-object'
* cb/maint-rev-list-verify-object:
  git rev-list: fix invalid typecast
2012-02-20 00:14:41 -08:00
Junio C Hamano 2c8fb23ac7 Merge branch 'maint'
* maint:
  Update draft release notes to 1.7.9.2
  gitweb: Fix 'grep' search for multiple matches in file
2012-02-20 00:14:17 -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
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 b0d66b5110 Sync with maint 2012-02-16 14:27:20 -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
Zbigniew Jędrzejewski-Szmek ec7ff5ba27 make lineno_width() from blame reusable for others
builtin/blame.c has a helper function to compute how many columns
we need to show a line-number, whose implementation is reusable as
a more generic helper function to count the number of columns
necessary to show any cardinal number.

Rename it to decimal_width(), move it to pager.c and export it for
use by future callers.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-14 16:16:19 -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 0364bb135e Merge branch 'jk/git-dir-lookup'
* jk/git-dir-lookup:
  standardize and improve lookup rules for external local repos
2012-02-14 12:57:18 -08:00
Junio C Hamano 10439fc0ef Merge branch 'jk/grep-binary-attribute'
* 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-14 12:57:18 -08:00
Junio C Hamano 84f3d6458b Merge branch 'nd/pack-objects-parseopt'
* nd/pack-objects-parseopt:
  pack-objects: convert to use parse_options()
  pack-objects: remove bogus comment
  pack-objects: do not accept "--index-version=version,"
2012-02-14 12:57:18 -08:00
Junio C Hamano 15c540fde9 Merge branch 'dp/i18n-libcharset'
* dp/i18n-libcharset:
  Makefile: introduce CHARSET_LIB to link with -lcharset
2012-02-14 12:57:18 -08:00
Junio C Hamano d31f3785dc Merge branch 'mh/war-on-extra-refs'
* mh/war-on-extra-refs:
  refs: remove the extra_refs API
  clone: do not add alternate references to extra_refs
  everything_local(): mark alternate refs as complete
  fetch-pack.c: inline insert_alternate_refs()
  fetch-pack.c: rename some parameters from "path" to "refname"
  clone.c: move more code into the "if (refs)" conditional
  t5700: document a failure of alternates to affect fetch
2012-02-14 12:57:18 -08:00
Junio C Hamano 3c1e0d6a79 Merge branch 'lt/pull-no-edit'
* lt/pull-no-edit:
  "git pull" doesn't know "--edit"
2012-02-14 12:57:17 -08:00
Junio C Hamano a49060324a Merge branch 'bl/gitweb-project-filter'
* bl/gitweb-project-filter:
  gitweb: Harden and improve $project_filter page title
2012-02-14 12:57:17 -08:00
Junio C Hamano 746b6fb968 Merge branch 'jn/ancient-meld-support'
* jn/ancient-meld-support:
  mergetools/meld: Use --help output to detect --output support
2012-02-14 12:57:17 -08:00
Junio C Hamano 63d37c3062 Merge branch 'jk/userdiff-config-simplify'
* jk/userdiff-config-simplify:
  drop odd return value semantics from userdiff_config
2012-02-14 12:57:17 -08:00
Junio C Hamano 5f90b6fa0f Sync with 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-14 09:56:23 -08:00
Junio C Hamano 90020e3bcd Git 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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
Junio C Hamano 1dcfa8de7c Merge branch 'mp/make-cleanse-x-for-exe' into maint
* mp/make-cleanse-x-for-exe:
  Explicitly set X to avoid potential build breakage
2012-02-13 23:26:25 -08:00
Junio C Hamano 42e283a1bf Merge branch 'jn/merge-no-edit-fix' into maint
* jn/merge-no-edit-fix:
  merge: do not launch an editor on "--no-edit $tag"
2012-02-13 23:24:02 -08:00
Zbigniew Jędrzejewski-Szmek ad6c3739a3 pager: find out the terminal width before spawning the pager
term_columns() checks for terminal width via ioctl(2) on the standard
output, but we spawn the pager too early for this check to be useful.

The effect of this buglet can be observed by opening a wide terminal and
running "git -p help --all", which still shows 80-column output, while
"git help --all" uses the full terminal width. Run the check before we
spawn the pager to fix this.

While at it, move term_columns() to pager.c and export it from cache.h so
that callers other than the help subsystem can use it.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-13 15:08:47 -08:00
Clemens Buchacher ef7e93d908 do not override receive-pack errors
Receive runs rev-list --verify-objects in order to detect missing
objects. However, such errors are ignored and overridden later.
Instead, consequently ignore all update commands for which an error has
already been detected.

Some tests in t5504 are obsoleted by this change, because invalid
objects are detected even if fsck is not enabled. Instead, they now test
for different error messages depending on whether or not fsck is turned
on. A better fix would be to force a corruption that will be detected by
fsck but not by rev-list.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-13 13:29:08 -08:00