Junio C Hamano [Mon, 13 Feb 2012 06:42:14 +0000 (22:42 -0800)]
Merge branch 'bw/inet-pton-ntop-compat'
* bw/inet-pton-ntop-compat:
Drop system includes from inet_pton/inet_ntop compatibility wrappers
Junio C Hamano [Mon, 13 Feb 2012 06:42:10 +0000 (22:42 -0800)]
Merge branch 'jc/maint-commit-ignore-i-t-a'
* jc/maint-commit-ignore-i-t-a:
commit: ignore intent-to-add entries instead of refusing
Conflicts:
cache-tree.c
Junio C Hamano [Mon, 13 Feb 2012 06:42:06 +0000 (22:42 -0800)]
Merge branch 'jk/maint-tag-show-fixes'
* 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
Junio C Hamano [Mon, 13 Feb 2012 06:42:02 +0000 (22:42 -0800)]
Merge branch 'mm/empty-loose-error-message'
* mm/empty-loose-error-message:
fsck: give accurate error message on empty loose object files
Junio C Hamano [Mon, 13 Feb 2012 06:41:56 +0000 (22:41 -0800)]
Merge branch 'nk/ctype-for-perf'
* nk/ctype-for-perf:
ctype: implement islower/isupper macro
ctype.c only wants git-compat-util.h
Junio C Hamano [Mon, 13 Feb 2012 06:41:51 +0000 (22:41 -0800)]
Merge branch 'jn/merge-no-edit-fix'
* jn/merge-no-edit-fix:
merge: do not launch an editor on "--no-edit $tag"
Conflicts:
builtin/merge.c
Junio C Hamano [Fri, 10 Feb 2012 22:15:38 +0000 (14:15 -0800)]
Update draft release notes to 1.7.10
Document bunch of bugfix topics to be merged down to 'maint' soonish
for 1.7.9.1 maintenance release.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 10 Feb 2012 22:08:27 +0000 (14:08 -0800)]
Merge branch 'js/add-e-submodule-fix'
* js/add-e-submodule-fix:
add -e: do not show difference in a submodule that is merely dirty
Junio C Hamano [Fri, 10 Feb 2012 22:08:12 +0000 (14:08 -0800)]
Merge branch 'jc/parse-date-raw'
* jc/parse-date-raw:
parse_date(): '@' prefix forces git-timestamp
parse_date(): allow ancient git-timestamp
Junio C Hamano [Fri, 10 Feb 2012 22:08:02 +0000 (14:08 -0800)]
Merge branch 'jc/merge-ff-only-stronger-than-signed-merge'
* jc/merge-ff-only-stronger-than-signed-merge:
merge: do not create a signed tag merge under --ff-only option
Junio C Hamano [Fri, 10 Feb 2012 22:07:58 +0000 (14:07 -0800)]
Merge branch 'jc/branch-desc-typoavoidance'
* jc/branch-desc-typoavoidance:
branch --edit-description: protect against mistyped branch name
Junio C Hamano [Fri, 10 Feb 2012 22:07:49 +0000 (14:07 -0800)]
Merge branch 'jn/rpm-spec'
* jn/rpm-spec:
git.spec: Workaround localized messages not put in any RPM
Junio C Hamano [Fri, 10 Feb 2012 22:07:42 +0000 (14:07 -0800)]
Merge branch 'jk/tests-write-script'
* jk/tests-write-script:
t0300: use write_script helper
tests: add write_script helper function
Junio C Hamano [Fri, 10 Feb 2012 22:04:32 +0000 (14:04 -0800)]
Sync with maint
Junio C Hamano [Fri, 10 Feb 2012 22:04:20 +0000 (14:04 -0800)]
Update draft release notes to 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 10 Feb 2012 21:59:02 +0000 (13:59 -0800)]
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
Junio C Hamano [Fri, 10 Feb 2012 21:59:02 +0000 (13:59 -0800)]
Merge branch 'tr/grep-l-with-decoration' into maint
* tr/grep-l-with-decoration:
grep: fix -l/-L interaction with decoration lines
Junio C Hamano [Fri, 10 Feb 2012 21:59:01 +0000 (13:59 -0800)]
Merge branch 'jl/submodule-re-add' into maint
* jl/submodule-re-add:
submodule add: fix breakage when re-adding a deep submodule
Junio C Hamano [Fri, 10 Feb 2012 21:59:01 +0000 (13:59 -0800)]
Merge branch 'da/maint-mergetool-twoway' into maint
* da/maint-mergetool-twoway:
mergetool: Provide an empty file when needed
Namhyung Kim [Fri, 10 Feb 2012 02:13:31 +0000 (11:13 +0900)]
ctype: implement islower/isupper macro
"perf" uses a the forked copy of this file, and wants to use these two
macros.
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Namhyung Kim [Fri, 10 Feb 2012 02:13:30 +0000 (11:13 +0900)]
ctype.c only wants git-compat-util.h
The implementation of sane ctype macros only depends on symbols in
git-compat-util.h not cache.h
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 9 Feb 2012 21:30:52 +0000 (13:30 -0800)]
merge: do not launch an editor on "--no-edit $tag"
When the user explicitly asked us not to, don't launch an editor.
But do everything else the same way as the "edit" case, i.e. leave the
comment with verification result in the log template and record the
mergesig in the resulting merge commit for later inspection.
Based on initiail analysis by Jonathan Nieder.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 6 Feb 2012 18:13:27 +0000 (10:13 -0800)]
tag: do not show non-tag contents with "-n"
"git tag -n" did not check the type of the object it is reading the top n
lines from. At least, avoid showing the beginning of trees and blobs when
dealing with lightweight tags that point at them.
As the payload of a tag and a commit look similar in that they both start
with a header block, which is skipped for the purpose of "-n" output,
followed by human readable text, allow the message of commit objects to be
shown just like the contents of tag objects. This avoids regression for
people who have been using "tag -n" to show the log messages of commits
that are pointed at by lightweight tags.
Test script is from Jeff King.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 7 Feb 2012 21:01:56 +0000 (13:01 -0800)]
Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 7 Feb 2012 20:57:10 +0000 (12:57 -0800)]
Merge branch 'jc/maint-request-pull-for-tag'
* jc/maint-request-pull-for-tag:
request-pull: explicitly ask tags/$name to be pulled
Junio C Hamano [Tue, 7 Feb 2012 20:57:05 +0000 (12:57 -0800)]
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
Junio C Hamano [Tue, 7 Feb 2012 20:56:54 +0000 (12:56 -0800)]
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
Junio C Hamano [Tue, 7 Feb 2012 20:56:38 +0000 (12:56 -0800)]
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
...
Junio C Hamano [Tue, 7 Feb 2012 20:56:33 +0000 (12:56 -0800)]
Merge branch 'rt/completion-branch-edit-desc'
* rt/completion-branch-edit-desc:
completion: --edit-description option for git-branch
Junio C Hamano [Tue, 7 Feb 2012 19:55:48 +0000 (11:55 -0800)]
commit: ignore intent-to-add entries instead of refusing
Originally, "git add -N" was introduced to help users from forgetting to
add new files to the index before they ran "git commit -a". As an attempt
to help them further so that they do not forget to say "-a", "git commit"
to commit the index as-is was taught to error out, reminding the user that
they may have forgotten to add the final contents of the paths before
running the command.
This turned out to be a false "safety" that is useless. If the user made
changes to already tracked paths and paths added with "git add -N", and
then ran "git add" to register the final contents of the paths added with
"git add -N", "git commit" will happily create a commit out of the index,
without including the local changes made to the already tracked paths. It
was not a useful "safety" measure to prevent "forgetful" mistakes from
happening.
It turns out that this behaviour is not just a useless false "safety", but
actively hurts use cases of "git add -N" that were discovered later and
have become popular, namely, to tell Git to be aware of these paths added
by "git add -N", so that commands like "git status" and "git diff" would
include them in their output, even though the user is not interested in
including them in the next commit they are going to make.
Fix this ancient UI mistake, and instead make a commit from the index
ignoring the paths added by "git add -N" without adding real contents.
Based on the work by Nguyễn Thái Ngọc Duy, and helped by injection of
sanity from Jonathan Nieder and others on the Git mailing list.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Tue, 7 Feb 2012 04:05:48 +0000 (05:05 +0100)]
add -e: do not show difference in a submodule that is merely dirty
When the HEAD of the submodule matches what is recorded in the index of
the superproject, and it has local changes or untracked files, the patch
offered by "git add -e" for editing shows a diff like this:
diff --git a/submodule b/submodule
<header>
-
deadbeef...
+
deadbeef...-dirty
Because applying such a patch has no effect to the index, this is a
useless noise. Generate the patch with IGNORE_DIRTY_SUBMODULES flag to
prevent such a change from getting reported.
This patch also loses the "-dirty" suffix from the output when the HEAD of
the submodule is different from what is in the index of the superproject.
As such dirtiness expressed by the suffix does not affect the result of
the patch application at all, there is no information lost if we remove
it. The user could still run "git status" before "git add -e" if s/he
cares about the dirtiness.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Mon, 6 Feb 2012 16:24:52 +0000 (17:24 +0100)]
fsck: give accurate error message on empty loose object files
Since
3ba7a065527a (A loose object is not corrupt if it
cannot be read due to EMFILE), "git fsck" on a repository with an empty
loose object file complains with the error message
fatal: failed to read object <sha1>: Invalid argument
This comes from a failure of mmap on this empty file, which sets errno to
EINVAL. Instead of calling xmmap on empty file, we display a clean error
message ourselves, and return a NULL pointer. The new message is
error: object file .git/objects/09/<rest-of-sha1> is empty
fatal: loose object <sha1> (stored in .git/objects/09/<rest-of-sha1>) is corrupt
The second line was already there before the regression in
3ba7a065527a,
and the first is an additional message, that should help diagnosing the
problem for the user.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 6 Feb 2012 08:13:42 +0000 (03:13 -0500)]
tag: die when listing missing or corrupt objects
We don't usually bother looking at tagged objects at all
when listing. However, if "-n" is specified, we open the
objects to read the annotations of the tags. If we fail to
read an object, or if the object has zero length, we simply
silently return.
The first case is an indication of a broken or corrupt repo,
and we should notify the user of the error.
The second case is OK to silently ignore; however, the
existing code leaked the buffer returned by read_sha1_file.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 6 Feb 2012 08:13:12 +0000 (03:13 -0500)]
tag: fix output of "tag -n" when errors occur
When "git tag" is instructed to print lines from annotated
tags via "-n", it first prints the tag name, then attempts
to parse and print the lines of the tag object, and then
finally adds a trailing newline.
If an error occurs, we return early from the function and
never print the newline, screwing up the output for the next
tag. Let's factor the line-printing into its own function so
we can manage the early returns better, and make sure that
we always terminate the line.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 6 Feb 2012 08:04:47 +0000 (00:04 -0800)]
Sync with maint
Junio C Hamano [Mon, 6 Feb 2012 08:03:18 +0000 (00:03 -0800)]
Prepare for 1.7.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Adrian Weimann [Mon, 30 Jan 2012 19:29:33 +0000 (20:29 +0100)]
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>
Junio C Hamano [Mon, 6 Feb 2012 07:58:43 +0000 (23:58 -0800)]
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
Junio C Hamano [Mon, 6 Feb 2012 07:58:42 +0000 (23:58 -0800)]
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
Junio C Hamano [Mon, 6 Feb 2012 07:58:42 +0000 (23:58 -0800)]
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
Junio C Hamano [Mon, 6 Feb 2012 07:58:42 +0000 (23:58 -0800)]
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
Junio C Hamano [Mon, 6 Feb 2012 07:53:21 +0000 (23:53 -0800)]
Sync with 1.7.6.6
* maint-1.7.8:
Git 1.7.6.6
imap-send: remove dead code
Junio C Hamano [Mon, 6 Feb 2012 07:52:53 +0000 (23:52 -0800)]
Sync with 1.7.6.6
* maint-1.7.7:
Git 1.7.6.6
imap-send: remove dead code
Junio C Hamano [Mon, 6 Feb 2012 07:52:25 +0000 (23:52 -0800)]
Sync with 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 6 Feb 2012 07:46:44 +0000 (23:46 -0800)]
Git 1.7.6.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 6 Feb 2012 06:29:37 +0000 (01:29 -0500)]
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>
Junio C Hamano [Mon, 6 Feb 2012 01:13:36 +0000 (17:13 -0800)]
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>
Ben Walton [Sun, 5 Feb 2012 22:32:21 +0000 (17:32 -0500)]
Drop system includes from inet_pton/inet_ntop compatibility wrappers
As both of these compatibility wrappers include git-compat-utils.h,
all of the system includes were redundant.
Dropping these system includes also makes git-compat-utils.h the first
include which avoids a compiler warning on Solaris due to the
redefinition of _FILE_OFFSET_BITS.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 6 Feb 2012 00:22:12 +0000 (16:22 -0800)]
merge: do not create a signed tag merge under --ff-only option
Starting at release v1.7.9, if you ask to merge a signed tag, "git merge"
always creates a merge commit, even when the tag points at a commit that
happens to be a descendant of your current commit.
Unfortunately, this interacts rather badly for people who use --ff-only to
make sure that their branch is free of local developments. It used to be
possible to say:
$ git checkout -b frotz v1.7.9~30
$ git merge --ff-only v1.7.9
and expect that the resulting tip of frotz branch matches v1.7.9^0 (aka
the commit tagged as v1.7.9), but this fails with the updated Git with:
fatal: Not possible to fast-forward, aborting.
because a merge that merges v1.7.9 tag to v1.7.9~30 cannot be created by
fast forwarding.
We could teach users that now they have to do
$ git merge --ff-only v1.7.9^0
but it is far more pleasant for users if we DWIMmed this ourselves.
When an integrator pulls in a topic from a lieutenant via a signed tag,
even when the work done by the lieutenant happens to fast-forward, the
integrator wants to have a merge record, so the integrator will not be
asking for --ff-only when running "git pull" in such a case. Therefore,
this change should not regress the support for the use case v1.7.9 wanted
to add.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 2 Feb 2012 21:41:43 +0000 (13:41 -0800)]
parse_date(): '@' prefix forces git-timestamp
The only place that the issue this series addresses was observed
where we read "cat-file commit" output and put it in GIT_AUTHOR_DATE
in order to replay a commit with an ancient timestamp.
With the previous patch alone, "git commit --date='
20100917 +0900'"
can be misinterpreted to mean an ancient timestamp, not September in
year 2010. Guard this codepath by requring an extra '@' in front of
the raw git timestamp on the parsing side. This of course needs to
be compensated by updating get_author_ident_from_commit and the code
for "git commit --amend" to prepend '@' to the string read from the
existing commit in the GIT_AUTHOR_DATE environment variable.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 2 Feb 2012 21:41:42 +0000 (13:41 -0800)]
parse_date(): allow ancient git-timestamp
The date-time parser parses out a human-readble datestring piece by
piece, so that it could even parse a string in a rather strange
notation like 'noon november 11, 2005', but restricts itself from
parsing strings in "<seconds since epoch> <timezone>" format only
for reasonably new timestamps (like 1974 or newer) with 10 or more
digits. This is to prevent a string like "
20100917" from getting
interpreted as seconds since epoch (we want to treat it as September
17, 2010 instead) while doing so.
The same codepath is used to read back the timestamp that we have
already recorded in the headers of commit and tag objects; because
of this, such a commit with timestamp "0 +0000" cannot be rebased or
amended very easily.
Teach parse_date() codepath to special case a string of the form
"<digits> +<4-digits>" to work this issue around, but require that
there is no other cruft around the string when parsing a timestamp
of this format for safety.
Note that this has a slight backward incompatibility implications.
If somebody writes "git commit --date='
20100917 +0900'" and wants it
to mean a timestamp in September 2010 in Japan, this change will
break such a use case.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Fri, 3 Feb 2012 21:49:07 +0000 (22:49 +0100)]
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>
Jeff King [Sat, 4 Feb 2012 06:30:18 +0000 (01:30 -0500)]
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>
Junio C Hamano [Sat, 4 Feb 2012 06:29:01 +0000 (01:29 -0500)]
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>
Jonathan Nieder [Thu, 2 Feb 2012 11:06:01 +0000 (05:06 -0600)]
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>
Jonathan Nieder [Thu, 2 Feb 2012 11:03:16 +0000 (05:03 -0600)]
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>
Ramsay Jones [Thu, 2 Feb 2012 10:59:23 +0000 (04:59 -0600)]
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>
Jiang Xin [Thu, 2 Feb 2012 02:02:23 +0000 (10:02 +0800)]
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>
Jiang Xin [Wed, 1 Feb 2012 17:20:30 +0000 (01:20 +0800)]
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>
Junio C Hamano [Wed, 1 Feb 2012 06:31:35 +0000 (22:31 -0800)]
Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Tue, 31 Jan 2012 00:20:55 +0000 (01:20 +0100)]
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>
Jakub Narebski [Tue, 31 Jan 2012 00:20:54 +0000 (01:20 +0100)]
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>
Bernhard R. Link [Mon, 30 Jan 2012 20:10:23 +0000 (21:10 +0100)]
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>
Bernhard R. Link [Mon, 30 Jan 2012 20:09:43 +0000 (21:09 +0100)]
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>
Bernhard R. Link [Mon, 30 Jan 2012 20:09:00 +0000 (21:09 +0100)]
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>
Bernhard R. Link [Mon, 30 Jan 2012 20:07:37 +0000 (21:07 +0100)]
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>
Bernhard R. Link [Mon, 30 Jan 2012 20:06:38 +0000 (21:06 +0100)]
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>
Bernhard R. Link [Mon, 30 Jan 2012 20:05:47 +0000 (21:05 +0100)]
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>
Junio C Hamano [Wed, 1 Feb 2012 06:31:03 +0000 (22:31 -0800)]
Merge branch 'tr/merge-edit-guidance'
* tr/merge-edit-guidance:
merge: add instructions to the commit message when editing
Junio C Hamano [Wed, 1 Feb 2012 06:30:42 +0000 (22:30 -0800)]
Merge branch 'jc/pull-signed-tag'
* jc/pull-signed-tag:
merge: use editor by default in interactive sessions
Conflicts:
Documentation/merge-options.txt
Junio C Hamano [Wed, 1 Feb 2012 06:24:23 +0000 (22:24 -0800)]
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
Junio C Hamano [Wed, 1 Feb 2012 06:24:23 +0000 (22:24 -0800)]
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
Junio C Hamano [Wed, 1 Feb 2012 06:01:17 +0000 (22:01 -0800)]
Merge branch 'da/maint-mergetool-twoway'
* da/maint-mergetool-twoway:
mergetool: Provide an empty file when needed
Junio C Hamano [Wed, 1 Feb 2012 06:01:16 +0000 (22:01 -0800)]
Merge branch 'va/git-p4-branch'
* va/git-p4-branch:
t9801: do not overuse test_must_fail
git-p4: Change p4 command invocation
git-p4: Add test case for complex branch import
git-p4: Search for parent commit on branch creation
Junio C Hamano [Wed, 1 Feb 2012 06:01:16 +0000 (22:01 -0800)]
Merge branch 'jl/submodule-re-add'
* jl/submodule-re-add:
submodule add: fix breakage when re-adding a deep submodule
Junio C Hamano [Wed, 1 Feb 2012 06:01:15 +0000 (22:01 -0800)]
Merge branch 'tr/grep-l-with-decoration'
* tr/grep-l-with-decoration:
grep: fix -l/-L interaction with decoration lines
Junio C Hamano [Wed, 1 Feb 2012 06:01:15 +0000 (22:01 -0800)]
Merge branch 'ks/sort-wildcard-in-makefile'
* ks/sort-wildcard-in-makefile:
t/Makefile: Use $(sort ...) explicitly where needed
Junio C Hamano [Wed, 1 Feb 2012 06:01:14 +0000 (22:01 -0800)]
Merge branch 'ld/git-p4-branches-and-labels'
* ld/git-p4-branches-and-labels:
git-p4: label import fails with multiple labels at the same changelist
git-p4: add test for p4 labels
git-p4: importing labels should cope with missing owner
git-p4: cope with labels with empty descriptions
git-p4: handle p4 branches and labels containing shell chars
Junio C Hamano [Wed, 1 Feb 2012 06:01:14 +0000 (22:01 -0800)]
Merge branch 'rr/sequencer'
* rr/sequencer:
sequencer: factor code out of revert builtin
revert: prepare to move replay_action to header
Conflicts:
builtin/revert.c
Junio C Hamano [Wed, 1 Feb 2012 06:01:14 +0000 (22:01 -0800)]
Merge branch 'jc/advise-i18n'
* jc/advise-i18n:
i18n of multi-line advice messages
Junio C Hamano [Wed, 1 Feb 2012 05:06:06 +0000 (21:06 -0800)]
request-pull: explicitly ask tags/$name to be pulled
When asking for a tag to be pulled, disambiguate by leaving tags/ prefix
in front of the name of the tag. E.g.
... in the git repository at:
git://example.com/git/git.git/ tags/v1.2.3
for you to fetch changes up to 123456...
This way, older versions of "git pull" can be used to respond to such a
request more easily, as "git pull $URL v1.2.3" did not DWIM to fetch
v1.2.3 tag in older versions. Also this makes it clearer for humans that
the pull request is made for a tag and he should anticipate a signed one.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast [Mon, 30 Jan 2012 20:25:30 +0000 (21:25 +0100)]
merge: add instructions to the commit message when editing
Before
f824628 (merge: use editor by default in interactive sessions,
2012-01-10), git-merge only started an editor if the user explicitly
asked for it with --edit. Thus it seemed unlikely that the user would
need extra guidance.
After
f824628 the _normal_ thing is to start an editor. Give at least
an indication of why we are doing it.
The sentence about justification is one of the few things about
standard git that are not agnostic to the workflow that the user
chose. However,
f824628 was proposed by Linus specifically to
discourage users from merging unrelated upstream progress into topic
branches. So we may as well take another step in the same direction.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Adrian Weimann [Mon, 30 Jan 2012 19:29:33 +0000 (20:29 +0100)]
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>
Junio C Hamano [Sun, 29 Jan 2012 21:46:18 +0000 (13:46 -0800)]
Kick off the post 1.7.9 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Thielow [Sun, 29 Jan 2012 12:55:33 +0000 (13:55 +0100)]
completion: --edit-description option for git-branch
Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 29 Jan 2012 21:18:56 +0000 (13:18 -0800)]
Merge branch 'nd/index-pack-no-recurse'
* nd/index-pack-no-recurse:
index-pack: eliminate unlimited recursion in get_base_data()
index-pack: eliminate recursion in find_unresolved_deltas
Eliminate recursion in setting/clearing marks in commit list
Junio C Hamano [Sun, 29 Jan 2012 21:18:55 +0000 (13:18 -0800)]
Merge branch 'rs/diff-postimage-in-context'
* rs/diff-postimage-in-context:
xdiff: print post-image for common records instead of pre-image
Junio C Hamano [Sun, 29 Jan 2012 21:18:55 +0000 (13:18 -0800)]
Merge branch 'jk/parse-object-cached'
* jk/parse-object-cached:
upload-pack: avoid parsing tag destinations
upload-pack: avoid parsing objects during ref advertisement
parse_object: try internal cache before reading object db
Junio C Hamano [Sun, 29 Jan 2012 21:18:54 +0000 (13:18 -0800)]
Merge branch 'sp/smart-http-failure-to-push'
* sp/smart-http-failure-to-push:
remote-curl: Fix push status report when all branches fail
Junio C Hamano [Sun, 29 Jan 2012 21:18:54 +0000 (13:18 -0800)]
Merge branch 'jc/maint-log-first-parent-pathspec'
* jc/maint-log-first-parent-pathspec:
Making pathspec limited log play nicer with --first-parent
Junio C Hamano [Sun, 29 Jan 2012 21:18:53 +0000 (13:18 -0800)]
Merge branch 'mh/ref-clone-without-extra-refs'
* mh/ref-clone-without-extra-refs:
write_remote_refs(): create packed (rather than extra) refs
add_packed_ref(): new function in the refs API.
ref_array: keep track of whether references are sorted
pack_refs(): remove redundant check
Junio C Hamano [Sun, 29 Jan 2012 21:18:53 +0000 (13:18 -0800)]
Merge branch 'jl/test-pause'
* jl/test-pause:
test-lib: add the test_pause convenience function
Junio C Hamano [Sun, 29 Jan 2012 21:18:53 +0000 (13:18 -0800)]
Merge branch 'tr/maint-mailinfo'
* tr/maint-mailinfo:
mailinfo: with -b, keep space after [foo]
am: learn passing -b to mailinfo
Conflicts:
git-am.sh
Junio C Hamano [Sun, 29 Jan 2012 21:18:52 +0000 (13:18 -0800)]
Merge branch 'pw/p4-view-updates'
* pw/p4-view-updates:
git-p4: add tests demonstrating spec overlay ambiguities
git-p4: adjust test to adhere to stricter useClientSpec
git-p4: clarify comment
git-p4: fix verbose comment typo
git-p4: only a single ... wildcard is supported
Junio C Hamano [Sun, 29 Jan 2012 21:18:51 +0000 (13:18 -0800)]
Merge branch 'nd/maint-refname-in-hierarchy-check'
* nd/maint-refname-in-hierarchy-check:
Fix incorrect ref namespace check
Junio C Hamano [Sun, 29 Jan 2012 21:18:50 +0000 (13:18 -0800)]
Merge branch 'jn/gitweb-unspecified-action'
* jn/gitweb-unspecified-action:
gitweb: Fix actionless dispatch for non-existent objects
Junio C Hamano [Sun, 29 Jan 2012 21:18:50 +0000 (13:18 -0800)]
Merge branch 'cb/push-quiet'
* cb/push-quiet:
t5541: avoid TAP test miscounting
fix push --quiet: add 'quiet' capability to receive-pack
server_supports(): parse feature list more carefully
Junio C Hamano [Sun, 29 Jan 2012 21:18:50 +0000 (13:18 -0800)]
Merge branch 'nd/clone-single-branch'
* nd/clone-single-branch:
clone: add --single-branch to fetch only one branch
Junio C Hamano [Sun, 29 Jan 2012 21:18:50 +0000 (13:18 -0800)]
Merge branch 'cb/git-daemon-tests'
* cb/git-daemon-tests:
git-daemon tests: wait until daemon is ready
git-daemon: produce output when ready
git-daemon: add tests
Junio C Hamano [Sun, 29 Jan 2012 21:18:50 +0000 (13:18 -0800)]
Merge branch 'cb/maint-kill-subprocess-upon-signal'
* cb/maint-kill-subprocess-upon-signal:
dashed externals: kill children on exit
run-command: optionally kill children on exit