summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-10-25Merge branch 'jc/maint-fix-unpack-zlib-check' into maintLibravatar Junio C Hamano1-5/+3
* jc/maint-fix-unpack-zlib-check: Fix incorrect error check while reading deflated pack data
2009-10-25Merge branch 'maint-1.6.4' into maintLibravatar Junio C Hamano2-8/+32
* maint-1.6.4: ls-files: excludes should not impact tracked files
2009-10-25Merge branch 'jk/maint-1.6.3-ls-files-no-ignore-cached' into maint-1.6.4Libravatar Junio C Hamano2-8/+32
* jk/maint-1.6.3-ls-files-no-ignore-cached: ls-files: excludes should not impact tracked files
2009-10-25Merge branch 'jn/maint-1.6.3-check-ref-format-doc' into maint-1.6.4Libravatar Junio C Hamano1-3/+6
* jn/maint-1.6.3-check-ref-format-doc: Documentation: describe check-ref-format --branch
2009-10-24t7800-difftool: fix the effectless GIT_DIFFTOOL_PROMPT testLibravatar Markus Heidelberg1-1/+1
GIT_DIFFTOOL_PROMPT doesn't have any effect if overridden with --prompt. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-24Work around option parsing bug in the busybox tar implementationLibravatar Andreas Schwab1-1/+1
The first argument of the tar command is interpreted as a bundle of letters specifying the mode of operation and additional options, with any option arguments taken from subsequent words on the command line as needed. The implementation of tar in busybox treats this bundle as if preceded by a dash and then parses it by getopt rules, which mishandles 'tar xfo -'. Use 'tar xof -' instead to work this around. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-23Fix list of released versions in the toc documentLibravatar Junio C Hamano1-1/+1
2009-10-23Merge branch 'jp/maint-send-email-fold' into maintLibravatar Junio C Hamano2-22/+78
* jp/maint-send-email-fold: git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s
2009-10-23Merge branch 'jn/maint-1.6.3-check-ref-format-doc' into maintLibravatar Junio C Hamano1-3/+6
* jn/maint-1.6.3-check-ref-format-doc: Documentation: describe check-ref-format --branch
2009-10-23Merge branch 'pv/maint-add-p-no-exclude' into maintLibravatar Junio C Hamano2-1/+15
* pv/maint-add-p-no-exclude: git-add--interactive: never skip files included in index
2009-10-23Do not fail "describe --always" in a tag-less repositoryLibravatar Junio C Hamano2-1/+3
This fixes a regression introduce by d68dc34 (git-describe: Die early if there are no possible descriptions, 2009-08-06). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21Fix incorrect error check while reading deflated pack dataLibravatar Junio C Hamano1-5/+3
The loop in get_size_from_delta() feeds a deflated delta data from the pack stream _until_ we get inflated result of 20 bytes[*] or we reach the end of stream. Side note. This magic number 20 does not have anything to do with the size of the hash we use, but comes from 1a3b55c (reduce delta head inflated size, 2006-10-18). The loop reads like this: do { in = use_pack(); stream.next_in = in; st = git_inflate(&stream, Z_FINISH); curpos += stream.next_in - in; } while ((st == Z_OK || st == Z_BUF_ERROR) && stream.total_out < sizeof(delta_head)); This git_inflate() can return: - Z_STREAM_END, if use_pack() fed it enough input and the delta itself was smaller than 20 bytes; - Z_OK, when some progress has been made; - Z_BUF_ERROR, if no progress is possible, because we either ran out of input (due to corrupt pack), or we ran out of output before we saw the end of the stream. The fix b3118bd (sha1_file: Fix infinite loop when pack is corrupted, 2009-10-14) attempted was against a corruption that appears to be a valid stream that produces a result larger than the output buffer, but we are not even trying to read the stream to the end in this loop. If avail_out becomes zero, total_out will be the same as sizeof(delta_head) so the loop will terminate without the "fix". There is no fix from b3118bd needed for this loop, in other words. The loop in unpack_compressed_entry() is quite a different story. It feeds a deflated stream (either delta or base) and allows the stream to produce output up to what we expect but no more. do { in = use_pack(); stream.next_in = in; st = git_inflate(&stream, Z_FINISH); curpos += stream.next_in - in; } while (st == Z_OK || st == Z_BUF_ERROR) This _does_ risk falling into an endless interation, as we can exhaust avail_out if the length we expect is smaller than what the stream wants to produce (due to pack corruption). In such a case, avail_out will become zero and inflate() will return Z_BUF_ERROR, while avail_in may (or may not) be zero. But this is not a right fix: do { in = use_pack(); stream.next_in = in; st = git_inflate(&stream, Z_FINISH); + if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out) + break; /* wants more input??? */ curpos += stream.next_in - in; } while (st == Z_OK || st == Z_BUF_ERROR) as Z_BUF_ERROR from inflate() may be telling us that avail_in has also run out before reading the end of stream marker. In such a case, both avail_in and avail_out would be zero, and the loop should iterate to allow the end of stream marker to be seen by inflate from the input stream. The right fix for this loop is likely to be to increment the initial avail_out by one (we allocate one extra byte to terminate it with NUL anyway, so there is no risk to overrun the buffer), and break out if we see that avail_out has become zero, in order to detect that the stream wants to produce more than what we expect. After the loop, we have a check that exactly tests this condition: if ((st != Z_STREAM_END) || stream.total_out != size) { free(buffer); return NULL; } So here is a patch (without my previous botched attempts) to fix this issue. The first hunk reverts the corresponding hunk from b3118bd, and the second hunk is the same fix proposed earlier. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21Document `delta` attribute in "git help attributes".Libravatar Nasser Grainawi1-0/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21Mark files in t/t5100 as UTF-8Libravatar Johannes Sixt1-0/+4
This enables gitk to show the patch text with correct glyphs if the locale is not UTF-8. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21Remove a left-over file from t/t5100Libravatar Johannes Sixt1-35/+0
This mbox file must have been added by accident in e9fe804 (git-mailinfo: Fix getting the subject from the in-body [PATCH] line, 2008-07-14). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-20Documentation/git-gc.txt: change "references" to "reference"Libravatar Matt Kraai1-1/+1
Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18git push: say that --tag can't be used with --all or --mirror in help textLibravatar Nanako Shiraishi1-1/+1
This replaces an earlier patch by Björn Gustavsson, Message-ID: <4AD75029.1010109@gmail.com> Signed-off-by: しらいし ななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18git push: remove incomplete options list from help textLibravatar Nanako Shiraishi1-1/+1
'git push -h' shows usage text with incomplete list of options and then has a separate list of options that are supported. Imitate the way other commands (I looked at 'git diff' for an example) show their options. Signed-off-by: しらいし ななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18document push's new quiet optionLibravatar Jeff King1-0/+5
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18Makefile: clean block-sha1/ directory instead of mozilla-sha1/Libravatar Carlos R. Mafra1-1/+1
'make clean' should remove the object files from block-sha1/ instead of the non-existent mozilla-sha1/ directory. Signed-off-by: Carlos R. Mafra <crmafra@aei.mpg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-16GIT 1.6.5.1Libravatar Junio C Hamano4-2/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-16Merge branch 'maint-1.6.4' into maintLibravatar Junio C Hamano2-1/+67
* maint-1.6.4: grep: do not segfault when -f is used
2009-10-16grep: do not segfault when -f is usedLibravatar Matt Kraai2-1/+67
"git grep" would segfault if its -f option was used because it would try to use an uninitialized strbuf, so initialize the strbuf. Thanks to Johannes Sixt <j.sixt@viscovery.net> for the help with the test cases. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14sha1_file: Fix infinite loop when pack is corruptedLibravatar Shawn O. Pearce2-0/+13
Some types of corruption to a pack may confuse the deflate stream which stores an object. In Andy's reported case a 36 byte region of the pack was overwritten, leading to what appeared to be a valid deflate stream that was trying to produce a result larger than our allocated output buffer could accept. Z_BUF_ERROR is returned from inflate() if either the input buffer needs more input bytes, or the output buffer has run out of space. Previously we only considered the former case, as it meant we needed to move the stream's input buffer to the next window in the pack. We now abort the loop if inflate() returns Z_BUF_ERROR without consuming the entire input buffer it was given, or has filled the entire output buffer but has not yet returned Z_STREAM_END. Either state is a clear indicator that this loop is not working as expected, and should not continue. This problem cannot occur with loose objects as we open the entire loose object as a single buffer and treat Z_BUF_ERROR as an error. Reported-by: Andy Isaacson <adi@hexapodia.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14change throughput display units with fast linksLibravatar Nicolas Pitre1-1/+7
Switch to MiB/s when the connection is fast enough (i.e. on a LAN). Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14clone: Supply the right commit hash to post-checkout when -b is usedLibravatar Björn Steinbrink2-1/+3
When we use -b <branch>, we may checkout something else than what the remote's HEAD references, but we still used remote_head to supply the new ref value to the post-checkout hook, which is wrong. So instead of using remote_head to find the value to be passed to the post-checkout hook, we have to use our_head_points_at, which is always correctly setup, even if -b is not used. This also fixes a segfault when "clone -b <branch>" is used with a remote repo that doesn't have a valid HEAD, as in such a case remote_head is NULL, but we still tried to access it. Reported-by: Devin Cofer <ranguvar@archlinux.us> Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-13remote-curl: add missing initialization of argv0_pathLibravatar Johannes Sixt1-0/+1
All programs, in particular also the stand-alone programs (non-builtins) must call git_extract_argv0_path(argv[0]) in order to help builds that derive the installation prefix at runtime, such as the MinGW build. Without this call, the program segfaults (or raises an assertion failure). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Tested-by: Michael Wookey <michaelwookey@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-13Merge branch 'maint-1.6.4' into maintLibravatar Junio C Hamano1-1/+2
* maint-1.6.4: git-stash documentation: mention default options for 'list'
2009-10-12Documentation: describe check-ref-format --branchLibravatar Jonathan Nieder1-3/+6
Unless one already knew, it was not obvious what sort of shorthand "git check-ref-format --branch" expands. Explain it. The --branch argument is not optional. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12git-stash documentation: mention default options for 'list'Libravatar Miklos Vajna1-1/+2
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12ls-files: excludes should not impact tracked filesLibravatar Jeff King2-8/+32
In all parts of git, .gitignore and other exclude files impact only how we treat untracked files; they should have no effect on files listed in the index. This behavior was originally implemented very early on in 9ff768e, but only for --exclude-from. Later, commit 63d285c accidentally caused us to trigger the behavior for --exclude-per-directory. This patch totally ignores excludes for files found in the index. This means we are reversing the original intent of 9ff768e, while at the same time fixing the accidental behavior of 63d285c. This is a good thing, though, as the way that 9ff768e behaved does not really make sense with the way exclusions are used in modern git. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10git-add--interactive: never skip files included in indexLibravatar Pauli Virtanen2-1/+15
Make "git add -p" to not skip files that are in index even if they are excluded (by .gitignore etc.). This fixes the contradictory behavior that "git status" and "git commit -a" listed such files as modified, but "git add -p FILENAME" ignored them. Signed-off-by: Pauli Virtanen <pav@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10GIT 1.6.5Libravatar Junio C Hamano3-7/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10git-svn: hide find_parent_branch output in double quiet modeLibravatar Simon Arlott1-7/+12
Hide find_parent_branch logging when -qq is specified. This eliminates more unnecessary output when run from cron, e.g.: Found possible branch point: http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk => http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz, 1919 Found branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557 Following parent with do_switch Successfully followed parent Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Documentation: clone: clarify discussion of initial branchLibravatar Jonathan Nieder1-2/+3
When saying the initial branch is equal to the currently active remote branch, it is probably intended that the branch heads point to the same commit. Maybe it would be more useful to a new user to emphasize that the tree contents and history are the same. More important, probably, is that this new branch is set up so that "git pull" merges changes from the corresponding remote branch. The next paragraph addresses that directly. What the reader needs to know to begin with is that (1) the initial branch is your own; if you do not pull, it won't get updated, and that (2) the initial branch starts out at the same commit as the upstream. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09git-send-email.perl: fold multiple entry "Cc:" and multiple single line ↵Libravatar Joe Perches2-22/+78
"RCPT TO:"s Some MTAs reject Cc: lines longer than 78 chars. Avoid this by using the same join as "To:" ",\n\t" so each subsequent Cc entry is on a new line. RCPT TO: should have a single entry per line. see: http://www.ietf.org/rfc/rfc2821.txt Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Merge branch 'rs/maint-archive-prefix'Libravatar Junio C Hamano2-3/+16
* rs/maint-archive-prefix: Git archive and trailing "/" in prefix
2009-10-09Merge branch 'fc/mutt-alias'Libravatar Junio C Hamano1-1/+1
* fc/mutt-alias: send-email: fix mutt regex for grouped aliases
2009-10-09Merge branch 'ef/msvc-noreturn'Libravatar Junio C Hamano3-9/+11
* ef/msvc-noreturn: add NORETURN_PTR for function pointers increase portability of NORETURN declarations
2009-10-09Merge branch 'jk/reflog-date'Libravatar Junio C Hamano3-2/+7
* jk/reflog-date: improve reflog date/number heuristic
2009-10-09Merge branch 'ch/am-header'Libravatar Junio C Hamano1-1/+1
* ch/am-header: git-am: force egrep to use correct characters set git-am: fixed patch_format detection according to RFC2822
2009-10-09bash: add support for 'git replace'Libravatar Björn Gustavsson1-0/+6
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09completion: fix alias listings with newlinesLibravatar Stephen Boyd1-2/+6
Aliases with newlines have been a problem since commit 56fc25f (Bash completion support for remotes in .git/config., 2006-11-05). The chance of the problem occurring has been slim at best, until commit 518ef8f (completion: Replace config --list with --get-regexp, 2009-09-11) removed the case statement introduced by commit 56fc25f. Before removing the case statement, most aliases with newlines would work unless they were specially crafted as follows [alias] foo = "log -1 --pretty='format:%s\nalias.error=broken'" After removing the case statement, a more benign alias like [alias] whowhat = "log -1 --pretty='format:%an <%ae>\n%s'" wont-complete = ... would cause the completion to break badly. For now, revert the removal of the case statement until someone comes up with a better way to get keys from git-config. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09completion: fix completion of git <TAB><TAB>Libravatar Stephen Boyd1-1/+1
After commit 511a3fc (wrap git's main usage string., 2009-09-12), the bash completion for git commands includes COMMAND and [ARGS] when it shouldn't. Fix this by grepping more strictly for a line with git commands. It's doubtful whether git will ever have commands starting with anything besides numbers and letters so this should be fine. At least by being stricter we'll know when we break the completion earlier. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09import-tars: Add missing closing bracketLibravatar Ingmar Vanhassel1-1/+1
This fixes an obvious syntax error that snuck in commit 7e787953: syntax error at /home/ingmar/bin//git-import-tars line 143, near "/^$/ { " syntax error at /home/ingmar/bin//git-import-tars line 145, near "} else" syntax error at /home/ingmar/bin//git-import-tars line 152, near "}" Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Acked-and-Tested-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09racy-git.txt: explain nsec problem in more detailLibravatar Jonathan Nieder1-4/+6
Idealists may want USE_NSEC to be the default on Linux some day. Point to a patch to better explain the requirements on filesystem code for that to happen. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Documentation: clarify "working tree" definitionLibravatar Jonathan Nieder1-3/+3
It is not necessarily obvious to a git novice what it means for a filesystem tree to be equal to the HEAD. Spell it out. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Documentation: clarify branch creationLibravatar Jonathan Nieder1-8/+8
The documentation seems to assume that the starting point for a new branch is the tip of an existing (ordinary) branch, but that is not the most common case. More often, "git branch" is used to begin a branch from a remote-tracking branch, a tag, or an interesting commit (e.g. origin/pu^2). Clarify the language so it can apply to these cases. Thanks to Sean Estabrooks for the wording. Also add a pointer to the user's manual for the bewildered. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Documentation: branch: update --merged descriptionLibravatar Jonathan Nieder1-4/+6
Update the documentation for --merged and --no-merged to explain the meaning of the optional parameter introduced in commit 049716b (branch --merged/--no-merged: allow specifying arbitrary commit, 2008-07-08). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Documentation: clarify mergeoptions descriptionLibravatar Jonathan Nieder2-3/+3
Sounds better this way, at least to my ears. ("The syntax and supported options of git merge" is a plural noun. "the same" instead of "equal" sounds less technical and seems to convey the meaning better here.) Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>