Commit Graph

27886 Commits

Author SHA1 Message Date
Junio C Hamano
d88698ec0b Merge branch 'jc/branch-desc-typoavoidance'
* jc/branch-desc-typoavoidance:
  branch --edit-description: protect against mistyped branch name
2012-02-10 14:07:58 -08:00
Junio C Hamano
e684e89ef0 Merge branch 'jn/rpm-spec'
* jn/rpm-spec:
  git.spec: Workaround localized messages not put in any RPM
2012-02-10 14:07:49 -08:00
Junio C Hamano
e06ed3ed8a Merge branch 'jk/tests-write-script'
* jk/tests-write-script:
  t0300: use write_script helper
  tests: add write_script helper function
2012-02-10 14:07:42 -08:00
Junio C Hamano
1e9d3e3663 Sync with maint 2012-02-10 14:07:00 -08:00
Junio C Hamano
bf5cf766af Update draft release notes to 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-10 14:04:20 -08:00
Junio C Hamano
4fed4c809a Merge branch 'jc/maint-request-pull-for-tag' into maint
* jc/maint-request-pull-for-tag:
  request-pull: explicitly ask tags/$name to be pulled
2012-02-10 13:59:02 -08:00
Junio C Hamano
184a7aa7bf Merge branch 'tr/grep-l-with-decoration' into maint
* tr/grep-l-with-decoration:
  grep: fix -l/-L interaction with decoration lines
2012-02-10 13:59:02 -08:00
Junio C Hamano
5febbda4e7 Merge branch 'jl/submodule-re-add' into maint
* jl/submodule-re-add:
  submodule add: fix breakage when re-adding a deep submodule
2012-02-10 13:59:01 -08:00
Junio C Hamano
38ca63f3c0 Merge branch 'da/maint-mergetool-twoway' into maint
* da/maint-mergetool-twoway:
  mergetool: Provide an empty file when needed
2012-02-10 13:59:01 -08:00
Junio C Hamano
12766861cd Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-07 13:01:56 -08:00
Junio C Hamano
dc347e9f6a Merge branch 'jc/maint-request-pull-for-tag'
* jc/maint-request-pull-for-tag:
  request-pull: explicitly ask tags/$name to be pulled
2012-02-07 12:57:10 -08:00
Junio C Hamano
715d130460 Merge branch 'bl/gitweb-project-filter'
* bl/gitweb-project-filter:
  gitweb: Make project search respect project_filter
  gitweb: improve usability of projects search form
  gitweb: place links to parent directories in page header
  gitweb: show active project_filter in project_list page header
  gitweb: limit links to alternate forms of project_list to active project_filter
  gitweb: add project_filter to limit project list to a subdirectory
  gitweb: prepare git_get_projects_list for use outside 'forks'.
  gitweb: move hard coded .git suffix out of git_get_projects_list
2012-02-07 12:57:05 -08:00
Junio C Hamano
6f1ede8423 Merge branch 'jx/i18n-more-marking'
* jx/i18n-more-marking:
  i18n: format_tracking_info "Your branch is behind" message
  i18n: git-commit whence_s "merge/cherry-pick" message
2012-02-07 12:56:54 -08:00
Junio C Hamano
12b681c3d2 Merge branch 'jn/svn-fe'
* jn/svn-fe: (36 commits)
  vcs-svn: suppress a -Wtype-limits warning
  vcs-svn: allow import of > 4GiB files
  vcs-svn: rename check_overflow arguments for clarity
  vcs-svn/svndiff.c: squelch false "unused" warning from gcc
  vcs-svn: reset first_commit_done in fast_export_init
  vcs-svn: do not initialize report_buffer twice
  vcs-svn: avoid hangs from corrupt deltas
  vcs-svn: guard against overflow when computing preimage length
  vcs-svn: cap number of bytes read from sliding view
  test-svn-fe: split off "test-svn-fe -d" into a separate function
  vcs-svn: implement text-delta handling
  vcs-svn: let deltas use data from preimage
  vcs-svn: let deltas use data from postimage
  vcs-svn: verify that deltas consume all inline data
  vcs-svn: implement copyfrom_data delta instruction
  vcs-svn: read instructions from deltas
  vcs-svn: read inline data from deltas
  vcs-svn: read the preimage when applying deltas
  vcs-svn: parse svndiff0 window header
  vcs-svn: skeleton of an svn delta parser
  ...
2012-02-07 12:56:38 -08:00
Junio C Hamano
53828bb065 Merge branch 'rt/completion-branch-edit-desc'
* rt/completion-branch-edit-desc:
  completion: --edit-description option for git-branch
2012-02-07 12:56:33 -08:00
Junio C Hamano
65da088244 Sync with maint 2012-02-06 00:04:47 -08:00
Junio C Hamano
2d1abfa8ee Prepare for 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 00:03:18 -08:00
Adrian Weimann
2ff14e31bd completion: --edit and --no-edit for git-merge
Signed-off-by: Adrian Weimann <adrian.weimann@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-06 00:00:54 -08:00
Junio C Hamano
f2120eb4db Merge branch 'sp/smart-http-failure-to-push' into maint
* sp/smart-http-failure-to-push:
  remote-curl: Fix push status report when all branches fail
2012-02-05 23:58:43 -08:00
Junio C Hamano
e27d620e91 Merge branch 'jc/maint-log-first-parent-pathspec' into maint
* jc/maint-log-first-parent-pathspec:
  Making pathspec limited log play nicer with --first-parent
2012-02-05 23:58:42 -08:00
Junio C Hamano
4802997c75 Merge branch 'cb/push-quiet' into maint
* cb/push-quiet:
  t5541: avoid TAP test miscounting
  fix push --quiet: add 'quiet' capability to receive-pack
  server_supports(): parse feature list more carefully
2012-02-05 23:58:42 -08:00
Junio C Hamano
1c719ffc3d Merge branch 'cb/maint-kill-subprocess-upon-signal' into maint
* cb/maint-kill-subprocess-upon-signal:
  dashed externals: kill children on exit
  run-command: optionally kill children on exit
2012-02-05 23:58:42 -08:00
Junio C Hamano
cc811d8d02 Sync with 1.7.6.6
* maint-1.7.8:
  Git 1.7.6.6
  imap-send: remove dead code
2012-02-05 23:53:21 -08:00
Junio C Hamano
d0482e88a7 Sync with 1.7.6.6
* maint-1.7.7:
  Git 1.7.6.6
  imap-send: remove dead code
2012-02-05 23:52:53 -08:00
Junio C Hamano
110c511dbe Sync with 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 23:52:25 -08:00
Junio C Hamano
f174a2583c Git 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 23:50:52 -08:00
Jeff King
28b22f8af9 imap-send: remove dead code
The imap-send code was adapted from another project, and
still contains many unused bits of code. One of these bits
contains a type "struct string_list" which bears no
resemblence to the "struct string_list" we use elsewhere in
git. This causes the compiler to complain if git's
string_list ever becomes part of cache.h.

Let's just drop the dead code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 23:44:56 -08:00
Junio C Hamano
c2d17ba3db branch --edit-description: protect against mistyped branch name
It is very easy to mistype the branch name when editing its description,
e.g.

	$ git checkout -b my-topic master
	: work work work
	: now we are at a good point to switch working something else
	$ git checkout master
	: ah, let's write it down before we forget what we were doing
	$ git branch --edit-description my-tpoic

The command does not notice that branch 'my-tpoic' does not exist.  It is
not lost (it becomes description of an unborn my-tpoic branch), but is not
very useful.  So detect such a case and error out to reduce the grief
factor from this common mistake.

This incidentally also errors out --edit-description when the HEAD points
at an unborn branch (immediately after "init", or "checkout --orphan"),
because at that point, you do not even have any commit that is part of
your history and there is no point in describing how this particular
branch is different from the branch it forked off of, which is the useful
bit of information the branch description is designed to capture.

We may want to special case the unborn case later, but that is outside the
scope of this patch to prevent more common mistakes before 1.7.9 series
gains too much widespread use.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 17:28:03 -08:00
Jakub Narebski
3a9f58c00a git.spec: Workaround localized messages not put in any RPM
Currently building git RPM from tarball results in the following
error:

  RPM build errors:
     Installed (but unpackaged) file(s) found:
     /usr/share/locale/is/LC_MESSAGES/git.mo

This is caused by the fact that localized messages do not have their
place in some RPM package.  Let's postpone decision where they should
be put (be it git-i18n-Icelandic, or git-i18n, or git package itself)
for later by removing locale files at the end of install phase.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-03 23:06:30 -08:00
Jeff King
3d9f5b674f t0300: use write_script helper
t0300 creates some helper shell scripts, and marks them with
"!/bin/sh". Even though the scripts are fairly simple, they
can fail on broken shells (specifically, Solaris /bin/sh
will persist a temporary assignment to IFS in a "read"
command).

Rather than work around the problem for Solaris /bin/sh,
using write_script will make sure we point to a known-good
shell that the user has given us.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-03 23:01:55 -08:00
Junio C Hamano
840c519d7e tests: add write_script helper function
Many of the scripts in the test suite write small helper
shell scripts to disk. It's best if these shell scripts
start with "#!$SHELL_PATH" rather than "#!/bin/sh", because
/bin/sh on some platforms is too buggy to be used.

However, it can be cumbersome to expand $SHELL_PATH, because
the usual recipe for writing a script is:

	cat >foo.sh <<-\EOF
	#!/bin/sh
	echo my arguments are "$@"
	EOF

To expand $SHELL_PATH, you have to either interpolate the
here-doc (which would require quoting "\$@"), or split the
creation into two commands (interpolating the $SHELL_PATH
line, but not the rest of the script). Let's provide a
helper function that makes that less syntactically painful.

While we're at it, this helper can also take care of the
"chmod +x" that typically comes after the creation of such a
script, saving the caller a line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-03 23:01:07 -08:00
Jonathan Nieder
3f790003a3 vcs-svn: suppress a -Wtype-limits warning
On 32-bit architectures with 64-bit file offsets, gcc 4.3 and earlier
produce the following warning:

	    CC vcs-svn/sliding_window.o
	vcs-svn/sliding_window.c: In function `check_overflow':
	vcs-svn/sliding_window.c:36: warning: comparison is always false \
	    due to limited range of data type

The warning appears even when gcc is run without any warning flags
(this is gcc bug 12963).  In later versions the same warning can be
reproduced with -Wtype-limits, which is implied by -Wextra.

On 64-bit architectures it really is possible for a size_t not to be
representable as an off_t so the check this is warning about is not
actually redundant.  But even false positives are distracting.  Avoid
the warning by making the "len" argument to check_overflow a
uintmax_t; no functional change intended.

Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-02 11:05:18 -08:00
Jonathan Nieder
150f75467c vcs-svn: allow import of > 4GiB files
There is no reason in principle that an svn-format dump would not be
able to represent a file whose length does not fit in a 32-bit
integer.  Use off_t consistently to represent file lengths (in place
of using uint32_t in some contexts) so we can handle that.

Most svn-fe code is already ready to do that without this patch and
passes values of type off_t around.  The type mismatch from stragglers
was noticed with gcc -Wtype-limits.

While at it, tighten the parsing of the Text-content-length field to
make sure it is a number and does not overflow, and tighten other
overflow checks as that value is passed around and manipulated.

Inspired-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-02 11:03:30 -08:00
Ramsay Jones
173223aa62 vcs-svn: rename check_overflow arguments for clarity
Code using the argument names a and b just doesn't look right (not
sure why!).  Use more explicit names "offset" and "len" to make their
type and meaning clearer.

Also rename check_overflow() to check_offset_overflow() to clarify
that we are making sure that "len" bytes beyond "offset" still fits
the type to represent an offset.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-02 10:53:18 -08:00
Jiang Xin
8a5b749428 i18n: format_tracking_info "Your branch is behind" message
Function format_tracking_info in remote.c is called by
wt_status_print_tracking in wt-status.c, which will print
branch tracking message in git-status. git-checkout also
show these messages through it's report_tracking function.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 18:09:17 -08:00
Jiang Xin
be39de2b26 i18n: git-commit whence_s "merge/cherry-pick" message
Mark the "merge/cherry-pick" messages in whence_s for translation.
These messages returned from whence_s function are used as argument
to build other messages.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 15:46:24 -08:00
Junio C Hamano
f3fb07509c Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 15:26:53 -08:00
Jakub Narebski
abc0c9d2d7 gitweb: Make project search respect project_filter
Make gitweb search within filtered projects (i.e. projects shown), and
change "List all projects" to "List all projects in '$project_filter/'"
if project_filter is used.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:50 -08:00
Jakub Narebski
a1e1b2d77b gitweb: improve usability of projects search form
Refactor generating project search form into git_project_search_form().

Make text field wider and add on mouse over explanation (via "title"
attribute), add an option to use regular expressions, and replace
'Search:' label with [Search] button.

Also add "List all projects" link to make it easier to go back from search
result to list of all projects (note that an empty search term is
disallowed).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:50 -08:00
Bernhard R. Link
4426ba2919 gitweb: place links to parent directories in page header
Change html page headers to not only link the project root and the
currently selected project but also the directories in between using
project_filter. (Allowing to jump to a list of all projects within
that intermediate directory directly and making the project_filter
feature visible to users).

Signed-off-by: Bernhard R. Link <brlink@debian.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:50 -08:00
Bernhard R. Link
40efa22309 gitweb: show active project_filter in project_list page header
In the page header of a project_list view with a project_filter
given show breadcrumbs in the page headers showing which directory
it is currently limited to and also containing links to the parent
directories.

Signed-off-by: Bernhard R. Link <brlink@debian.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:49 -08:00
Bernhard R. Link
56efd9d252 gitweb: limit links to alternate forms of project_list to active project_filter
If project_list action is given a project_filter argument, pass that to
TXT and OPML formats.

This way [OPML] and [TXT] links provide the same list of projects as
the projects_list page they are linked from.

Signed-off-by: Bernhard R. Link <brlink@debian.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:49 -08:00
Bernhard R. Link
19d2d23998 gitweb: add project_filter to limit project list to a subdirectory
This commit changes the project listing views (project_list,
project_index and opml) to limit the output to only projects in a
subdirectory if the new optional parameter ?pf=directory name is
used.

The implementation of the filter reuses the implementation used for
the 'forks' action (i.e. listing all projects within that directory
from the projects list file (GITWEB_LIST) or only projects in the
given subdirectory of the project root directory without a projects
list file).

Reusing $project instead of adding a new parameter would have been
nicer from a UI point-of-view (including PATH_INFO support) but
would complicate the $project validating code that is currently
being used to ensure nothing is exported that should not be viewable.

Signed-off-by: Bernhard R. Link <brlink@debian.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:49 -08:00
Bernhard R. Link
348a6589e0 gitweb: prepare git_get_projects_list for use outside 'forks'.
Use of the filter option of git_get_projects_list is currently limited
to forks. It currently assumes the project belonging to the filter
directory was already validated to be visible in the project list.

To make it more generic add an optional argument to denote visibility
verification is still needed.

If there is a projects list file (GITWEB_LIST) only projects from
this list are returned anyway, so no more checks needed.

If there is no projects list file and the caller requests strict
checking (GITWEB_STRICT_EXPORT), do not jump directly to the
given directory but instead do a normal search and filter the
results instead.

The only effect of GITWEB_STRICT_EXPORT without GITWEB_LIST is to make
sure no project can be viewed without also be found starting from
project root. git_get_projects_list without this patch does not enforce
this but all callers only call it with a filter already checked this
way. With this parameter a caller can request this check if the filter
cannot be checked this way.

Signed-off-by: Bernhard R. Link <brlink@debian.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:49 -08:00
Bernhard R. Link
4c7cd17714 gitweb: move hard coded .git suffix out of git_get_projects_list
Use of the filter option of git_get_projects_list is currently
limited to forks. It hard codes removal of ".git" suffixes from
the filter.

To make it more generic move the .git suffix removal to the callers.

Signed-off-by: Bernhard R. Link <brlink@debian.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-01 12:52:33 -08:00
Junio C Hamano
873ce7c8d5 Merge branch 'tr/merge-edit-guidance'
* tr/merge-edit-guidance:
  merge: add instructions to the commit message when editing
2012-01-31 22:31:03 -08:00
Junio C Hamano
af6b37fab1 Merge branch 'jc/pull-signed-tag'
* jc/pull-signed-tag:
  merge: use editor by default in interactive sessions

Conflicts:
	Documentation/merge-options.txt
2012-01-31 22:30:42 -08:00
Junio C Hamano
2a2aa8e556 Merge branch 'ar/i18n-no-gettext'
* ar/i18n-no-gettext:
  i18n: Do not force USE_GETTEXT_SCHEME=fallthrough on NO_GETTEXT
  i18n: Make NO_GETTEXT imply fallthrough scheme in shell l10n
  add a Makefile switch to avoid gettext translation in shell scripts
  git-sh-i18n: restructure the logic to compute gettext.sh scheme
2012-01-31 22:24:23 -08:00
Junio C Hamano
5ce2b97d2c Merge branch 'nd/clone-detached'
* nd/clone-detached:
  clone: fix up delay cloning conditions
  push: do not let configured foreign-vcs permanently clobbered
  clone: print advice on checking out detached HEAD
  clone: allow --branch to take a tag
  clone: refuse to clone if --branch points to bogus ref
  clone: --branch=<branch> always means refs/heads/<branch>
  clone: delay cloning until after remote HEAD checking
  clone: factor out remote ref writing
  clone: factor out HEAD update code
  clone: factor out checkout code
  clone: write detached HEAD in bare repositories
  t5601: add missing && cascade
2012-01-31 22:24:23 -08:00
Junio C Hamano
5e92376f8f Merge branch 'da/maint-mergetool-twoway'
* da/maint-mergetool-twoway:
  mergetool: Provide an empty file when needed
2012-01-31 22:01:17 -08:00