summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-26Merge branch 'maint-1.7.3' into maint-1.7.4Libravatar Junio C Hamano3-5/+12
* maint-1.7.3: make the sample pre-commit hook script reject names with newlines, too Reindent closing bracket using tab instead of spaces Documentation/git-update-index: refer to 'ls-files'
2011-10-26Merge branch 'sn/doc-update-index-assume-unchanged' into maint-1.7.3Libravatar Junio C Hamano1-2/+5
* sn/doc-update-index-assume-unchanged: Documentation/git-update-index: refer to 'ls-files'
2011-10-26make the sample pre-commit hook script reject names with newlines, tooLibravatar Jim Meyering1-2/+6
The sample pre-commit hook script would fail to reject a file name like "a\nb" because of the way newlines are handled in "$(...)". Adjust the test to count filtered bytes and require there be 0. Also print all diagnostics to standard error, not stdout, so they will actually be seen. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-23Reindent closing bracket using tab instead of spacesLibravatar Nguyễn Thái Ngọc Duy1-1/+1
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-21Documentation/git-update-index: refer to 'ls-files'Libravatar Stefan Naewe1-2/+5
'ls-files' refers to 'update-index' to show how the 'assume unchanged' bit can be seen. This makes the connection 'bi-directional'. Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-24completion: replace core.abbrevguard to core.abbrevLibravatar Namhyung Kim1-1/+1
The core.abbrevguard config variable had removed and now core.abbrev has been used instead. Teach it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-26Merge branch 'jk/git-connection-deadlock-fix' into maint-1.7.4Libravatar Junio C Hamano4-14/+67
* jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c
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-18test core.gitproxy configurationLibravatar Jeff King1-0/+43
This is just a basic sanity test to see whether core.gitproxy works at all. Until now, we were not testing anywhere. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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-16send-pack: avoid deadlock on git:// push with failed pack-objectsLibravatar Jeff King1-0/+2
Commit 09c9957c fixes a deadlock in which pack-objects fails, the remote end is still waiting for pack data, and we are still waiting for the remote end to say something (see that commit for a much more in-depth explanation). We solved the problem there by making sure the output pipe is closed on error; thus the remote sees EOF, and proceeds to complain and close its end of the connection. However, in the special case of push over git://, we don't have a pipe, but rather a full-duplex socket, with another dup()-ed descriptor in place of the second half of the pipe. In this case, closing the second descriptor signals nothing to the remote end, and we still deadlock. This patch calls shutdown() explicitly to signal EOF to the other side. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-16connect: let callers know if connection is a socketLibravatar Jeff King2-1/+7
They might care because they want to do a half-duplex close. With pipes, that means simply closing the output descriptor; with a socket, you must actually call shutdown. Instead of exposing the magic no_fork child_process struct, let's encapsulate the test in a function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-16connect: treat generic proxy processes like ssh processesLibravatar Jeff King1-13/+15
The git_connect function returns two ends of a pipe for talking with a remote, plus a struct child_process representing the other end of the pipe. If we have a direct socket connection, then this points to a special "no_fork" child process. The code path for doing git-over-pipes or git-over-ssh sets up this child process to point to the child git command or the ssh process. When we call finish_connect eventually, we check wait() on the command and report its return value. The code path for git://, on the other hand, always sets it to no_fork. In the case of a direct TCP connection, this makes sense; we have no child process. But in the case of a proxy command (configured by core.gitproxy), we do have a child process, but we throw away its pid, and therefore ignore its return code. Instead, let's keep that information in the proxy case, and respect its return code, which can help catch some errors (though depending on your proxy command, it will be errors reported by the proxy command itself, and not propagated from git commands. Still, it is probably better to propagate such errors than to ignore them). It also means that the child_process field can reliably be used to determine whether the returned descriptors are actually a full-duplex socket, which means we should be using shutdown() instead of a simple close. Signed-off-by: Jeff King <peff@peff.net> Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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