summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-04-02Merge branch 'jr/grep-en-config'Junio C Hamano
* jr/grep-en-config: grep: allow -E and -n to be turned on by default via configuration
2011-04-02Merge branch 'ab/i18n-st'Junio C Hamano
* ab/i18n-st: (69 commits) i18n: git-shortlog basic messages i18n: git-revert split up "could not revert/apply" message i18n: git-revert literal "me" messages i18n: git-revert "Your local changes" message i18n: git-revert basic messages i18n: git-notes GIT_NOTES_REWRITE_MODE error message i18n: git-notes basic commands i18n: git-gc "Auto packing the repository" message i18n: git-gc basic messages i18n: git-describe basic messages i18n: git-clean clean.requireForce messages i18n: git-clean basic messages i18n: git-bundle basic messages i18n: git-archive basic messages i18n: git-status "renamed: " message i18n: git-status "Initial commit" message i18n: git-status "Changes to be committed" message i18n: git-status shortstatus messages i18n: git-status "nothing to commit" messages i18n: git-status basic messages ... Conflicts: builtin/branch.c builtin/checkout.c builtin/clone.c builtin/commit.c builtin/grep.c builtin/merge.c builtin/push.c builtin/revert.c t/t3507-cherry-pick-conflict.sh t/t7607-merge-overwrite.sh
2011-04-02Merge branch 'jk/pull-into-empty'Junio C Hamano
* jk/pull-into-empty: pull: do not clobber untracked files on initial pull merge: merge unborn index before setting ref
2011-04-02Merge branch 'sb/sparse-more'Junio C Hamano
* sb/sparse-more: Makefile: Cover more files with make check
2011-04-02Merge branch 'maint'Junio C Hamano
* maint: docs: fix filter-branch subdir example for exotic repo names
2011-04-01Merge branch 'nd/index-doc' into maintJunio C Hamano
* nd/index-doc: doc: technical details about the index file format doc: technical details about the index file format
2011-04-01Merge branch 'pk/stash-apply-status-relative' into maintJunio C Hamano
* pk/stash-apply-status-relative: Add test: git stash shows status relative to current dir git stash: show status relative to current directory
2011-04-01Merge branch 'jc/maint-diff-q-filter' into maintJunio C Hamano
* jc/maint-diff-q-filter: diff --quiet: disable optimization when --diff-filter=X is used
2011-04-01Merge branch 'js/maint-stash-index-copy' into maintJunio C Hamano
* js/maint-stash-index-copy: stash: copy the index using --index-output instead of cp -p stash: fix incorrect quoting in cleanup of temporary files
2011-04-01Merge branch 'mg/doc-bisect-tweak-worktree' into maintJunio C Hamano
* mg/doc-bisect-tweak-worktree: git-bisect.txt: example for bisecting with hot-fix git-bisect.txt: streamline run presentation
2011-04-01Merge branch 'jh/maint-do-not-track-non-branches' into maintJunio C Hamano
* jh/maint-do-not-track-non-branches: branch/checkout --track: Ensure that upstream branch is indeed a branch
2011-04-01Merge branch 'fk/maint-cvsimport-early-failure' into maintJunio C Hamano
* fk/maint-cvsimport-early-failure: git-cvsimport.perl: Bail out right away when reading from the server fails
2011-04-01Merge branch 'jc/maint-apply-report-offset' into maintJunio C Hamano
* jc/maint-apply-report-offset: apply -v: show offset count when patch did not apply exactly
2011-04-01Merge branch 'jc/maint-apply-no-double-patch' into maintJunio C Hamano
* jc/maint-apply-no-double-patch: apply: do not patch lines that were already patched
2011-04-01Merge branch 'js/checkout-untracked-symlink' into maintJunio C Hamano
* js/checkout-untracked-symlink: do not overwrite untracked symlinks Demonstrate breakage: checkout overwrites untracked symlink with directory
2011-04-01Merge "checkout ambiguous ref bugfix" into maintJunio C Hamano
* commit '0cb6ad3': checkout: fix bug with ambiguous refs
2011-04-01"log --cherry-pick" documentation regression fixJunio C Hamano
Earlier f98fd43 (git-log.txt,rev-list-options.txt: put option blocks in proper order, 2011-03-08) moved the text around in the documentation for options in the rev-list family of commands such as "log". Consequently, the description of the --cherry-pick option appears way above the description of the --left-right option now. But the description of the --cherry-pick option still refers to the example for the --left-right option, like this: ... with --left-right, like the example ABOVE in the description of that option. Rephrase it to clarify that we are making a forward reference. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01revisions.txt: structure with a labelled listMichael J Gruber
Currently, the reader has to parse a textual description in order to find a specific syntax in the list. Restructure as a labelled list with systematic labels as well as concrete examples as a visual guide. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01revisions.txt: consistent use of quotesMichael J Gruber
Our use of quotes is inconsistent everywhere and within some files. Before reworking the structure of revisions.txt, make the quotes consistent: `git command` 'some snippet or term' The former gets typeset as code, the latter with some form of emphasis. the man backend uses two types of emphasis. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01docs: fix filter-branch subdir example for exotic repo namesJeff King
The GIT_INDEX_FILE variable we get from git has the full path to the repo, which may contain spaces. When we use it in our shell snippet, it needs to be quoted. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-31Git 1.7.5-rc0v1.7.5-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-31Merge branch 'maint'Junio C Hamano
* maint: parse-remote: typofix
2011-03-31parse-remote: typofixJunio C Hamano
An earlier patch had a trivial typo that two people did not notice. Pointed out by Michael Schubert. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-31submodule: process conflicting submodules only onceNicolas Morey-Chaisemartin
During a merge module_list returns conflicting submodules several times (stage 1,2,3) which caused the submodules to be used multiple times in git submodule init, sync, update and status command. There are 5 callers of module_list; they all read (mode, sha1, stage, path) tuple, and most of them care only about path. As a first level approximation, it should be Ok (in the sense that it does not make things worse than it currently is) to filter the duplicate paths from module_list output, but some callers should change their behaviour when the merge in the superproject still has conflicts. Notice the higher-stage entries, and emit only one record from module_list, but while doing so, mark the entry with "U" (not [0-3]) in the $stage field and null out the SHA-1 part, as the object name for the lowest stage does not give any useful information to the caller, and this way any caller that uses the object name would hopefully barf. Then update the codepaths for each subcommands this way: - "update" should not touch the submodule repository, because we do not know what commit should be checked out yet. - "status" reports the conflicting submodules as 'U000...000' and does not recurse into them (we might later want to make it recurse). - The command called by "foreach" may want to do whatever it wants to do by noticing the merged status in the superproject itself, so feed the path to it from module_list as before, but only once per submodule. - "init" and "sync" are unlikely things to do while the superproject is still not merged, but as long as a submodule is there in $path, there is no point skipping it. It might however want to take the merged status of .gitmodules into account, but that is outside of the scope of this topic. Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Thanks-to: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30Merge branch 'maint'Junio C Hamano
* maint: contrib/thunderbird-patch-inline: do not require bash to run the script t8001: check the exit status of the command being tested strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead Typos: t/README Documentation/config.txt: make truth value of numbers more explicit git-pack-objects.txt: fix grammatical errors parse-remote: replace unnecessary sed invocation
2011-03-30remote: deprecate --mirrorJeff King
The configuration created by plain --mirror is dangerous and useless, and we now have --mirror=fetch and --mirror=push to replace it. Let's warn the user. One alternative to this is to try to guess which type the user wants. In a non-bare repository, a fetch mirror doesn't make much sense, since it would overwrite local commits. But in a bare repository, you might use either type, or even both (e.g., if you are acting as an intermediate drop-point across two disconnected networks). So rather than try for complex heuristics, let's keep it simple. The user knows what they're trying to do, so let them tell us. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30remote: separate the concept of push and fetch mirrorsJeff King
git-remote currently has one option, "--mirror", which sets up mirror configuration which can be used for either fetching or pushing. It looks like this: [remote "mirror"] url = wherever fetch = +refs/*:refs/* mirror = true However, a remote like this can be dangerous and confusing. Specifically: 1. If you issue the wrong command, it can be devastating. You are not likely to "push" when you meant to "fetch", but "git remote update" will try to fetch it, even if you intended the remote only for pushing. In either case, the results can be quite destructive. An unintended push will overwrite or delete remote refs, and an unintended fetch can overwrite local branches. 2. The tracking setup code can produce confusing results. The fetch refspec above means that "git checkout -b new master" will consider refs/heads/master to come from the remote "mirror", even if you only ever intend to push to the mirror. It will set up the "new" branch to track mirror's refs/heads/master. 3. The push code tries to opportunistically update tracking branches. If you "git push mirror foo:bar", it will see that we are updating mirror's refs/heads/bar, which corresponds to our local refs/heads/bar, and will update our local branch. To solve this, we split the concept into "push mirrors" and "fetch mirrors". Push mirrors set only remote.*.mirror, solving (2) and (3), and making an accidental fetch write only into FETCH_HEAD. Fetch mirrors set only the fetch refspec, meaning an accidental push will not force-overwrite or delete refs on the remote end. The new syntax is "--mirror=<fetch|push>". For compatibility, we keep "--mirror" as-is, setting up both types simultaneously. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30remote: disallow some nonsensical option combinationsJeff King
It doesn't make sense to use "-m" on a mirror, since "-m" sets up the HEAD symref in the remotes namespace, but with mirror, we are by definition not using a remotes namespace. Similarly, it does not make much sense to specify refspecs with --mirror. For a mirror you plan to push to, those refspecs will be ignored. For a mirror you are fetching from, there is no point in mirroring, since the refspec specifies everything you want to grab. There is one case where "--mirror -t <X>" would be useful. Because <X> is used as-is in the refspec, and because we append it to to refs/, you could mirror a subset of the hierarchy by doing: git remote add --mirror -t 'tags/*' But using anything besides a single branch as an argument to "-t" is not documented and only happens to work, so closing it off is not a serious regression. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30grep: allow -E and -n to be turned on by default via configurationJoe Ratterman
Add two configration variables grep.extendedRegexp and grep.lineNumbers to allow the user to skip typing -E and -n on the command line, respectively. Scripts that are meant to be used by random users and/or in random repositories now have use -G and/or --no-line-number options as appropriately to override the settings in the repository or user's ~/.gitconfig settings. Just because the script didn't say "git grep -n" no longer guarantees that the output from the command will not have line numbers. Signed-off-by: Joe Ratterman <jratt0@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30contrib/thunderbird-patch-inline: do not require bash to run the scriptMaxin john
The script does not have to be run under bash, but any POSIX compliant shell would do, as it does not use any bash-isms. It may be written under a different style than what is recommended in Documentation/CodingGuidelines, but that is a different matter. While at it, fix obvious typos in the comment. Signed-off-by: Maxin B. John <maxin@maxinbjohn.info> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30t8001: check the exit status of the command being testedJunio C Hamano
Avoid running the command being tested as an upstream of a pipe; doing so will lose its exit status. While at it, modernise the style of the script. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30strbuf.h: remove a tad stale docs-in-comment and reference api-doc insteadMichael Witten
Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30Typos: t/READMEMichael Witten
Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30Documentation/config.txt: make truth value of numbers more explicitCarlos Martín Nieto
Change the order to 1/0 to have the same true/false order as the rest of the possibilities for a boolean variable in order not not confuse users. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30git-pack-objects.txt: fix grammatical errorsStephen Boyd
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30parse-remote: replace unnecessary sed invocationStephen Boyd
Just use parameter expansion instead. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30Merge branch 'svn-fe' of git://repo.or.cz/git/jrnJunio C Hamano
* 'svn-fe' of git://repo.or.cz/git/jrn: tests: kill backgrounded processes more robustly vcs-svn: a void function shouldn't try to return something tests: make sure input to sed is newline terminated vcs-svn: add missing cast to printf argument
2011-03-30tests: kill backgrounded processes more robustlyJeff King
t0081 creates several background processes that write to a fifo and then go to sleep for a while (so the reader of the fifo does not see EOF). Each background process is made in a curly-braced block in the shell, and after we are done reading from the fifo, we use "kill $!" to kill it off. For a simple, single-command process, this works reliably and kills the child sleep process. But for more complex commands like "make_some_output && sleep", the results are less predictable. When executing under bash, we end up with a subshell that gets killed by the $! but leaves the sleep process still alive. This is bad not only for process hygeine (we are leaving random sleep processes to expire after a while), but also interacts badly with the "prove" command. When prove executes a test, it does not realize the test is done when it sees SIGCHLD, but rather waits until the test's stdout pipe is closed. The orphaned sleep process may keep that pipe open via test-lib's file descriptor 5, causing prove to hang for 100 seconds. The solution is to explicitly use a subshell and to exec the final sleep process, so that when we "kill $!" we get the process id of the sleep process. [jn: original patch by Jeff had some additional bits: 1. Wrap the "kill" in a test_when_finished, since we want to clean up the process whether the test succeeds or not. 2. The "kill" is part of our && chain for test success. It probably won't fail, but it can if the process has expired before we manage to kill it. So let's mark it as OK to fail. I'm postponing that for now.] Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-29Merge branch 'maint'Junio C Hamano
* maint: HOME must be set before calling git-init when creating test repositories
2011-03-29Merge branch 'jc/fetch-progressive-stride'Junio C Hamano
* jc/fetch-progressive-stride: Fix potential local deadlock during fetch-pack
2011-03-29Merge branches 'sp/maint-fetch-pack-stop-early' and ↵Junio C Hamano
'sp/maint-upload-pack-stop-early' * sp/maint-fetch-pack-stop-early: enable "no-done" extension only when fetching over smart-http * sp/maint-upload-pack-stop-early: enable "no-done" extension only when serving over smart-http
2011-03-29vcs-svn: a void function shouldn't try to return somethingMichael Witten
As v1.7.4-rc0~184 (2010-10-04) and C99 §6.8.6.4.1 remind us, standard C does not permit returning an expression of type void, even for a tail call. Noticed with gcc -pedantic: vcs-svn/svndump.c: In function 'handle_node': vcs-svn/svndump.c:213:3: warning: ISO C forbids 'return' with expression, in function returning void [-pedantic] [jn: with simplified log message] Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-29Revert two "no-done" revertsJunio C Hamano
Last night I had to make these two emergency reverts, but now we have a better understanding of which part of the topic was broken, let's get rid of the revert to fix it correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-29enable "no-done" extension only when serving over smart-httpJunio C Hamano
Do not advertise no-done capability when upload-pack is not serving over smart-http, as there is no way for this server to know when it should stop reading in-flight data from the client, even though it is necessary to drain all the in-flight data in order to unblock the client. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2011-03-29Fix potential local deadlock during fetch-packJunio C Hamano
The fetch-pack/upload-pack protocol relies on the underlying transport (local pipe or TCP socket) to have enough slack to allow one window worth of data in flight without blocking the writer. Traditionally we always relied on being able to have two windows of 32 "have"s in flight (roughly 3k bytes) to stream. The recent "progressive-stride" change allows "fetch-pack" to send up to 1024 "have"s without reading any response from "upload-pack". The outgoing pipe of "upload-pack" can be clogged with many ACK and NAK that are unread, while "fetch-pack" is still stuffing its outgoing pipe with more "have"s, leading to a deadlock. Revert the change unless we are in stateless rpc (aka smart-http) mode, as using a large window full of "have"s is still a good way to help reduce the number of back-and-forth, and there is no buffering issue there (it is strictly "ping-pong" without an overlap). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-29enable "no-done" extension only when fetching over smart-httpJunio C Hamano
When 'no-done' protocol extension is used, the upload-pack (i.e. the server side) process stops listening to the fetch-pack after issuing the final NAK, and starts sending the generated pack data back, but there may be more "have" send by the latter in flight that the fetch-pack is expecting to be responded with ACK/NAK. This will typically result in a deadlock (both will block on write that the other end never reads) or SIGPIPE on the fetch-pack end (upload-pack will finish writing a small pack and goes away). Disable it unless fetch-pack is running under smart-http, where there is no such streaming issue. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2011-03-29HOME must be set before calling git-init when creating test repositoriesAlex Riesen
Otherwise the created test repositories will be affected by users ~/.gitconfig. For example, setting core.logAllrefupdates in users config will make all calls to "git config --unset core.logAllrefupdates" fail which will break the first test which uses the statement and expects it to succeed. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-29tests: make sure input to sed is newline terminatedJonathan Nieder
POSIX only requires sed to work on text files and because it does not end with a newline, this commit's content is not a text file. Add a newline to fix it. Without this change, OS X sed helpfully adds a newline to actual.message, causing t9010.13 to fail. Reported-by: Torsten Bögershausen <tboegi@web.de> Tested-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-03-29Revert "fetch-pack: Implement no-done capability"Junio C Hamano
This reverts commit 761ecf0bc7b6cddf311f00877c59e6381cdbdeea.
2011-03-29Revert "upload-pack: Implement no-done capability"Junio C Hamano
This reverts 3e63b21 (upload-pack: Implement no-done capability, 2011-03-14). Together with 761ecf0 (fetch-pack: Implement no-done capability, 2011-03-14) it seems to make the fetch-pack process out of sync and makes it keep talking long after upload-pack stopped listening to it, terminating the process with SIGPIPE.