summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-03-11git-submodule summary: documentationLibravatar Ping Yin1-3/+16
Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11git-submodule summary: limit summary sizeLibravatar Ping Yin1-2/+19
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>
2008-03-11git-submodule summary: show commit summaryLibravatar Ping Yin1-0/+102
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>
2008-03-11git-submodule summary: code frameworkLibravatar Ping Yin1-5/+56
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>
2008-03-03Update draft release notes for 1.5.5Libravatar Junio C Hamano1-1/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02Merge branch 'maint'Libravatar Junio C Hamano5-6/+49
* 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
2008-03-02Update draft release notes for 1.5.4.4Libravatar Junio C Hamano1-1/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02revert: actually check for a dirty indexLibravatar Jeff King2-4/+25
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>
2008-03-02tests: introduce test_must_failLibravatar Junio C Hamano2-8/+25
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>
2008-03-02git-submodule: Fix typo 'url' which should be '$url'Libravatar Ping Yin1-1/+1
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>
2008-03-02receive-pack: Initialize PATH to include exec-dir.Libravatar Björn Steinbrink1-0/+2
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>
2008-03-02Fix doc typos.Libravatar Ralf Wildenhues2-4/+4
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02fast-import: exit with proper message if not a git dirLibravatar Jean-Luc Herren1-0/+1
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>
2008-03-02Merge branch 'np/verify-pack'Libravatar Junio C Hamano9-163/+185
* 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
2008-03-02format-patch: wrap cover-letter's shortlog sensiblyLibravatar Johannes Schindelin3-2/+25
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>
2008-03-02format-patch: use the diff options for the cover letter, tooLibravatar Johannes Schindelin2-6/+16
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>
2008-03-02gitweb: Mark first match when searching commit messagesLibravatar Jakub Narebski1-1/+1
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>
2008-03-02Merge branch 'sp/describe-tag'Libravatar Junio C Hamano1-12/+33
* sp/describe-tag: Teach git-describe to verify annotated tag names before output Conflicts: builtin-describe.c
2008-03-02Merge branch 'pb/cvsimport'Libravatar Junio C Hamano2-7/+16
* 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
2008-03-02Merge branch 'jc/maint-log-merge-left-right'Libravatar Junio C Hamano1-8/+4
* jc/maint-log-merge-left-right: Fix "git log --merge --left-right"
2008-03-02Merge branch 'mh/maint-http-proxy-fix'Libravatar Junio C Hamano7-12/+22
* mh/maint-http-proxy-fix: Set proxy override with http_init()
2008-03-02Merge branch 'cb/http-test'Libravatar Junio C Hamano6-7/+230
* cb/http-test: http-push: add regression tests http-push: push <remote> :<branch> deletes remote branch
2008-03-02Merge branch 'jc/remote-multi-url'Libravatar Junio C Hamano1-3/+3
* jc/remote-multi-url: git-remote: do not complain on multiple URLs for a remote
2008-03-02Merge branch 'jn/gitweb-grep'Libravatar Junio C Hamano1-20/+38
* 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
2008-03-02Merge branch 'mk/maint-parse-careful'Libravatar Junio C Hamano22-427/+725
* 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
2008-03-02Merge branch 'sb/describe-long'Libravatar Junio C Hamano3-1/+21
* sb/describe-long: git-describe: --long shows the object name even for a tagged commit
2008-03-02Merge branch 'ew/maint-svn-cert-fileprovider'Libravatar Junio C Hamano0-0/+0
* ew/maint-svn-cert-fileprovider: git-svn: Don't prompt for client cert password everytime.
2008-03-02Merge branch 'js/maint-daemon'Libravatar Junio C Hamano1-5/+13
* js/maint-daemon: daemon: ensure that base-path is an existing directory daemon: send more error messages to the syslog
2008-03-02Documentation: Remove --{min,max}-age option from git-log(1)Libravatar Jakub Narebski1-0/+2
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>
2008-03-02cleanup: remove unused git_checkout_configLibravatar Denis Cheng1-6/+1
Directly call git_default_config instead. Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02Fix make_absolute_path() for parameters without a slashLibravatar Johannes Schindelin2-1/+5
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>
2008-03-02diff: make sure work tree side is shown as 0{40} when differentLibravatar Junio C Hamano2-5/+55
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>
2008-03-02diff-lib.c: constness strengtheningLibravatar Junio C Hamano1-7/+6
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>
2008-03-01Clean up find_unique_abbrev() callersLibravatar Junio C Hamano3-11/+3
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>
2008-03-01find_unique_abbrev(): redefine semanticsLibravatar Junio C Hamano1-7/+6
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>
2008-03-01git rebase --abort: always restore the right commitLibravatar Mike Hommey2-4/+3
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>
2008-03-01Documentation/git-rebase.txt: Add --strategy to synopsysLibravatar Mike Hommey1-0/+1
Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01CodingGuidelines: spell out how we use grep in our scriptsLibravatar Junio C Hamano1-0/+12
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>
2008-03-01add storage size output to 'git verify-pack -v'Libravatar Nicolas Pitre3-7/+7
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>
2008-03-01fix unimplemented packed_object_info_detail() featuresLibravatar Nicolas Pitre2-3/+10
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>
2008-03-01make verify_one_pack() a bit less wrong wrt packed_git structureLibravatar Nicolas Pitre1-1/+1
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>
2008-03-01factorize revindex code out of builtin-pack-objects.cLibravatar Nicolas Pitre4-152/+167
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>
2008-03-01allow git-am to run in a subdirectoryLibravatar Jeff King1-0/+2
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>
2008-03-01rename: warn user when we have turned off rename detectionLibravatar Jeff King1-3/+4
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01Add test for git rebase --abortLibravatar Mike Hommey1-0/+59
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>
2008-03-01t6024: move "git reset" to prepare for a test inside the test itselfLibravatar Junio C Hamano1-1/+1
Noticed by Mike Hommey. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01gc: Add --quiet optionLibravatar Frank Lichtenheld2-1/+8
Pass -q option to git-repack. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01cvsimport: document that -M can be used multiple timesLibravatar Philippe Bruhat (BooK1-1/+5
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>
2008-03-01cvsimport: allow for multiple -M optionsLibravatar Philippe Bruhat (BooK1-5/+10
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>
2008-03-01cvsimport: have default merge regex allow for dashes in the branch nameLibravatar Philippe Bruhat (BooK1-1/+1
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>