summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-05-26Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix' into maint-1.7.4Libravatar Junio C Hamano1-2/+7
* js/maint-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt send-pack: unbreak push over stateless rpc send-pack: avoid deadlock when pack-object dies early
2011-05-26Merge branch 'jk/maint-upload-pack-shallow' into maint-1.7.4Libravatar Junio C Hamano1-12/+11
* jk/maint-upload-pack-shallow: upload-pack: start pack-objects before async rev-list
2011-05-16Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into ↵Libravatar Junio C Hamano1-2/+2
js/maint-send-pack-stateless-rpc-deadlock-fix * js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt
2011-05-16sideband_demux(): fix decl-after-stmtLibravatar Junio C Hamano1-2/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-05Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into ↵Libravatar Junio C Hamano1-1/+2
js/maint-send-pack-stateless-rpc-deadlock-fix * js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix: send-pack: unbreak push over stateless rpc
2011-05-05send-pack: unbreak push over stateless rpcLibravatar Jeff King1-1/+2
Commit 09c9957 (send-pack: avoid deadlock when pack-object dies early, 2011-04-25) attempted to fix a hang in the stateless rpc case by closing a file descriptor early, but we still need that descriptor. Basically the deadlock can happen when pack-objects fails, and the descriptor to upstream is left open. We never send the pack, so the upstream is left waiting for us to say something, and we are left waiting for upstream to close the connection. In the non-rpc case, our descriptor points straight to the upstream. We hand it off to run-command, which takes ownership and closes the descriptor after pack-objects finishes (whether it succeeds or not). Commit 09c9957 tried to emulate that in the rpc case. That isn't right, though. We actually have a descriptor going back to the remote-helper, and we need to keep using it after pack-objects is finished. Closing it early completely breaks pushing via smart-http. We still need to do something on error to signal the remote-helper that we won't be sending any pack data (otherwise we get the deadlock). In an ideal world, we would send a special packet back that says "Sorry, there was an error". But the remote-helper doesn't understand any such packet, so the best we can do is close the descriptor and let it report that we hung up unexpectedly. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-25Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into ↵Libravatar Junio C Hamano1-0/+4
js/maint-send-pack-stateless-rpc-deadlock-fix * js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix: send-pack: avoid deadlock when pack-object dies early Evil merge to adjust the way the use of pthreads in sideband-demultiplexor was decided (earlier it was "if we are not on Windows", now it is "if we are not using pthreads").
2011-04-25send-pack: avoid deadlock when pack-object dies earlyLibravatar Johannes Sixt1-0/+4
Send-pack deadlocks in two ways when pack-object dies early (for example, because there is some repo corruption). The first deadlock happens with the smart push protocol (--stateless-rpc). After the initial rev-exchange, the remote is waiting for the pack data to arrive, and the sideband demuxer at the local side continues trying to stream data from the remote repository until it gets EOF. Meanwhile, send-pack (in function pack_objects()) has noticed that pack-objects did not produce output and died. Back in send_pack(), it now tries to clean up the sideband demuxer using finish_async(). The demuxer, however, waits for the remote end to close down, the remote waits for pack data, and the reason that it still waits is that send-pack forgot to close the outgoing channel. Add the missing close() in pack_objects(). The second deadlock happens in a similar constellation when the sideband demuxer runs in a forked process (rather than in a thread). Again, the remote end waits for pack data to arrive, the sideband demuxer waits for the remote to shut down, and send-pack (in the regular clean-up) waits for the demuxer to terminate. This time, the send-pack parent process closes the writable end of the outgoing channel (in start_command() that spawned pack-objects) so that after the death of the pack-objects process all writable ends should have been closed and the remote repo should see EOF. This does not happen, however, because when the sideband demuxer was forked earlier, it also inherited a writable end; it remains open and keeps the remote repo from seeing EOF. To break this deadlock, close the writable end in the demuxer. Analyzed-by: Jeff King <peff@peff.net> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-19Git 1.7.4.5Libravatar Junio C Hamano3-2/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-19git-svn.txt: Document --mergeinfoLibravatar Michael J Gruber1-0/+7
6abd933 (git-svn: allow the mergeinfo property to be set, 2010-09-24) introduced the --mergeinfo option. Document it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-14archive: document limitation of tar.umask config settingLibravatar René Scharfe1-1/+2
The local value of the config variable tar.umask is not passed to the other side with --remote. We may want to change that, but for now just document this fact. Reported-by: Jacek Masiulaniec <jacek.masiulaniec@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-14t3306,t5304: avoid clock skew issuesLibravatar Michael J Gruber2-1/+5
On systems where the local time and file modification time may be out of sync (e.g. test directory on NFS) t3306 and t5305 can fail because prune compares times such as "now" (client time) with file modification times (server times for remote file systems). I.e., these are spurious test failures. Avoid this by setting the relevant modification times to the local time. Noticed on a system with as little as 2s time skew. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-14git.txt: fix list continuationLibravatar Michael J Gruber1-1/+0
Remove a spurious empty line which prevented asciidoc from recognizing a list continuation mark ('+'), so that it does not get output literally any more. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-13Merge branch 'jc/rev-list-options-fix' into maintLibravatar Junio C Hamano1-2/+2
* jc/rev-list-options-fix: "log --cherry-pick" documentation regression fix
2011-04-13Merge branch 'js/checkout-untracked-symlink' into maintLibravatar Junio C Hamano1-1/+1
* js/checkout-untracked-symlink: t2021: mark a test as fixed
2011-04-12t2021: mark a test as fixedLibravatar Johannes Sixt1-1/+1
The failure was fixed by the previous commit. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06upload-pack: start pack-objects before async rev-listLibravatar Jeff King1-12/+11
In a pthread-enabled version of upload-pack, there's a race condition that can cause a deadlock on the fflush(NULL) we call from run-command. What happens is this: 1. Upload-pack is informed we are doing a shallow clone. 2. We call start_async() to spawn a thread that will generate rev-list results to feed to pack-objects. It gets a file descriptor to a pipe which will eventually hook to pack-objects. 3. The rev-list thread uses fdopen to create a new output stream around the fd we gave it, called pack_pipe. 4. The thread writes results to pack_pipe. Outside of our control, libc is doing locking on the stream. We keep writing until the OS pipe buffer is full, and then we block in write(), still holding the lock. 5. The main thread now uses start_command to spawn pack-objects. Before forking, it calls fflush(NULL) to flush every stdio output buffer. It blocks trying to get the lock on pack_pipe. And we have a deadlock. The thread will block until somebody starts reading from the pipe. But nobody will read from the pipe until we finish flushing to the pipe. To fix this, we swap the start order: we start the pack-objects reader first, and then the rev-list writer after. Thus the problematic fflush(NULL) happens before we even open the new file descriptor (and even if it didn't, flushing should no longer block, as the reader at the end of the pipe is now active). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06Git 1.7.4.4Libravatar Junio C Hamano3-8/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06Merge branch 'nm/maint-conflicted-submodule-entries' into maintLibravatar Junio C Hamano3-9/+83
* nm/maint-conflicted-submodule-entries: submodule: process conflicting submodules only once
2011-04-06Merge branch 'mg/rev-list-n-reverse-doc' into maintLibravatar Junio C Hamano2-161/+163
* mg/rev-list-n-reverse-doc: git-log.txt,rev-list-options.txt: put option blocks in proper order git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting
2011-04-04Documentation: trivial grammar fix in core.worktree descriptionLibravatar SZEDER Gábor1-1/+1
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-04gitweb: Fix parsing of negative fractional timezones in JavaScriptLibravatar Jakub Narebski1-5/+19
Extract converting numerical timezone in the form of '(+|-)HHMM' to timezoneOffset function, and fix parsing of negative fractional timezones. This is used to format timestamps in 'blame_incremental' view; this complements commit 2b1e172 (gitweb: Fix handling of fractional timezones in parse_date, 2011-03-25). Now gitweb.cgi/git.git/blame_incremental/3fe5489:/contrib/gitview/gitview#l853 and gitweb.cgi/git.git/blame/3fe5489:/contrib/gitview/gitview#l853 show the same correct time in author's local timezone in title (on mouseover) [Aneesh Kumar K.V, 2006-02-24 00:59:42 +0530]. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03Start preparing for 1.7.4.4Libravatar Junio C Hamano2-1/+38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03pull: do not clobber untracked files on initial pullLibravatar Jeff King2-1/+12
For a pull into an unborn branch, we do not use "git merge" at all. Instead, we call read-tree directly. However, we used the --reset parameter instead of "-m", which turns off the safety features. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03Merge branch 'jc/index-update-if-able' into maintLibravatar Junio C Hamano4-13/+29
* jc/index-update-if-able: update $GIT_INDEX_FILE when there are racily clean entries diff/status: refactor opportunistic index update
2011-04-03Merge branch 'lt/default-abbrev' into maintLibravatar Junio C Hamano5-3/+23
* lt/default-abbrev: Rename core.abbrevlength back to core.abbrev Make the default abbrev length configurable
2011-04-03Merge branch 'jc/maint-rev-list-culled-boundary' into maintLibravatar Junio C Hamano2-1/+33
* jc/maint-rev-list-culled-boundary: list-objects.c: don't add an unparsed NULL as a pending tree Conflicts: list-objects.c
2011-04-03Merge branch 'mm/maint-log-n-with-diff-filtering' into maintLibravatar Junio C Hamano5-1/+26
* mm/maint-log-n-with-diff-filtering: log: fix --max-count when used together with -S or -G
2011-04-03Merge branch 'jk/format-patch-multiline-header' into maintLibravatar Junio C Hamano4-10/+121
* jk/format-patch-multiline-header: format-patch: rfc2047-encode newlines in headers format-patch: wrap long header lines strbuf: add fixed-length version of add_wrapped_text
2011-04-03Merge branch 'jn/maint-instaweb-plack-fix' into maintLibravatar Junio C Hamano1-2/+4
* jn/maint-instaweb-plack-fix: git-instaweb: Change how gitweb.psgi is made runnable as standalone app
2011-04-03Merge branch 'lp/config-vername-check' into maintLibravatar Junio C Hamano4-50/+111
* lp/config-vername-check: Disallow empty section and variable names Sanity-check config variable names
2011-04-03compat: add missing #include <sys/resource.h>Libravatar Jonathan Nieder1-0/+1
Starting with commit c793430 (Limit file descriptors used by packs, 2011-02-28), git uses getrlimit to tell how many file descriptors it can use. Unfortunately it does not include the header declaring that function, resulting in compilation errors: sha1_file.c: In function 'open_packed_git_1': sha1_file.c:718: error: storage size of 'lim' isn't known sha1_file.c:721: warning: implicit declaration of function 'getrlimit' sha1_file.c:721: error: 'RLIMIT_NOFILE' undeclared (first use in this function) sha1_file.c:718: warning: unused variable 'lim' The standard header to include for this is <sys/resource.h> (which on some systems itself requires declarations from <sys/types.h> or <sys/time.h>). Probably the problem was missed until now because in current glibc sys/resource.h happens to be included by sys/wait.h. MinGW does not provide sys/resource.h (and compat/mingw takes care of providing getrlimit some other way), so add the missing #include to the "#ifndef __MINGW32__" block in git-compat-util.h. Reported-by: Stefan Sperling <stsp@stsp.name> Tested-by: Stefan Sperling <stsp@stsp.name> [on OpenBSD] Tested-by: Arnaud Lacombe <lacombar@gmail.com> [on FreeBSD 8] Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-03Git 1.7.4.3Libravatar Junio C Hamano3-2/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-02Doc: mention --delta-base-offset is the default for Porcelain commandsLibravatar Junio C Hamano1-1/+6
The underlying pack-objects plumbing command still needs an explicit option from the command line, but these days Porcelain passes the option, so there is no need for end users to worry about it anymore. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01Merge branch 'nd/index-doc' into maintLibravatar Junio C Hamano1-0/+185
* 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 maintLibravatar Junio C Hamano2-1/+21
* 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 maintLibravatar Junio C Hamano2-1/+9
* 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 maintLibravatar Junio C Hamano1-6/+5
* 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 maintLibravatar Junio C Hamano1-23/+38
* 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 maintLibravatar Junio C Hamano4-18/+39
* 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 maintLibravatar Junio C Hamano1-1/+3
* 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 maintLibravatar Junio C Hamano1-2/+14
* 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 maintLibravatar Junio C Hamano1-1/+6
* jc/maint-apply-no-double-patch: apply: do not patch lines that were already patched
2011-04-01Merge branch 'js/checkout-untracked-symlink' into maintLibravatar Junio C Hamano3-4/+62
* 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 maintLibravatar Junio C Hamano2-10/+72
* commit '0cb6ad3': checkout: fix bug with ambiguous refs
2011-04-01"log --cherry-pick" documentation regression fixLibravatar Junio C Hamano1-2/+2
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-01docs: fix filter-branch subdir example for exotic repo namesLibravatar Jeff King1-1/+1
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-30parse-remote: typofixLibravatar Junio C Hamano1-1/+1
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-30submodule: process conflicting submodules only onceLibravatar Nicolas Morey-Chaisemartin3-9/+83
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-30contrib/thunderbird-patch-inline: do not require bash to run the scriptLibravatar Maxin john1-2/+2
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>