Ping Yin [Tue, 11 Mar 2008 13:52:17 +0000 (21:52 +0800)]
git-submodule summary: limit summary size
This patch teaches git-submodule an option '--summary-limit|-n <number>'
to limit number of commits in total for the summary of each submodule in
the modified case (only a single commit is shown in other cases).
Giving 0 will disable the summary; a negative number means unlimted, which
is the default.
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ping Yin [Tue, 11 Mar 2008 13:52:16 +0000 (21:52 +0800)]
git-submodule summary: show commit summary
This patch does the hard work to show submodule commit summary.
For a modified submodule, a series of commits will be shown with
the following command:
git log --pretty='format:%m %s' \
--first-parent sha1_src...sha1_dst
where the sha1_src is from the given super project commit and the
sha1_dst is from the index or working tree (switched by --cached).
For a deleted, added, or typechanged (blob<->submodule) submodule,
only one single newest commit from the existing end (for example,
src end for submodule deleted or type changed from submodule to blob)
will be shown.
If the src/dst sha1 for a submodule is missing in the submodule
directory, a warning will be issued except in two cases where the
submodule directory is deleted (type 'D') or typechanged to blob
(one case of type 'T').
In the title line for a submodule, the src/dst sha1 and the number
of commits (--first-parent) between the two commits will be shown.
The following example demonstrates most cases.
Example: commit summary for modified submodules sm1-sm5.
--------------------------------------------
$ git submodule summary
* sm1
354cd45...
3f751e5 (4):
< one line message for C
< one line message for B
> one line message for D
> one line message for E
* sm2
5c8bfb5...000000 (3):
< one line message for F
* sm3
354cd45...
3f751e5:
Warn: sm3 doesn't contain commit
354cd45
* sm4
354cd34(submodule)-> 235efa(blob) (1):
< one line message for G
* sm5
354cd34(blob)-> 235efa(submodule) (5):
> one line message for H
--------------------------------------------
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ping Yin [Tue, 11 Mar 2008 13:52:15 +0000 (21:52 +0800)]
git-submodule summary: code framework
These patches teach git-submodule a new subcommand 'summary' to show
commit summary of checked out submodules between a given super project
commit (defaults to HEAD) and working tree (or index, when --cached is
given).
This patch just introduces the framework to find submodules which have
summary to show. A submodule will have summary if it falls into these
cases:
- type 'M': modified and checked out (1)
- type 'A': added and checked out (2)
- type 'D': deleted
- type 'T': typechanged (blob <-> submodule)
Notes:
1. There may be modified but not checked out cases. In the case of a
merge conflict, even if the submodule is not checked out, there may
be still a diff between index and HEAD on the submodule entry
(i.e. modified). The summary will not be show for such a submodule.
2. A similar explanation applies to the added but not checked out case.
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 3 Mar 2008 06:04:59 +0000 (22:04 -0800)]
Update draft release notes for 1.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 3 Mar 2008 07:59:50 +0000 (23:59 -0800)]
Merge branch 'maint'
* maint:
Update draft release notes for 1.5.4.4
revert: actually check for a dirty index
tests: introduce test_must_fail
git-submodule: Fix typo 'url' which should be '$url'
receive-pack: Initialize PATH to include exec-dir.
Conflicts:
builtin-revert.c
Junio C Hamano [Mon, 3 Mar 2008 05:49:28 +0000 (21:49 -0800)]
Update draft release notes for 1.5.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 3 Mar 2008 06:30:56 +0000 (01:30 -0500)]
revert: actually check for a dirty index
The previous code mistakenly used wt_status_prepare to check whether the
index had anything commitable in it; however, that function is just an
init function, and will never report a dirty index.
The correct way with wt_status_* would be to call wt_status_print with the
output pointing to /dev/null or similar. However, that does extra work by
both examining the working tree and spewing status information to nowhere.
Instead, let's just implement the useful subset of wt_status_print as an
"is_index_dirty" function.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 28 Feb 2008 21:09:30 +0000 (13:09 -0800)]
tests: introduce test_must_fail
When we expect a git command to notice and signal errors, we
carelessly wrote in our tests:
test_expect_success 'reject bogus request' '
do something &&
do something else &&
! git command
'
but a non-zero exit could come from the "git command" segfaulting.
A new helper function "tset_must_fail" is introduced and it is
meant to be used to make sure the command gracefully fails (iow,
dying and exiting with non zero status is counted as a failure
to "gracefully fail"). The above example should be written as:
test_expect_success 'reject bogus request' '
do something &&
do something else &&
test_must_fail git command
'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ping Yin [Mon, 3 Mar 2008 02:03:18 +0000 (10:03 +0800)]
git-submodule: Fix typo 'url' which should be '$url'
Fix typo in 'test -z "url"' when checking whether a submodule url is
empty. "url" should be "$url".
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Björn Steinbrink [Mon, 3 Mar 2008 04:08:43 +0000 (05:08 +0100)]
receive-pack: Initialize PATH to include exec-dir.
511707d (use only the $PATH for exec'ing git commands) made it a
requirement to call setup_path() to include the git exec-dir in PATH
before spawning any other git commands. git-receive-pack was not yet
adapted to do this and therefore fails to spawn git-unpack-objects if that
is not in the standard PATH.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Wildenhues [Sun, 2 Mar 2008 23:07:47 +0000 (00:07 +0100)]
Fix doc typos.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Luc Herren [Thu, 28 Feb 2008 22:29:54 +0000 (23:29 +0100)]
fast-import: exit with proper message if not a git dir
git fast-import expects to be run from an existing (possibly
empty) repository. It was dying with a suboptimal message if that
wasn't the case.
Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Junio C Hamano [Mon, 3 Mar 2008 00:07:30 +0000 (16:07 -0800)]
Merge branch 'np/verify-pack'
* np/verify-pack:
add storage size output to 'git verify-pack -v'
fix unimplemented packed_object_info_detail() features
make verify_one_pack() a bit less wrong wrt packed_git structure
factorize revindex code out of builtin-pack-objects.c
Conflicts:
Makefile
Johannes Schindelin [Sun, 2 Mar 2008 15:53:39 +0000 (15:53 +0000)]
format-patch: wrap cover-letter's shortlog sensibly
Earlier, overly-long onelines would not be wrapped at all, and indented
with 6 spaces.
Instead, we now wrap around at 72 characters, with a first-line indent
of 2 spaces, and the rest with 4 spaces.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Sun, 2 Mar 2008 15:53:04 +0000 (15:53 +0000)]
format-patch: use the diff options for the cover letter, too
Earlier, when you called "git format-patch --cover-letter -M", the
diffstat in the cover letter would not inherit the "-M". Now it does.
While at it, add a few "|| break" statements in the test's loops;
otherwise, breakages inside the loops would not be caught.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Sun, 2 Mar 2008 15:57:14 +0000 (16:57 +0100)]
gitweb: Mark first match when searching commit messages
Due to greediness of a pattern, gitweb used to mark (show) last match
in line, if there are more than one match in line. Now it shows first.
Showing all matches in a line would require further work.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 2 Mar 2008 23:19:59 +0000 (15:19 -0800)]
Merge branch 'sp/describe-tag'
* sp/describe-tag:
Teach git-describe to verify annotated tag names before output
Conflicts:
builtin-describe.c
Junio C Hamano [Sun, 2 Mar 2008 23:12:27 +0000 (15:12 -0800)]
Merge branch 'pb/cvsimport'
* pb/cvsimport:
cvsimport: document that -M can be used multiple times
cvsimport: allow for multiple -M options
cvsimport: have default merge regex allow for dashes in the branch name
Junio C Hamano [Sun, 2 Mar 2008 23:12:04 +0000 (15:12 -0800)]
Merge branch 'jc/maint-log-merge-left-right'
* jc/maint-log-merge-left-right:
Fix "git log --merge --left-right"
Junio C Hamano [Sun, 2 Mar 2008 23:11:26 +0000 (15:11 -0800)]
Merge branch 'mh/maint-http-proxy-fix'
* mh/maint-http-proxy-fix:
Set proxy override with http_init()
Junio C Hamano [Sun, 2 Mar 2008 23:11:23 +0000 (15:11 -0800)]
Merge branch 'cb/http-test'
* cb/http-test:
http-push: add regression tests
http-push: push <remote> :<branch> deletes remote branch
Junio C Hamano [Sun, 2 Mar 2008 23:11:19 +0000 (15:11 -0800)]
Merge branch 'jc/remote-multi-url'
* jc/remote-multi-url:
git-remote: do not complain on multiple URLs for a remote
Junio C Hamano [Sun, 2 Mar 2008 23:11:14 +0000 (15:11 -0800)]
Merge branch 'jn/gitweb-grep'
* jn/gitweb-grep:
gitweb: Clearly distinguish regexp / exact match searches
gitweb: Simplify fixed string search
gitweb: Change parse_commits signature to allow for multiple options
Junio C Hamano [Sun, 2 Mar 2008 23:11:07 +0000 (15:11 -0800)]
Merge branch 'mk/maint-parse-careful'
* mk/maint-parse-careful:
receive-pack: use strict mode for unpacking objects
index-pack: introduce checking mode
unpack-objects: prevent writing of inconsistent objects
unpack-object: cache for non written objects
add common fsck error printing function
builtin-fsck: move common object checking code to fsck.c
builtin-fsck: reports missing parent commits
Remove unused object-ref code
builtin-fsck: move away from object-refs to fsck_walk
add generic, type aware object chain walker
Conflicts:
Makefile
builtin-fsck.c
Junio C Hamano [Sun, 2 Mar 2008 23:02:56 +0000 (15:02 -0800)]
Merge branch 'sb/describe-long'
* sb/describe-long:
git-describe: --long shows the object name even for a tagged commit
Junio C Hamano [Sun, 2 Mar 2008 23:02:14 +0000 (15:02 -0800)]
Merge branch 'ew/maint-svn-cert-fileprovider'
* ew/maint-svn-cert-fileprovider:
git-svn: Don't prompt for client cert password everytime.
Junio C Hamano [Sun, 2 Mar 2008 23:02:08 +0000 (15:02 -0800)]
Merge branch 'js/maint-daemon'
* js/maint-daemon:
daemon: ensure that base-path is an existing directory
daemon: send more error messages to the syslog
Jakub Narebski [Sun, 2 Mar 2008 14:11:35 +0000 (15:11 +0100)]
Documentation: Remove --{min,max}-age option from git-log(1)
The --max-age=<timestamp> and --min-age=<timestamp> are now shown only
in the git-rev-list manpage (plumbing).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denis Cheng [Sun, 2 Mar 2008 10:05:05 +0000 (18:05 +0800)]
cleanup: remove unused git_checkout_config
Directly call git_default_config instead.
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Sun, 2 Mar 2008 07:40:33 +0000 (07:40 +0000)]
Fix make_absolute_path() for parameters without a slash
When passing "xyz" to make_absolute_path(), make_absolute_path()
erroneously tried to chdir("xyz"), and then append "/xyz". Instead,
skip the chdir() completely when no slash was found.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 2 Mar 2008 08:07:59 +0000 (00:07 -0800)]
diff: make sure work tree side is shown as 0{40} when different
Ping Yin noticed that "git diff-index --raw" shows 0{40} when work tree
has submodule difference, but "git diff --raw" didn't correctly do so.
There was a mistake in the diffcore_skip_stat_unmatch() that was meant to
clean up the stat-only difference for running diff between the index and
work tree and diff between the tree and the work tree, to cause it re-read
from the submodule repository HEAD. When ce_stat_match() says work tree
is different, we should always say 0{40} on the work tree side.
This patch fixes the issue, and adds tests.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 2 Mar 2008 08:57:26 +0000 (00:57 -0800)]
diff-lib.c: constness strengthening
The internal implementation of diff-index codepath used to use non const
pointer to pass sha1 around, but it did not have to. With this, we can
also lose the private no_sha1[] array, as we can use the public null_sha1[]
array that exists exactly for the same purpose.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 2 Mar 2008 07:43:32 +0000 (23:43 -0800)]
Clean up find_unique_abbrev() callers
Now find_unique_abbrev() never returns NULL, there is no need for callers
to prepare for seeing NULL and fall back to giving the full 40-hexdigits.
While we are at it, drop "..." in the "git reset" output that reports the
location of the new HEAD, between the abbreviated commit object name and
the one line commit summary. Because we are always showing the HEAD
(which cannot be missing!), we never had a case where we show the full 40
hexdigits that is not followed by three dots, and these three dots were
stealing 3 columns from the precious horizontal screen real estate out of
80 that can better be used for the one line commit summary.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 2 Mar 2008 07:35:32 +0000 (23:35 -0800)]
find_unique_abbrev(): redefine semantics
The function returned NULL when no object that matches the name
was found, but that made the callers more complicated, as nobody
used that NULL return as an indication that no object with such
a name exists. They (at least the careful ones) instead took
the full 40-hexdigit and used in such a case, and the careless
ones segfaulted.
With this "git rev-parse --short
5555555555555555555555555555555555555555"
would stop segfaulting.
This is based on Jeff King's rewrite to my RFC patch, but "missing"
logic swapped to "exists". The final logic reads:
For existing objects, make sure the abbreviated string uniquely
identifies it. Otherwise, make sure the abbreviated string is
long enough so that it would not name any existing object.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Sat, 1 Mar 2008 10:32:14 +0000 (11:32 +0100)]
git rebase --abort: always restore the right commit
Previously, --abort would end by git resetting to ORIG_HEAD, but some
commands, such as git reset --hard (which happened in git rebase --skip,
but could just as well be typed by the user), would have already modified
ORIG_HEAD.
Just use the orig-head we store in $dotest instead.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Sat, 1 Mar 2008 11:39:52 +0000 (12:39 +0100)]
Documentation/git-rebase.txt: Add --strategy to synopsys
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 2 Mar 2008 02:18:16 +0000 (18:18 -0800)]
CodingGuidelines: spell out how we use grep in our scripts
Our scripts try to stick to fairly limited subset of POSIX BRE for
portability. It is unclear from manual page from GNU grep which is GNU
extension and which is portable, so let's spell it out to help new people
to keep their contributions from hurting porters.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Thu, 28 Feb 2008 05:25:20 +0000 (00:25 -0500)]
add storage size output to 'git verify-pack -v'
This can possibly break external scripts that depend on the previous
output, but those script can't possibly be critical to Git usage, and
fixing them should be trivial.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Thu, 28 Feb 2008 05:25:19 +0000 (00:25 -0500)]
fix unimplemented packed_object_info_detail() features
Since commit
eb32d236df0c16b936b04f0c5402addb61cdb311, there was a TODO
comment in packed_object_info_detail() about the SHA1 of base object to
OBJ_OFS_DELTA objects. So here it is at last.
While at it, providing the actual storage size information as well is now
trivial.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Thu, 28 Feb 2008 05:25:18 +0000 (00:25 -0500)]
make verify_one_pack() a bit less wrong wrt packed_git structure
Simply freeing it is wrong. There are many things attached to this
structure that are not cleaned up. In practice this doesn't matter much
since this happens just before the program exits, but it is still
a bit more "correct" to leak it implicitly rather than explicitly.
And therefore it is also a good idea to register it with
install_packed_git(). Not only might it have better chance of being
properly cleaned up if such functionality is implemented for the general
case, but some functions like init_revindex() expect all packed_git
instances to be globally accessible.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Pitre [Thu, 28 Feb 2008 05:25:17 +0000 (00:25 -0500)]
factorize revindex code out of builtin-pack-objects.c
No functional change. This is needed to fix verify-pack in a later patch.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sat, 1 Mar 2008 06:22:55 +0000 (01:22 -0500)]
allow git-am to run in a subdirectory
We just move to the top of the tree and proceed. This
shouldn't break any existing callers, since the behavior was
previously disallowed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sat, 1 Mar 2008 06:14:31 +0000 (01:14 -0500)]
rename: warn user when we have turned off rename detection
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Fri, 29 Feb 2008 22:08:47 +0000 (23:08 +0100)]
Add test for git rebase --abort
We expect git rebase --abort to come back to the original (pre-rebase)
head, independently from when it's run during a rebase.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 1 Mar 2008 09:10:12 +0000 (01:10 -0800)]
t6024: move "git reset" to prepare for a test inside the test itself
Noticed by Mike Hommey.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Frank Lichtenheld [Fri, 29 Feb 2008 21:53:39 +0000 (22:53 +0100)]
gc: Add --quiet option
Pass -q option to git-repack.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Bruhat (BooK [Thu, 28 Feb 2008 10:18:23 +0000 (11:18 +0100)]
cvsimport: document that -M can be used multiple times
Also document the capture behaviour (source branch name in $1)
Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Bruhat (BooK [Thu, 28 Feb 2008 10:18:22 +0000 (11:18 +0100)]
cvsimport: allow for multiple -M options
Use Getopt::Long instead of Getopt::Std to handle multiple -M options,
for all the cases when having a single custom regex is not enough.
Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Bruhat (BooK [Thu, 28 Feb 2008 10:18:21 +0000 (11:18 +0100)]
cvsimport: have default merge regex allow for dashes in the branch name
The default value of @mergerx uses \w, which matches word
character; a branch name like policy-
20050608-br will not be
matched.
Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 1 Mar 2008 05:22:52 +0000 (21:22 -0800)]
Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui:
git-gui: fix typo in lib/spellcheck.tcl
git-gui: Shorten Aspell version strings to just Aspell version number
git-gui: Gracefully display non-aspell version errors to users
git-gui: Catch and display aspell startup failures to the user
git-gui: Only bind the spellcheck popup suggestion hook once
git-gui: Remove explicit references to 'aspell' in message strings
git-gui: Ensure all spellchecker 'class' variables are initialized
git-gui: Update German translation.
git-gui: (i18n) Add newly added translation strings to template.
Junio C Hamano [Sat, 1 Mar 2008 05:22:31 +0000 (21:22 -0800)]
Merge branch 'maint'
* maint:
Documentation cherry-pick: Fix cut-and-paste error
git.el: find the git-status buffer whatever its name is
git-gui: Paper bag fix info dialog when no files are staged at commit
Mike Ralphson [Fri, 29 Feb 2008 17:00:38 +0000 (17:00 +0000)]
Documentation cherry-pick: Fix cut-and-paste error
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rémi Vanicat [Fri, 29 Feb 2008 18:28:19 +0000 (19:28 +0100)]
git.el: find the git-status buffer whatever its name is
git-status used the buffer name to find git-status buffers, and that
can fail if the buffer has another name, for example when multiple
working directories is tracked.
Signed-off-by: Rémi Vanicat <vanicat@debian.org>
Acked-by: Alexandre Julliard <julliard@winehq.org>
Tested-by: Xavier Maillard <xma@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 1 Mar 2008 05:19:43 +0000 (21:19 -0800)]
Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui:
git-gui: Paper bag fix info dialog when no files are staged at commit
Santi Béjar [Fri, 29 Feb 2008 19:16:19 +0000 (20:16 +0100)]
clone: support cloning full bundles
The "humanish" part of a bundle is made removing the ".bundle" suffix.
Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 28 Feb 2008 07:39:47 +0000 (23:39 -0800)]
Update draft release notes for 1.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sun, 24 Feb 2008 19:40:45 +0000 (14:40 -0500)]
use build-time SHELL_PATH in test scripts
The top-level Makefile now creates a GIT-BUILD-OPTIONS file
which stores any options selected by the make process that
may be of use to further parts of the build process.
Specifically, we store the SHELL_PATH so that it can be used
by tests to construct shell scripts on the fly.
The format of the GIT-BUILD-OPTIONS file is Bourne shell,
and it is sourced by test-lib.sh; all tests can rely on just
having $SHELL_PATH correctly set in the environment.
The GIT-BUILD-OPTIONS file is written every time the
toplevel 'make' is invoked. Since the only users right now
are the test scripts, there's no drawback to updating its
timestamp. If something build-related depends on this, we
can do a trick similar to the one used by GIT-CFLAGS.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Daniel Barkalow [Thu, 28 Feb 2008 21:52:44 +0000 (16:52 -0500)]
Write index file on any checkout of files
We need to rewrite the index file when we check out files, even if we
haven't modified the blob info by reading from another tree, so that
we get the stat cache to include the fact that we just modified the
file so it doesn't need to be refreshed.
While we're at it, move everything that needs to be done to check out
some paths from a tree (or the current index) into checkout_paths().
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Uwe Kleine-König [Thu, 28 Feb 2008 07:24:25 +0000 (08:24 +0100)]
rev-list: add --branches, --tags and --remotes
These flags are already known to rev-parse and have the same meaning.
This patch allows to run gitk as follows:
gitk --branches --not --remotes
to show only your local work.
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna [Thu, 28 Feb 2008 12:36:54 +0000 (13:36 +0100)]
Improve t6029 to check the real "subtree" case
t6029 already checks if subtree available and works like recursive. This
patch adds code to test test the extra functionality the subtree merge
strategy provides.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Daniel Barkalow [Thu, 28 Feb 2008 17:14:13 +0000 (12:14 -0500)]
Use diff_tree() directly in making cover letter
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Daniel Barkalow [Thu, 28 Feb 2008 16:10:51 +0000 (11:10 -0500)]
Always use the current connection's remote ref list in git protocol
We always report to the user the list of refs we got from the first
connection, even if we do multiple connections. But we should always
use each connection's own list of refs in the communication with the
server, in case we got a different server out of DNS rotation or the
timing was surprising or something.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 28 Feb 2008 21:09:30 +0000 (13:09 -0800)]
tests: introduce test_must_fail
When we expect a git command to notice and signal errors, we
carelessly wrote in our tests:
test_expect_success 'reject bogus request' '
do something &&
do something else &&
! git command
'
but a non-zero exit could come from the "git command" segfaulting.
A new helper function "tset_must_fail" is introduced and it is
meant to be used to make sure the command gracefully fails (iow,
dying and exiting with non zero status is counted as a failure
to "gracefully fail"). The above example should be written as:
test_expect_success 'reject bogus request' '
do something &&
do something else &&
test_must_fail git command
'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alex Riesen [Thu, 28 Feb 2008 16:30:47 +0000 (17:30 +0100)]
Fix builtin checkout crashing when given an invalid path
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 29 Feb 2008 08:00:09 +0000 (00:00 -0800)]
Merge branch 'maint'
* maint:
templates/Makefile: don't depend on local umask setting
Correct name of diff_flush() in API documentation
Start preparing for 1.5.4.4
Conflicts:
RelNotes
Martin Koegler [Mon, 25 Feb 2008 21:46:13 +0000 (22:46 +0100)]
receive-pack: use strict mode for unpacking objects
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 25 Feb 2008 21:46:12 +0000 (22:46 +0100)]
index-pack: introduce checking mode
Adds strict option, which bails out if the pack would
introduces broken object or links in the repository.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 25 Feb 2008 21:46:11 +0000 (22:46 +0100)]
unpack-objects: prevent writing of inconsistent objects
This patch introduces a strict mode, which ensures that:
- no malformed object will be written
- no object with broken links will be written
The patch ensures this by delaying the write of all non blob object.
These object are written, after all objects they link to are written.
An error can only result in unreferenced objects.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Koegler [Mon, 25 Feb 2008 21:46:10 +0000 (22:46 +0100)]
unpack-object: cache for non written objects
Preventing objects with broken links entering the repository
means, that write of some objects must be delayed.
This patch adds a cache to keep the object data in memory. The delta
resolving code must also search in the cache.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shawn O. Pearce [Thu, 28 Feb 2008 06:22:36 +0000 (01:22 -0500)]
Teach git-describe to verify annotated tag names before output
If an annotated tag describes a commit we want to favor the name
listed in the body of the tag, rather than whatever name it has
been stored under locally. By doing so it is easier to converse
about tags with others, even if the tags happen to be fetched to
a different name than it was given by its creator.
To avoid confusion when a tag is stored under a different name
(and thus is not readable via git-rev-parse --verify, etc.) we show
a warning message if the name of the tag does not match the ref
we found it under and if that tag was also selected for output.
For example:
$ git tag -a -m "i am a test" testtag
$ mv .git/refs/tags/testtag .git/refs/tags/bobbytag
$ ./git-describe HEAD
warning: tag 'testtag' is really 'bobbytag' here
testtag
$ git tag -d testtag
error: tag 'testtag' not found.
$ git tag -d bobbytag
Deleted tag 'bobbytag'
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gerrit Pape [Thu, 28 Feb 2008 18:44:42 +0000 (18:44 +0000)]
templates/Makefile: don't depend on local umask setting
Don't take the local umask setting into account when installing the
templates/* files and directories, running 'make install' with umask set
to 077 resulted in template/* installed with permissions 700 and 600.
The problem was discovered by Florian Zumbiehl, reported through
http://bugs.debian.org/467518
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Daniel Barkalow [Thu, 28 Feb 2008 17:24:42 +0000 (12:24 -0500)]
Correct name of diff_flush() in API documentation
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 28 Feb 2008 07:37:39 +0000 (23:37 -0800)]
Start preparing for 1.5.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shawn O. Pearce [Thu, 28 Feb 2008 06:29:19 +0000 (01:29 -0500)]
Merge branch 'maint'
* maint:
git-gui: Paper bag fix info dialog when no files are staged at commit
Shawn O. Pearce [Thu, 28 Feb 2008 06:28:45 +0000 (01:28 -0500)]
git-gui: Paper bag fix info dialog when no files are staged at commit
If the user tries to commit their changes without actually staging
anything we used to display an informational dialog suggesting they
first stage those changes, then retry the commit feature.
Unfortunately I broke this in
aba15f7 ("Ensure error dialogs always
appear over all other windows") and failed to fix it in the paper
bag fix that came one day after it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Junio C Hamano [Thu, 28 Feb 2008 06:08:57 +0000 (22:08 -0800)]
format-patch: remove a leftover debugging message
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Thu, 21 Feb 2008 16:21:49 +0000 (16:21 +0000)]
completion: support format-patch's --cover-letter option
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 27 Feb 2008 07:18:38 +0000 (23:18 -0800)]
Fix "git log --merge --left-right"
The command did not reject the combination of these options, but
did not show left/right markers.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Clemens Buchacher [Wed, 27 Feb 2008 19:28:45 +0000 (20:28 +0100)]
http-push: add regression tests
http-push tests require a web server with WebDAV support.
This commit introduces a HTTPD test library, which can be configured using
the following environment variables.
GIT_TEST_HTTPD enable HTTPD tests
LIB_HTTPD_PATH web server path
LIB_HTTPD_MODULE_PATH web server modules path
LIB_HTTPD_PORT listening port
LIB_HTTPD_DAV enable DAV
LIB_HTTPD_SVN enable SVN
LIB_HTTPD_SSL enable SSL
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Clemens Buchacher [Wed, 27 Feb 2008 19:27:53 +0000 (20:27 +0100)]
http-push: push <remote> :<branch> deletes remote branch
This mirrors current ssh/git push syntax.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Wed, 27 Feb 2008 20:35:50 +0000 (21:35 +0100)]
Set proxy override with http_init()
In transport.c, proxy setting (the one from the remote conf) was set through
curl_easy_setopt() call, while http.c already does the same with the
http.proxy setting. We now just use this infrastructure instead, and make
http_init() now take the struct remote as argument so that it can take the
http_proxy setting from there, and any other property that would be added
later.
At the same time, we make get_http_walker() take a struct remote argument
too, and pass it to http_init(), which makes remote defined proxy be used
for more than get_refs_via_curl().
We leave out http-fetch and http-push, which don't use remotes for the
moment, purposefully.
Signed-off-by: Mike Hommey <mh@glandium.org>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt [Tue, 26 Feb 2008 12:00:55 +0000 (13:00 +0100)]
daemon: ensure that base-path is an existing directory
Any request to the daemon would fail if base-path (if specified) is not
a directory. We now check for this condition early.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt [Mon, 25 Feb 2008 13:25:20 +0000 (14:25 +0100)]
daemon: send more error messages to the syslog
There were a number of die() calls before the syslog was opened; hence,
these error messages would have been sent to /dev/null in detached mode.
Now we install the daemon-specific die routine before any error message is
generated so that these messages go to the syslog.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 27 Feb 2008 22:07:51 +0000 (14:07 -0800)]
Merge branch 'maint'
* maint:
Eliminate confusing "won't bisect on seeked tree" failure
builtin-reflog.c: don't install new reflog on write failure
send-email: fix In-Reply-To regression
Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
Prompt to continue when editing during rebase --interactive
Documentation/git svn log: add a note about timezones.
Don't use GIT_CONFIG in t5505-remote
Conflicts:
t/t9001-send-email.sh
t/t9200-git-cvsexportcommit.sh
Junio C Hamano [Wed, 27 Feb 2008 21:50:44 +0000 (13:50 -0800)]
git-remote: do not complain on multiple URLs for a remote
Having more than one URL for a remote is perfectly normal when
the remote is defined to push to multiple places. Get rid of
the annoying "Warning" message.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 27 Feb 2008 21:56:42 +0000 (13:56 -0800)]
Merge branch 'git-p4' of git://repo.or.cz/git/git-p4
* 'git-p4' of git://repo.or.cz/git/git-p4:
git-p4: Support usage of perforce client spec
git-p4: git-p4 submit cleanups.
git-p4: Removed git-p4 submit --direct.
git-p4: Clean up git-p4 submit's log message handling.
git-p4: Remove --log-substitutions feature.
git-p4: support exclude paths
Carl Worth [Sun, 24 Feb 2008 01:14:17 +0000 (17:14 -0800)]
Eliminate confusing "won't bisect on seeked tree" failure
This error message is very confusing---it doesn't tell the user
anything about how to fix the situation. And the actual fix
for the situation ("git bisect reset") does a checkout of a
potentially random branch, (compared to what the user wants to
be on for the bisect she is starting).
The simplest way to eliminate the confusion is to just make
"git bisect start" do the cleanup itself. There's no significant
loss of safety here since we already have a general safety in
the form of the reflog.
Note: We preserve the warning for any cogito users. We do this
by switching from .git/head-name to .git/BISECT_START for the
extra state, (which is a more descriptive name anyway).
Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey [Fri, 22 Feb 2008 18:47:08 +0000 (12:47 -0600)]
builtin-reflog.c: don't install new reflog on write failure
When expiring reflog entries, a new temporary log is written which contains
only the entries to retain. After it is written, it is renamed to replace
the existing reflog. Currently, we check that writing of the new log is
successful and print a message on failure, but the original reflog is still
replaced with the new reflog even on failure. This patch causes the
original reflog to be retained if we fail when writing the new reflog.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jay Soffian [Fri, 22 Feb 2008 00:16:04 +0000 (19:16 -0500)]
send-email: fix In-Reply-To regression
Fix a regression introduced by
1ca3d6e (send-email: squelch warning due to comparing undefined $_ to "")
where if the user was prompted for an initial In-Reply-To and didn't
provide one, messages would be sent out with an invalid In-Reply-To of
"<>"
Also add test cases for the regression and the fix. A small modification
was needed to allow send-email to take its replies from stdin if the
environment variable GIT_SEND_EMAIL_NOTTY is set.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Petr Baudis [Tue, 26 Feb 2008 12:22:08 +0000 (13:22 +0100)]
gitweb: Clearly distinguish regexp / exact match searches
This patch does a couple of things:
* Makes commit/author/committer search case insensitive
To be consistent with the grep search; I see no convincing
reason for the search to be case sensitive, and you might
get in trouble especially with contributors e.g. from Japan
or France where they sometimes like to uppercase their last
name.
* Makes grep search by default search for fixed strings.
* Introduces 're' checkbox that enables POSIX extended regexp searches
This works for all the search types. The idea comes from Jakub.
It does not make much sense (and is not easy at all) to untangle most
of these changes from each other, thus they all go in a single patch.
[jn: Cherry-picked from Pasky's http://repo.or.cz/git/gitweb.git]
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Tue, 26 Feb 2008 12:22:07 +0000 (13:22 +0100)]
gitweb: Simplify fixed string search
Use '--fixed-strings' option to git-rev-list to simplify and improve
searching commit messages (commit search). It allows to search for
example for "don't" successfully from gitweb.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Tue, 26 Feb 2008 12:22:06 +0000 (13:22 +0100)]
gitweb: Change parse_commits signature to allow for multiple options
Change order of parameters in parse_commits() to have $filename
before @args (extra options), to allow for multiple extra options,
for example both '--grep=<pattern>' and '--fixed-strings'.
Change all callers to follow new calling convention.
Originally by Petr Baudis, in http://repo.or.cz/git/gitweb.git:
b98f0a7c gitweb: Clearly distinguish regexp / exact match searches
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sebastian Noack [Mon, 25 Feb 2008 14:56:28 +0000 (15:56 +0100)]
git-svn: Don't prompt for client cert password everytime.
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexandre Julliard [Fri, 22 Feb 2008 15:48:53 +0000 (16:48 +0100)]
git.el: Do not display empty directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Tested-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 27 Feb 2008 21:03:50 +0000 (13:03 -0800)]
Merge branch 'jm/free'
* jm/free:
Avoid unnecessary "if-before-free" tests.
Conflicts:
builtin-branch.c
Junio C Hamano [Wed, 27 Feb 2008 21:02:57 +0000 (13:02 -0800)]
Merge branch 'js/branch-track'
* js/branch-track:
doc: documentation update for the branch track changes
branch: optionally setup branch.*.merge from upstream local branches
Conflicts:
Documentation/config.txt
Documentation/git-branch.txt
Documentation/git-checkout.txt
builtin-branch.c
cache.h
t/t7201-co.sh
Junio C Hamano [Wed, 27 Feb 2008 20:53:26 +0000 (12:53 -0800)]
Merge branch 'db/checkout'
* db/checkout: (21 commits)
checkout: error out when index is unmerged even with -m
checkout: show progress when checkout takes long time while switching branches
Add merge-subtree back
checkout: updates to tracking report
builtin-checkout.c: Remove unused prefix arguments in switch_branches path
checkout: work from a subdirectory
checkout: tone down the "forked status" diagnostic messages
Clean up reporting differences on branch switch
builtin-checkout.c: fix possible usage segfault
checkout: notice when the switched branch is behind or forked
Build in checkout
Move code to clean up after a branch change to branch.c
Library function to check for unmerged index entries
Use diff -u instead of diff in t7201
Move create_branch into a library file
Build-in merge-recursive
Add "skip_unmerged" option to unpack_trees.
Discard "deleted" cache entries after using them to update the working tree
Send unpack-trees debugging output to stderr
Add flag to make unpack_trees() not print errors.
...
Conflicts:
Makefile
Junio C Hamano [Wed, 27 Feb 2008 20:06:41 +0000 (12:06 -0800)]
Merge branch 'db/cover-letter'
* db/cover-letter:
Improve collection of information for format-patch --cover-letter
Add API access to shortlog
t4014: Replace sed's non-standard 'Q' by standard 'q'
Support a --cc=<email> option in format-patch
Combine To: and Cc: headers
Fix format.headers not ending with a newline
Add tests for extra headers in format-patch
Add a --cover-letter option to format-patch
Export some email and pretty-printing functions
Improve message-id generation flow control for format-patch
Add more tests for format-patch
Conflicts:
builtin-log.c
builtin-shortlog.c
pretty.c
Sebastian Noack [Mon, 25 Feb 2008 14:56:28 +0000 (15:56 +0100)]
git-svn: Don't prompt for client cert password everytime.
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 27 Feb 2008 19:57:19 +0000 (11:57 -0800)]
Merge branch 'js/merge'
* js/merge:
xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUM
xdl_merge(): make XDL_MERGE_ZEALOUS output simpler