summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* submodule: add 'deinit' commandJens Lehmann2013-03-045-3/+198
| | | | | | | | | | | | | | | | | | | | | | | | | With "git submodule init" the user is able to tell git he cares about one or more submodules and wants to have it populated on the next call to "git submodule update". But currently there is no easy way he could tell git he does not care about a submodule anymore and wants to get rid of his local work tree (except he knows a lot about submodule internals and removes the "submodule.$name.url" setting from .git/config together with the work tree himself). Help those users by providing a 'deinit' command. This removes the whole submodule.<name> section from .git/config (either for the given submodule(s) or for all those which have been initialized if '.' is used) together with their work tree. Fail if the current work tree contains modifications (unless forced), but don't complain when either the work tree is already removed or no settings are found in .git/config. Add tests and link the man pages of "git submodule deinit" and "git rm" to assist the user in deciding whether removing or unregistering the submodule is the right thing to do for him. Also add the deinit subcommand to the completion list. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update draft release notes to 1.8.1Junio C Hamano2012-11-291-1/+32
|
* Merge branch 'pw/p4-various-fixes'Junio C Hamano2012-11-293-20/+137
|\ | | | | | | | | | | | | | | | | | | * pw/p4-various-fixes: git p4: remove unneeded cmd initialization git p4: fix labelDetails typo in exception git p4 test: display unresolvable host error git p4: catch p4 errors when streaming file contents git p4: handle servers without move support git p4: catch p4 describe errors
| * git p4: remove unneeded cmd initializationPete Wyckoff2012-11-261-1/+0
| | | | | | | | | | | | | | It confuses pylint, and is never needed. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git p4: fix labelDetails typo in exceptionPete Wyckoff2012-11-261-1/+1
| | | | | | | | | | Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git p4 test: display unresolvable host errorPete Wyckoff2012-11-261-0/+12
| | | | | | | | | | | | | | This test passes already. Make sure p4 diagnostic errors are displayed. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git p4: catch p4 errors when streaming file contentsPete Wyckoff2012-11-262-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error messages that arise during the "p4 print" phase of generating commits were silently ignored. Catch them, abort the fast-import, and exit. Without this fix, the sync/clone appears to work, but files that are inaccessible by the p4d server will still be imported to git, although without the proper contents. Instead the errant files will contain a p4 error message, such as "Librarian checkout //depot/path failed". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git p4: handle servers without move supportPete Wyckoff2012-11-262-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for the "p4 move" command was added in 8e9497c (git p4: add support for 'p4 move' in P4Submit, 2012-07-12), which checks to make sure that the client and server support the command. But older versions of p4d may not handle the "-k" argument, and newer p4d allow disabling "p4 move" with a configuration setting. Check for both these cases by testing a p4 move command on bogus filenames and looking for strings in the error messages. Reported-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git p4: catch p4 describe errorsPete Wyckoff2012-11-261-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Group the two calls to "p4 describe" into a new helper function, and try to validate the p4 results. The current behavior when p4 describe fails is to die with a python backtrace. The new behavior will print the full response. This does not solve any particular problem, but adds more checking in hopes of narrowing down odd behavior seen on at least two occasions. Based-on-patch-by: Matt Arsenault <arsenm2@gmail.com> Reported-by: Arthur <a.foulon@amesys.fr> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'lt/diff-stat-show-0-lines'Junio C Hamano2012-11-292-28/+74
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git diff --stat" miscounted the total number of changed lines when binary files were involved and hidden beyond --stat-count. It also miscounted the total number of changed files when there were unmerged paths. * lt/diff-stat-show-0-lines: t4049: refocus tests diff --shortstat: do not count "unmerged" entries diff --stat: do not count "unmerged" entries diff --stat: move the "total count" logic to the last loop diff --stat: use "file" temporary variable to refer to data->files[i] diff --stat: status of unmodified pair in diff-q is not zero test: add failing tests for "diff --stat" to t4049
| * | t4049: refocus testsJunio C Hamano2012-11-291-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary thing Linus's patch wanted to change was to make sure that 0-line change appears for a mode-only change. Update the first test to chmod a file that we can see in the output (limited by --stat-count) to demonstrate it. Also make sure to use test_chmod and compare the index and the tree, so that we can run this test even on a filesystem without permission bits. Later two tests are about fixes to separate issues that were introduced and/or uncovered by Linus's patch as a side effect, but the issues are not related to mode-only changes. Remove chmod from the tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff --shortstat: do not count "unmerged" entriesJunio C Hamano2012-11-271-3/+2
| | | | | | | | | | | | | | | | | | | | | Fix the same issue as the previous one for "git diff --stat"; unmerged entries was doubly-counted. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff --stat: do not count "unmerged" entriesJunio C Hamano2012-11-272-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though we show a separate *UNMERGED* entry in the patch and diffstat output (or in the --raw format, for that matter) in addition to and separately from the diff against the specified stage (defaulting to #2) for unmerged paths, they should not be counted in the total number of files affected---that would lead to counting the same path twice. The separation done by the previous step makes this fix simple and straightforward. Among the filepairs in diff_queue, paths that weren't modified, and the extra "unmerged" entries do not count as total number of files. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff --stat: move the "total count" logic to the last loopJunio C Hamano2012-11-272-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diffstat generation logic, with --stat-count limit, is implemented as three loops. - The first counts the width necessary to show stats up to specified number of entries, and notes up to how many entries in the data we need to iterate to show the graph; - The second iterates that many times to draw the graph, adjusts the number of "total modified files", and counts the total added/deleted lines for the part that was shown in the graph; - The third iterates over the remainder and only does the part to count "total added/deleted lines" and to adjust "total modified files" without drawing anything. Move the logic to count added/deleted lines and modified files from the second loop to the third loop. This incidentally fixes a bug. The third loop was not filtering binary changes (counted in bytes) from the total added/deleted as it should. The second loop implemented this correctly, so if a binary change appeared earlier than the --stat-count cutoff, the code counted number of added/deleted lines correctly, but if it appeared beyond the cutoff, the number of lines would have mixed with the byte count in the buggy third loop. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff --stat: use "file" temporary variable to refer to data->files[i]Junio C Hamano2012-11-271-13/+13
| | | | | | | | | | | | | | | | | | The generated code shouldn't change but it is easier to read. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff --stat: status of unmodified pair in diff-q is not zeroJunio C Hamano2012-11-271-1/+1
| | | | | | | | | | | | | | | | | | It is spelled DIFF_STATUS_UNKNOWN these days, and is different from zero. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | test: add failing tests for "diff --stat" to t4049Junio C Hamano2012-11-271-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few problems in diff.c around --stat area, partially caused by the recent 74faaa1 (Fix "git diff --stat" for interesting - but empty - file changes, 2012-10-17), and largely caused by the earlier change that introduced when --stat-count was added. Add a few test pieces to t4049 to expose the issues. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'fc/remote-hg'Junio C Hamano2012-11-296-1/+1639
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New remote helper for hg. * fc/remote-hg: (22 commits) remote-hg: fix for older versions of python remote-hg: fix for files with spaces remote-hg: avoid bad refs remote-hg: try the 'tip' if no checkout present remote-hg: fix compatibility with older versions of hg remote-hg: add missing config for basic tests remote-hg: the author email can be null remote-hg: add option to not track branches remote-hg: add extra author test remote-hg: add tests to compare with hg-git remote-hg: add bidirectional tests test-lib: avoid full path to store test results remote-hg: add basic tests remote-hg: fake bookmark when there's none remote-hg: add compat for hg-git author fixes remote-hg: add support for hg-git compat mode remote-hg: match hg merge behavior remote-hg: make sure the encoding is correct remote-hg: add support to push URLs remote-hg: add support for remote pushing ...
| * | | remote-hg: fix for older versions of pythonFelipe Contreras2012-11-271-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Amit Bakshi reported, older versions of python (< 2.7) don't have subprocess.check_output, so let's use subprocess.Popen directly as suggested. Suggested-by: Amit Bakshi <ambakshi@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote-hg: fix for files with spacesFelipe Contreras2012-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote-hg: avoid bad refsFelipe Contreras2012-11-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out fast-export throws bad 'reset' commands because of a behavior in transport-helper that is not even needed. Either way, better to ignore them, otherwise the user will get warnings when we OK them. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: try the 'tip' if no checkout presentFelipe Contreras2012-11-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no concept of HEAD in mercurial, but let's try our best to do something sensible. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: fix compatibility with older versions of hgFelipe Contreras2012-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out repo.revs was introduced quite late, and it doesn't do anything fancy for our refspec; only list all the numbers in that range. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add missing config for basic testsRamkumar Ramachandra2012-11-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'hg commit' fails otherwise in some versions of mercurial because of the missing user information. Other versions simply throw a warning and guess though. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: the author email can be nullFelipe Contreras2012-11-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Like 'Foo <>'. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add option to not track branchesFelipe Contreras2012-11-041-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some people prefer it this way. % git config --global remote-hg.track-branches false Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add extra author testFelipe Contreras2012-11-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For hg.hg. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add tests to compare with hg-gitFelipe Contreras2012-11-041-0/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The base commands come from the tests of the hg-git project. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add bidirectional testsFelipe Contreras2012-11-041-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Base commands from hg-git tests: https://bitbucket.org/durin42/hg-git/src Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | test-lib: avoid full path to store test resultsFelipe Contreras2012-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason to use the full path in case this is used externally. Otherwise we might get errors such as: ./test-lib.sh: line 394: /home/bob/dev/git/t/test-results//home/bob/dev/git/contrib/remote-hg/test-2894.counts: No such file or directory Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add basic testsFelipe Contreras2012-11-042-0/+125
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: fake bookmark when there's noneFelipe Contreras2012-11-041-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Or at least no current bookmark. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add compat for hg-git author fixesFelipe Contreras2012-11-041-6/+53
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add support for hg-git compat modeFelipe Contreras2012-11-041-6/+83
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: match hg merge behaviorFelipe Contreras2012-11-041-0/+17
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: make sure the encoding is correctFelipe Contreras2012-11-041-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Independently of the environment. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add support to push URLsFelipe Contreras2012-11-041-2/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add support for remote pushingFelipe Contreras2012-11-041-2/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | remote-hg: add support for pushingFelipe Contreras2012-11-041-2/+215
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
| * | | Add new remote-hg transport helperFelipe Contreras2012-11-041-0/+391
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
* | | | Merge branch 'mk/complete-tcsh'Junio C Hamano2012-11-291-7/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finishing touches for tcsh completion. * mk/complete-tcsh: Support for git aliasing for tcsh completion
| * | | | Support for git aliasing for tcsh completionMarc Khouzam2012-11-271-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcsh users sometimes alias the 'git' command to another name. In this case, the user expects to only have to issue a new 'complete' command using the alias name. However, the tcsh script currently uses the command typed by the user to call the appropriate function in git-completion.bash, either _git() or _gitk(). When using an alias, this technique no longer works. This change specifies the real name of the command (either 'git' or 'gitk') as a parameter to the script handling tcsh completion. This allows the user to use any alias for the 'git' or 'gitk' commands, while still getting completion to work. A check for the presence of ${HOME}/.git-completion.bash is also added to help the user make use of the script properly. Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jc/doc-push-satellite'Junio C Hamano2012-11-291-2/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/doc-push-satellite: Documentation/git-push.txt: clarify the "push from satellite" workflow
| * | | | | Documentation/git-push.txt: clarify the "push from satellite" workflowJunio C Hamano2012-11-271-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context of the example to push into refs/remotes/satellite/ hierarchy of the other repository needs to be spelled out explicitly for the value of this example to be fully appreciated. Make it so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'km/send-email-remove-cruft-in-address'Junio C Hamano2012-11-291-18/+59
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * km/send-email-remove-cruft-in-address: git-send-email: allow edit invalid email address git-send-email: ask what to do with an invalid email address git-send-email: remove invalid addresses earlier git-send-email: fix fallback code in extract_valid_address() git-send-email: remove garbage after email address
| * | | | | | git-send-email: allow edit invalid email addressKrzysztof Mazur2012-11-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the user may want to send email with "Cc:" line with email address we cannot extract. Now we allow user to extract such email address for us. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-send-email: ask what to do with an invalid email addressKrzysztof Mazur2012-11-261-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to warn about invalid emails and just drop them. Such warnings can be unnoticed by user or noticed after sending email when we are not giving the "final sanity check [Y/n]?" Now we quit by default. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-send-email: remove invalid addresses earlierKrzysztof Mazur2012-11-261-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some addresses are passed twice to unique_email_list() and invalid addresses may be reported twice per send_message. Now we warn about them earlier and we also remove invalid addresses. This also removes using of undefined values for string comparison for invalid addresses in cc list processing. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-send-email: fix fallback code in extract_valid_address()Krzysztof Mazur2012-11-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the fallback check, used when Email::Valid is not available, the extract_valid_address() uses $1 without checking for success of matching regex. The $1 variable may still hold the result of previous match, which is the address when email address was in '<>' or be undefined otherwise. Now if match fails undefined value is always returned to indicate error. The same value is used by Email::Valid->address() in that case. Previously 'foo@bar' address was rejected by Email::Valid and fallback, but '<foo@bar>' was rejected by Email::Valid, but accepted by fallback. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | git-send-email: remove garbage after email addressKrzysztof Mazur2012-11-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases it is useful to add additional information after the email address on the Cc: footer in a commit log, for instance: "Cc: Stable kernel <stable@vger.kernel.org> #v3.4 v3.5 v3.6" However, git-send-email refuses to pick up such an invalid address when the Email::Valid perl module is available, or just uses the whole line as the email address. In sanitize_address(), remove everything after the email address, so that the result is a valid email address that makes Email::Valid happy. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Tested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>