Commit graph

18775 commits

Author SHA1 Message Date
Clemens Buchacher 0bf8c1f9be http-push: reuse existing is_null_ref
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31 15:38:32 -07:00
Junio C Hamano 0ddbbb6661 Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: refuse to dcommit non-UTF-8 messages
2009-05-30 22:25:41 -07:00
Thomas Rast d183663785 Documentation: teach stash/pop workflow instead of stash/apply
Recent discussion on the list showed some comments in favour of a
stash/pop workflow:

  http://marc.info/?l=git&m=124234911423358&w=2
  http://marc.info/?l=git&m=124235348327711&w=2

Change the stash documentation and examples to document pop in its own
right (and apply in terms of pop), and use stash/pop in the examples.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-30 22:21:29 -07:00
Junio C Hamano 9affecbc89 Merge branch 'sb/maint-1.6.2-opt-filename-fix'
* sb/maint-1.6.2-opt-filename-fix:
  apply, fmt-merge-msg: use relative filenames
  commit: -F overrides -t
2009-05-29 15:01:16 -07:00
Junio C Hamano 659f096896 Merge branch 'jc/maint-add-p-coalesce-fix'
* jc/maint-add-p-coalesce-fix:
  t3701: ensure correctly set up repository after skipped tests
  Revert "git-add--interactive: remove hunk coalescing"
  Splitting a hunk that adds a line at the top fails in "add -p"
2009-05-29 15:00:15 -07:00
Junio C Hamano 8e105e3928 Merge branch 'rs/maint-grep-word-regexp-fix'
* rs/maint-grep-word-regexp-fix:
  grep: fix word-regexp at the beginning of lines
2009-05-29 14:59:50 -07:00
Stephen Boyd 3be7e06713 t9120: don't expect failure with SVN_HTTPD_PORT unset
The test still passes when SVN_HTTPD_PORT is not set. Futhermore, t9115
and t9118 don't check if SVN_HTTPD_PORT is set even though they both use
start_httpd() from lib-git-svn.sh. Admittedly, the test is not very
meaningful without SVN_HTTPD_PORT, as commit f5530b (support for funky
branch and project names over HTTP(S) 2007-11-11) states that the URI
escaping is only done over HTTP(S).

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-29 00:53:43 -07:00
Junio C Hamano a9d29038a7 Merge branch 'maint'
* maint:
  fix segfault showing an empty remote
2009-05-28 22:50:23 -07:00
Eric Wong b510df8af2 git-svn: refuse to dcommit non-UTF-8 messages
...without i18n.commitencoding set in the config.

SVN tries to store all commit messages in UTF-8, however it is
up to the job of the clients to enforce this rule.  SVN servers
themselves do not always enforce this; allowing clients to
commit malformed UTF-8 messages and break repositories.

So git-svn will enforce this and tell the user to set
i18n.commitencoding when a git commit is is not in UTF-8.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-05-28 00:57:07 -07:00
Clemens Buchacher 6a01554e63 fix segfault showing an empty remote
In case of an empty list, the search for its tail caused a
NULL-pointer dereference.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Reported-by: Erik Faye-Lund <kusmabite@googlemail.com>
Acked-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27 23:16:16 -07:00
Stephen Boyd 3902985a58 t5500: Modernize test style
Code outside of the test harness was emitting "Initializing..." from
git-init. Fixup this test to be more modern:

    - test_expect_object_count() and count_objects() are unused

    - use grep directly instead of test "..." = $(grep ...)

    - end the test_expect_success line with a single-quote and put the
      test on a new line

    - put as much code inside the test harness as possible

    - no_strict_count_check is unused and duplicates the test
      "new object count"

    - use && whenever possible to catch errors early

    - use test_tick instead of GIT_AUTHOR_DATE=$sec

    - remove debugging aid log.txt

    - use subshells instead of cd-ing around

Also merge the pull test into one large test.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27 00:06:12 -07:00
Junio C Hamano d7107ca65f completion: fix PS1 display during an AM on detached HEAD
This is a companion patch to previous 8763dbb (completion: fix PS1 display
during a merge on detached HEAD, 2009-05-16).  While rebasing or running am
on a detached HEAD, the code failed to set $b (branch description) that
enables the whole status display business.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27 00:01:28 -07:00
Benjamin Kramer 94ad243702 imap-send: add support for IPv6
Add IPv6 support by implementing name resolution with the
protocol agnostic getaddrinfo(3) API. The old gethostbyname(3)
code is still available when git is compiled with NO_IPV6.

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-26 22:22:47 -07:00
Junio C Hamano 33fd7169ed Update draft release notes to 1.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 19:46:17 -07:00
Junio C Hamano 23807fa008 Merge branch 'maint'
* maint:
  Prepare for 1.6.3.2
  fix cat-file usage message and documentation
  fetch: report ref storage DF errors more accurately
  lock_ref: inform callers of unavailable ref
  merge-options.txt: Clarify merge --squash

Conflicts:
	RelNotes
2009-05-25 19:44:52 -07:00
Junio C Hamano e57cb01582 Prepare for 1.6.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 19:20:39 -07:00
Junio C Hamano 2a1feb92ee Merge branch 'js/maint-no-ln-across-libexec-and-bin' into maint
* js/maint-no-ln-across-libexec-and-bin:
  Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile

Conflicts:
	Makefile
2009-05-25 19:04:29 -07:00
Junio C Hamano 5e04a1ee33 Merge branch 'lt/maint-diff-reduce-lstat' into maint
* lt/maint-diff-reduce-lstat:
  Teach 'git checkout' to preload the index contents
  Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
2009-05-25 19:04:08 -07:00
Junio C Hamano 597a178246 Merge branch 'jm/format-patch-no-auto-n-when-k-is-given' into maint
* jm/format-patch-no-auto-n-when-k-is-given:
  format-patch let -k override a config-specified format.numbered
2009-05-25 19:03:52 -07:00
Junio C Hamano 5c44cc9ea2 Merge branch 'do/maint-merge-recursive-fix' into maint
* do/maint-merge-recursive-fix:
  merge-recursive: never leave index unmerged while recursing
2009-05-25 19:03:43 -07:00
Junio C Hamano 417653777a Merge branch 'jk/maint-1.6.0-trace-argv' into maint
* jk/maint-1.6.0-trace-argv:
  fix GIT_TRACE segfault with shell-quoted aliases

Conflicts:
	alias.c
2009-05-25 19:03:20 -07:00
Junio C Hamano 4619136c8b Merge branch 'np/push-delta' into maint
* np/push-delta:
  allow OFS_DELTA objects during a push
2009-05-25 19:02:11 -07:00
Junio C Hamano e82f625416 Merge branch 'ar/merge-one-file-diag' into maint
* ar/merge-one-file-diag:
  Clarify kind of conflict in merge-one-file helper
2009-05-25 19:01:59 -07:00
Junio C Hamano 2c5942dbae Merge branch 'ar/unlink-err' into maint
* ar/unlink-err:
  print unlink(2) errno in copy_or_link_directory
  replace direct calls to unlink(2) with unlink_or_warn
  Introduce an unlink(2) wrapper which gives warning if unlink failed
2009-05-25 19:01:50 -07:00
Junio C Hamano 43f8f560c0 Merge branch 'jk/maint-add-empty' into maint
* jk/maint-add-empty:
  add: don't complain when adding empty project root
2009-05-25 19:01:41 -07:00
Jeff King 0e5168fd18 fix cat-file usage message and documentation
cat-file with an object on the command line requires an
option to tell it what to output (type, size, pretty-print,
etc). However, the square brackets in the usage imply that
those options are not required. This patch switches them to
parentheses to indicate "required but grouped-OR" (curly
braces might also work, but this follows the convention used
already by "git stash").

While we're at it, let's change the <sha1> specifier in the
usage to <object>. That's what the documentation uses, and
it does actually use the regular object lookup.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 12:08:15 -07:00
Jeff King fa25075979 fetch: report ref storage DF errors more accurately
When we fail to store a fetched ref, we recommend that the
user try running "git prune" to remove up any old refs that
have been deleted by the remote, which would clear up any DF
conflicts. However, ref storage might fail for other
reasons (e.g., permissions problems) in which case the
advice is useless and misleading.

This patch detects when there is an actual DF situation and
only issues the advice when one is found.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 12:07:07 -07:00
Jeff King f475e08edb lock_ref: inform callers of unavailable ref
One of the ways that locking might fail is that there is a
DF conflict between two refs (e.g., you want to lock
"foo/bar" but "foo" already exists). In this case, we return
an error, but there is no way for the caller to know the
specific problem.

This patch sets errno to ENOTDIR, which is the most sensible
code. It's what we would see if the refs were stored purely
in the filesystem (but these days we must check the
namespace manually due to packed refs).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 12:06:54 -07:00
Jeff King 3cd7388d57 convert bare readlink to strbuf_readlink
This particular readlink call never NUL-terminated its
result, making it a potential source of bugs (though there
is no bug now, as it currently always respects the length
field). Let's just switch it to strbuf_readlink which is
shorter and less error-prone.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 11:34:02 -07:00
Johannes Sixt 32a90233d1 t3701: ensure correctly set up repository after skipped tests
There are two tests that are skipped if file modes are not obeyed by the
file system. In this case, the subsequent test failed because the
repository was in an unexpected state. This corrects it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 11:23:30 -07:00
Michael J Gruber f5d4c4d0f1 merge-options.txt: Clarify merge --squash
With the --squash option, merge sets up the index just like for a real
merge, but without the merge info (stages). Say so.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25 11:23:18 -07:00
Junio C Hamano 9619ff1415 Merge branch 'maint'
* maint:
  http-push.c::remove_locks(): fix use after free
2009-05-24 15:29:55 -07:00
Junio C Hamano f5b223abfd Merge branch 'maint-1.6.2' into maint
* maint-1.6.2:
  http-push.c::remove_locks(): fix use after free
2009-05-24 15:29:33 -07:00
Junio C Hamano 34ab57df97 Merge branch 'maint-1.6.1' into maint-1.6.2
* maint-1.6.1:
  http-push.c::remove_locks(): fix use after free
2009-05-24 15:29:23 -07:00
Junio C Hamano ff6e93fe60 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  http-push.c::remove_locks(): fix use after free
2009-05-24 15:29:13 -07:00
Alex Riesen 6589ebf107 http-push.c::remove_locks(): fix use after free
Noticed and reported by Serhat Şevki Dinçer.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24 11:08:31 -07:00
Nguyễn Thái Ngọc Duy 7a7eb5173d t/t3400-rebase.sh: add more tests to help migrating git-rebase.sh to C
These new tests make sure I don't miss any check being performed before
rebase is proceeded (which is well tested by other tests)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24 10:25:55 -07:00
René Scharfe dbb6a4ada6 grep: fix word-regexp at the beginning of lines
After bol is forwarded, it doesn't represent the beginning of the line
any more.  This means that the beginning-of-line marker (^) mustn't match,
i.e. the regex flag REG_NOTBOL needs to be set.

This bug was introduced by fb62eb7fab
("grep -w: forward to next possible position after rejected match").

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 16:29:05 -07:00
Stephen Boyd 4c8d4c14c6 apply, fmt-merge-msg: use relative filenames
Commit dbd0f5c7 (Files given on the command line are relative to $cwd,
2008-08-06) only fixed git-commit and git-tag. But, git-apply and
git-fmt-merge-msg didn't get the update and exhibit the same behavior.

Fix them and add tests for "apply --build-fake-ancestor" and
"fmt-merge-msg -F".

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 15:45:52 -07:00
Stephen Boyd aae94ffbc1 commit: -F overrides -t
Commit dbd0f5c7 (Files given on the command line are relative to $cwd,
2008-08-06) introduced parse_options_fix_filename() as a quick fix for
filename arguments used in the parse options API.

git-commit was still broken. This means

    git commit -F log -t temp

in a subdirectory would make git think the log message should be taken
from temp instead of log.

This is because parse_options_fix_filename() calls prefix_filename()
which uses a single static char buffer to do its work. Making two calls
with two char pointers causes the pointers to alias. To prevent
aliasing, we duplicate the string returned by
parse_options_fix_filename().

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 15:45:52 -07:00
Jim Meyering 5ffd3113d4 post-receive-email: hooks.showrev: show how to include both web link and patch
Add a comment showing how to include a web link (i.e. gitweb/cgit)
and a patch in the email that is sent for each pushed commit.

The quoting was tricky enough that it's worth documenting.  To add
two blank lines (i.e. put \n\n in the printf), you would need to
say \\\\n\\\\n, and in the end, the pair of "echo" statements seemed
better.  This is used in glibc.git repository:

  http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=summary

push-triggered messages have been sent to this list since May 21:

  http://sourceware.org/ml/glibc-cvs/2009-q2/

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 10:29:22 -07:00
Johannes Schindelin b74d779bd9 MinGW: Fix compiler warning in merge-recursive
GCC 4.4.0 on Windows does not like the format %zu.  It is quite unlikely,
though, that we need more merge bases than a %d can display, so replace
the %zu by a %d.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 01:54:45 -07:00
Johannes Schindelin 0dbbbc1e26 MinGW: Add a simple getpass()
We need getpass() to activate curl on MinGW.  Although the default
Makefile currently has 'NO_CURL = YesPlease', msysgit releases do
provide curl support, so getpass() is used.

[spr: - edited commit message.
      - squashed commit that provides getpass() declaration.]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 01:54:45 -07:00
Johannes Schindelin 27e3219f1a MinGW: use POSIX signature of waitpid()
Git's source code expects waitpid() to return a signed int status.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 01:54:45 -07:00
Johannes Schindelin 352c81114c MinGW: the path separator to split GITPERLLIB is ';' on Win32
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 01:54:45 -07:00
Peter Harris bedc4279a8 MinGW: Scan for \r in addition to \n when reading shbang lines
\r is common on Windows, so we should handle it gracefully.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23 01:54:45 -07:00
Junio C Hamano 7f5a68ad4d Merge branch 'jn/gitweb-cleanup'
* jn/gitweb-cleanup:
  gitweb: Remove unused $hash_base parameter from normalize_link_target
  gitweb: Simplify snapshot format detection logic in evaluate_path_info
  gitweb: Use capturing parentheses only when you intend to capture
  gitweb: Replace wrongly added tabs with spaces
  gitweb: Use block form of map/grep in a few cases more
  gitweb: Always use three argument form of open
  gitweb: Always use three argument form of open
  gitweb: Do not use bareword filehandles
2009-05-23 01:44:06 -07:00
Junio C Hamano c9a88deede Merge branch 'mg/track'
* mg/track:
  Fix behavior with non-commit upstream references
  Test tracking of non-commit upstreams
2009-05-23 01:44:00 -07:00
Junio C Hamano 44ee247f8d Merge branch 'fc/decorate-tag'
* fc/decorate-tag:
  Prettify log decorations even more
  Change prettify_ref to prettify_refname
2009-05-23 01:43:50 -07:00
Junio C Hamano 212fa1d960 Merge branch 'tp/send-email-from-config'
* tp/send-email-from-config:
  send-email: Add config option for sender address
2009-05-23 01:43:26 -07:00