summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-01-10base85: Make the code more obvious instead of explaining the non-obviousAndreas Gruenbacher
Here is another cleanup ... Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10base85: encode_85() does not use the decode tableAndreas Gruenbacher
Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10base85 debug code: Fix length byte calculationAndreas Gruenbacher
Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-07checkout -m: do not try to fall back to --merge from an unborn branchJunio C Hamano
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>
2009-12-31branch: die explicitly why when calling "git branch [-a|-r] branchname".Matthieu Moy
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>
2009-12-30commit: --cleanup is a message optionGreg Price
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>
2009-12-30t7102: make the test fail if one of its check failsNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28Documentation: git-archive: mark --format as optional in summaryWesley J. Landaker
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>
2009-08-28Merge branch 'maint-1.5.6' into maint-1.6.0Junio C Hamano
* maint-1.5.6: revision traversal and pack: notice and die on missing commit
2009-08-08verify-pack -v: do not report "chain length 0"Junio C Hamano
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>
2009-08-08t5510: harden the way verify-pack is usedJunio C Hamano
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>
2009-06-21git-show-ref.txt: remove word and make consistentStephen Boyd
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>
2009-06-21git-svn documentation: fix typo in 'rebase vs. pull/merge' sectionMiklos Vajna
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-14use xstrdup, not strdup in ll-merge.cJim Meyering
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>
2009-06-13git-rerere.txt: grammatical fixups and cleanupsStephen Boyd
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>
2009-05-24http-push.c::remove_locks(): fix use after freeAlex Riesen
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>
2009-05-10ls-tree manpage: output of ls-tree is compatible with update-indexAlex Riesen
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>
2009-05-10ls-tree manpage: use "unless" instead of "when ... is not"Alex Riesen
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>
2009-05-06dir.c: Fix two minor grammatical errors in commentsAllan Caffee
Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-29diff -c -p: do not die on submodulesJunio C Hamano
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>
2009-04-28grep: fix segfault when "git grep '('" is givenLinus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27Documentation: fix a grammatical error in api-builtin.txtAllan Caffee
Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27builtin-merge: fix a typo in an error messageAllan Caffee
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>
2009-04-23test-genrandom: Add newline to usage stringStephen Boyd
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>
2009-04-18doc/git-daemon: add missing arguments to optionsMarkus Heidelberg
Also fix some spellings and typos. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18init: Do not segfault on big GIT_TEMPLATE_DIR environment variableFrank Lichtenheld
Signed-off-by: Frank Lichtenheld <flichtenheld@astaro.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-18Fix buffer overflow in config parserThomas Jarosch
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>
2009-04-12State the effect of filter-branch on graft explicitlyDaniel Cheng (aka SDiZ)
Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-12process_{tree,blob}: Remove useless xstrdup callsLinus Torvalds
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>
2009-04-09process_{tree,blob}: Remove useless xstrdup callsBjörn Steinbrink
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>
2009-04-08Documentation: clarify .gitattributes searchJason Merrill
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>
2009-04-08git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy
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>
2009-04-08git-checkout.txt: fix incorrect statement about HEAD and indexMatthieu Moy
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>
2009-04-05commit: abort commit if interactive add failedJeff King
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>
2009-04-05git-repack: use non-dashed update-server-infoDan McGee
Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01Documentation: Remove an odd "instead"Holger Weiß
Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30Fix bash completion in path with spacesDaniel Cheng (aka SDiZ)
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>
2009-03-30bash completion: only show 'log --merge' if mergingThomas Rast
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>
2009-03-30git-tag(1): add hint about commit messagesNico -telmich- Schottelius
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>
2009-03-30Documentation: update graph api example.Allan Caffee
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>
2009-03-30import-zips: fix thinkoJohannes Schindelin
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>
2009-03-24close_sha1_file(): make it easier to diagnose errorsLinus Torvalds
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>
2009-03-24avoid possible overflow in delta size filtering computationNicolas Pitre
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>
2009-03-22everyday: use the dashless form of git-initDavid Aguilar
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>
2009-03-13Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0Junio C Hamano
* 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
2009-03-13Merge branch 'cc/maint-1.6.0-bisect-fix' into maint-1.6.0Junio C Hamano
* cc/maint-1.6.0-bisect-fix: bisect: fix another instance of eval'ed string bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped
2009-03-13Merge branch 'fg/maint-1.6.0-exclude-bq' into maint-1.6.0Junio C Hamano
* fg/maint-1.6.0-exclude-bq: Support "\" in non-wildcard exclusion entries
2009-03-13Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into maint-1.6.0Junio C Hamano
* jc/maint-1.6.0-split-diff-metainfo: diff.c: output correct index lines for a split diff
2009-02-28added missing backtick in git-apply.txtDanijel Tasov
Signed-off-by: Danijel Tasov <dt@korn.shell.la> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-27bisect: fix another instance of eval'ed stringChristian Couder
When there is nothing to be skipped, the output from rev-list --bisect-vars was eval'ed without first being strung together with &&; this is probably not a problem as it is much less likely to be a bad input than the list handcrafted by the filter_skip function, but it still is a good discipline. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>