summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* base85: Make the code more obvious instead of explaining the non-obviousAndreas Gruenbacher2010-01-091-8/+2
| | | | | | | Here is another cleanup ... Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* base85: encode_85() does not use the decode tableAndreas Gruenbacher2010-01-091-2/+0
| | | | | Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* base85 debug code: Fix length byte calculationAndreas Gruenbacher2010-01-091-1/+1
| | | | | Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* checkout -m: do not try to fall back to --merge from an unborn branchJunio C Hamano2010-01-061-2/+8
| | | | | | | If switching from an unborn branch (= empty tree) to a valid commit failed without -m, it would fail with -m option as well. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* branch: die explicitly why when calling "git branch [-a|-r] branchname".Matthieu Moy2009-12-312-15/+17
| | | | | | | The -a and -r options used to be silently ignored in such a command. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit: --cleanup is a message optionGreg Price2009-12-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | In the usage message for "git commit", the --cleanup option appeared at the end, as one of the "contents options": usage: git commit [options] [--] <filepattern>... ... Commit message options ... Commit contents options ... --allow-empty ok to record an empty change --cleanup <default> how to strip spaces and #comments from message This is confusing, in part because it makes it ambiguous whether --allow-empty, just above, refers to an empty diff or an empty message. Move --cleanup into the 'message options' group. Also add a pair of comments to prevent similar oversights in the future. Signed-off-by: Greg Price <price@ksplice.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t7102: make the test fail if one of its check failsNguyễn Thái Ngọc Duy2009-12-291-7/+7
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: git-archive: mark --format as optional in summaryWesley J. Landaker2009-08-271-1/+1
| | | | | | | | | | The --format option was made optional in 8ff21b1 (git-archive: make tar the default format, 2007-04-09), but it was not marked as optional in the summary. This trival patch just changes the summary to match the rest of the documentation. Signed-off-by: Wesley J. Landaker <wjl@icecavern.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint-1.5.6' into maint-1.6.0Junio C Hamano2009-08-272-2/+43
|\ | | | | | | | | * maint-1.5.6: revision traversal and pack: notice and die on missing commit
| * Merge branch 'maint-1.5.5' into maint-1.5.6Junio C Hamano2009-02-112-2/+43
| |\ | | | | | | | | | | | | | | | | | | | | | * maint-1.5.5: revision traversal and pack: notice and die on missing commit Conflicts: revision.c
| | * Merge branch 'maint-1.5.4' into maint-1.5.5Junio C Hamano2009-02-112-2/+43
| | |\ | | | | | | | | | | | | | | | | * maint-1.5.4: revision traversal and pack: notice and die on missing commit
| | | * revision traversal and pack: notice and die on missing commitJunio C Hamano2009-02-112-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cc0e6c5 (Handle return code of parse_commit in revision machinery, 2007-05-04) attempted to tighten error checking in the revision machinery, but it wasn't enough. When get_revision_1() was asked for the next commit to return, it tries to read and simplify the parents of the commit to be returned, but an error while doing so was silently ignored and reported as a truncated history to the caller instead. This resulted in an early end of "git log" output or a pack that lacks older commits from "git pack-objects", without any error indication in the exit status from these commands, even though the underlying parse_commit() issues an error message to the end user. Note that the codepath in add_parents_list() that paints parents of an UNINTERESTING commit UNINTERESTING silently ignores the error when parse_commit() fails; this is deliberate and in line with aeeae1b (revision traversal: allow UNINTERESTING objects to be missing, 2009-01-27). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | verify-pack -v: do not report "chain length 0"Junio C Hamano2009-08-071-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When making a histogram of delta chain length in the pack, the program collects number of objects whose delta depth exceeds the MAX_CHAIN limit in histogram[0], and showed it as the number of items that exceeds the limit correctly. HOWEVER, it also showed the same number labeled as "chain length = 0". In fact, we are not showing the number of objects whose chain length is zero, i.e. the base objects. Correct this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | t5510: harden the way verify-pack is usedJunio C Hamano2009-08-071-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test ignored the exit status from verify pack command, and also relied on not seeing any delta chain statistics. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-show-ref.txt: remove word and make consistentStephen Boyd2009-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under is better than in because of the nested nature of the .git directory. "also using" sounds a little odd, plus we say combined with later on so just use that. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-svn documentation: fix typo in 'rebase vs. pull/merge' sectionMiklos Vajna2009-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | use xstrdup, not strdup in ll-merge.cJim Meyering2009-06-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, a fluky allocation failure would cause merge configuration settings to be silently ignored. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-rerere.txt: grammatical fixups and cleanupsStephen Boyd2009-06-131-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the gc section using unresolved and resolved instead of "not recorded". Add plurals and missing articles. Make some sentences have consistent tense. Try and be more active by removing "that" and simplifying sentences. The terms "hand-resolve" and "hand resolve" were used, so just use "hand resolve" to be more consistent. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | http-push.c::remove_locks(): fix use after freeAlex Riesen2009-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed and reported by Serhat Şevki Dinçer. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | ls-tree manpage: output of ls-tree is compatible with update-indexAlex Riesen2009-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such format relationships are very useful things to remember for script writers. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | ls-tree manpage: use "unless" instead of "when ... is not"Alex Riesen2009-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Delayed negation in a statement is harder to spot and keep in mind. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | dir.c: Fix two minor grammatical errors in commentsAllan Caffee2009-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | diff -c -p: do not die on submodulesJunio C Hamano2009-04-292-12/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The combine diff logic knew only about blobs (and their checked-out form in the work tree, either regular files or symlinks), and barfed when fed submodules. This "externalizes" gitlinks in the same way as the normal patch generation codepath does (i.e. "Subproject commit Xxx\n") to fix the issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | grep: fix segfault when "git grep '('" is givenLinus Torvalds2009-04-272-2/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Documentation: fix a grammatical error in api-builtin.txtAllan Caffee2009-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | builtin-merge: fix a typo in an error messageAllan Caffee2009-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Acked-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | test-genrandom: Add newline to usage stringStephen Boyd2009-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A minor fix to place the terminal input on a new line if test-genrandom is run with no arguments. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | doc/git-daemon: add missing arguments to optionsMarkus Heidelberg2009-04-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix some spellings and typos. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | init: Do not segfault on big GIT_TEMPLATE_DIR environment variableFrank Lichtenheld2009-04-182-1/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix buffer overflow in config parserThomas Jarosch2009-04-172-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When interpreting a config value, the config parser reads in 1+ space character(s) and puts -one- space character in the buffer as soon as the first non-space character is encountered (if not inside quotes). Unfortunately the buffer size check lacks the extra space character which gets inserted at the next non-space character, resulting in a crash with a specially crafted config entry. The unit test now uses Java to compile a platform independent .NET framework to output the test string in C# :o) Read: Thanks to Johannes Sixt for the correct printf call which replaces the perl invocation. Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | State the effect of filter-branch on graft explicitlyDaniel Cheng (aka SDiZ)2009-04-121-0/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | process_{tree,blob}: Remove useless xstrdup callsLinus Torvalds2009-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 8 Apr 2009, Björn Steinbrink wrote: > > The name of the processed object was duplicated for passing it to > add_object(), but that already calls path_name, which allocates a new > string anyway. So the memory allocated by the xstrdup calls just went > nowhere, leaking memory. Ack, ack. There's another easy 5% or so for the built-in object walker: once we've created the hash from the name, the name isn't interesting any more, and so something trivial like this can help a bit. Does it matter? Probably not on its own. But a few more memory saving tricks and it might all make a difference. Linus Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | process_{tree,blob}: Remove useless xstrdup callsBjörn Steinbrink2009-04-082-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the processed object was duplicated for passing it to add_object(), but that already calls path_name, which allocates a new string anyway. So the memory allocated by the xstrdup calls just went nowhere, leaking memory. This reduces the RSS usage for a "rev-list --all --objects" by about 10% on the gentoo repo (fully packed) as well as linux-2.6.git: gentoo: | old | new ----------------|------------------------------- RSS | 1537284 | 1388408 VSZ | 1816852 | 1667952 time elapsed | 1:49.62 | 1:48.99 min. page faults| 417178 | 379919 linux-2.6.git: | old | new ----------------|------------------------------- RSS | 324452 | 292996 VSZ | 491792 | 460376 time elapsed | 0:14.53 | 0:14.28 min. page faults| 89360 | 81613 Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Documentation: clarify .gitattributes searchJason Merrill2009-04-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the term "toplevel of the work tree" in gitattributes.txt and gitignore.txt to define the limits of the search for those files. Signed-off-by: Jason Merrill <jason@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy2009-04-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the sentence "Defaults to HEAD." can be mis-read to mean that "git checkout -- hello.c" checks-out from HEAD. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-checkout.txt: fix incorrect statement about HEAD and indexMatthieu Moy2009-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command "git checkout" checks out from the index by default, not HEAD (the introducing comment were correct, but the detailled explanation added below were not). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | commit: abort commit if interactive add failedJeff King2009-04-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we ignored the result of calling add_interactive, which meant that if an error occurred we simply committed whatever happened to be in the index. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-repack: use non-dashed update-server-infoDan McGee2009-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Documentation: Remove an odd "instead"Holger Weiß2009-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix bash completion in path with spacesDaniel Cheng (aka SDiZ)2009-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com> Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | bash completion: only show 'log --merge' if mergingThomas Rast2009-03-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gitk completion only shows --merge if MERGE_HEAD is present. Do it the same way for git-log completion. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-tag(1): add hint about commit messagesNico -telmich- Schottelius2009-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a tag is not annotated, git tag displays the commit message instead. Add this hint to the manpage to unhide this secret. Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Documentation: update graph api example.Allan Caffee2009-03-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of commit 03300c0 the graph API uses '*' for all nodes including merges. This updates the example in the documentation to match. Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | import-zips: fix thinkoJohannes Schindelin2009-03-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Embarrassingly, the common prefix calculation did not work properly, due to a mistake in the assignment: instead of assigning the dirname of the current file name, the dirname of the current common prefix needs to be assigned to common prefix, when the current prefix does not match the current file name. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | close_sha1_file(): make it easier to diagnose errorsLinus Torvalds2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug report with "unable to write sha1 file" made us realize that we do not have enough information to guess why close() is failing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | avoid possible overflow in delta size filtering computationNicolas Pitre2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a 32-bit system, the maximum possible size for an object is less than 4GB, while 64-bit systems may cope with larger objects. Due to this limitation, variables holding object sizes are using an unsigned long type (32 bits on 32-bit systems, or 64 bits on 64-bit systems). When large objects are encountered, and/or people play with large delta depth values, it is possible for the maximum allowed delta size computation to overflow, especially on a 32-bit system. When this occurs, surviving result bits may represent a value much smaller than what it is supposed to be, or even zero. This prevents some objects from being deltified although they do get deltified when a smaller depth limit is used. Fix this by always performing a 64-bit multiplication. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | everyday: use the dashless form of git-initDavid Aguilar2009-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'Everyday GIT' guide was using the old dashed form of git-init. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0Junio C Hamano2009-03-1222-10/+229
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ks/maint-1.6.0-mailinfo-folded: mailinfo: tests for RFC2047 examples mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)' mailinfo: 'From:' header should be unfold as well mailinfo: correctly handle multiline 'Subject:' header
| * | | | mailinfo: tests for RFC2047 examplesKirill Smelkov2009-01-2814-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also as suggested by Junio, in order to try to catch other MIME problems, test cases from the "8. Examples" section of RFC2047 are added to t5100 testsuite as well. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
| * | | | mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'Kirill Smelkov2009-01-285-1/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>