summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* archive: don't let remote clients get unreachable commitsjk/maint-1.6.2-upload-archiveJeff King2011-11-215-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually git is careful not to allow clients to fetch arbitrary objects from the database; for example, objects received via upload-pack must be reachable from a ref. Upload-archive breaks this by feeding the client's tree-ish directly to get_sha1, which will accept arbitrary hex sha1s, reflogs, etc. This is not a problem if all of your objects are publicly reachable anyway (or at least public to anybody who can run upload-archive). Or if you are making the repo available by dumb protocols like http or rsync (in which case the client can read your whole object db directly). But for sites which allow access only through smart protocols, clients may be able to fetch trees from commits that exist in the server's object database but are not referenced (e.g., because history was rewound). This patch tightens upload-archive's lookup to use dwim_ref rather than get_sha1. This means a remote client can only fetch the tip of a named ref, not an arbitrary sha1 or reflog entry. This also restricts some legitimate requests, too: 1. Reachable non-tip commits, like: git archive --remote=$url v1.0~5 2. Sub-trees of reachable commits, like: git archive --remote=$url v1.7.7:Documentation Local requests continue to use get_sha1, and are not restricted at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2010-01-108-43/+47
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.6.1: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname". textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: diff.c
| * Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2010-01-104-28/+28
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.6.0: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname".
| | * 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>
| * | textconv: stop leaking file descriptorsJeff King2009-12-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | We read the output from textconv helpers over a pipe, but we never actually closed our end of the pipe after using it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-12-292-9/+11
| |\ \ | | |/ | | | | | | | | | | | | * maint-1.6.0: commit: --cleanup is a message option t7102: make the test fail if one of its check fails
| | * 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>
| * | git count-objects: handle packs bigger than 4GAndreas Schwab2009-12-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Use off_t to count sizes of packs and objects to avoid overflow after 4Gb. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-clone: add missing comma in --reference documentationMiklos Vajna2009-09-031-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | clone: disconnect transport after fetchingJeff King2009-09-022-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code just leaves the transport in whatever state it was in after performing the fetch. For a non-empty clone over the git protocol, the transport code already disconnects at the end of the fetch. But for an empty clone, we leave the connection hanging, and eventually close the socket when clone exits. This causes the remote upload-pack to complain "the remote end hung up unexpectedly". While this message is harmless to the clone itself, it is unnecessarily scary for a user to see and may pollute git-daemon logs. This patch just explicitly calls disconnect after we are done with the remote end, which sends a flush packet to upload-pack and cleanly disconnects, avoiding the error message. Other transports are unaffected or slightly improved: - for a non-empty repo over the git protocol, the second disconnect is a no-op (since we are no longer connected) - for "walker" transports (like HTTP or FTP), we actually free some used memory (which previously just sat until the clone process exits) - for "rsync", disconnect is always a no-op anyway Signed-off-by: Jeff King <peff@peff.net> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Fix overridable written with an extra 'e'Nanako Shiraishi2009-08-272-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-08-271-1/+1
|\ \ \ | |/ / | | | | | | | | | * maint-1.6.1: Documentation: git-archive: mark --format as optional in summary
| * | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-08-271-1/+1
| |\ \ | | |/ | | | | | | | | | * maint-1.6.0: Documentation: git-archive: mark --format as optional in summary
| | * 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
* | | | Round-down years in "years+months" relative date viewDavid Reiss2009-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a commit from 1 year and 7 months ago would display as "2 years, 7 months ago". Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-08-072-11/+27
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * maint-1.6.1: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
| * | | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-08-072-11/+27
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | * maint-1.6.0: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
| | * | 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>
* | | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-06-203-7/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | * maint-1.6.1: git-show-ref.txt: remove word and make consistent git-svn documentation: fix typo in 'rebase vs. pull/merge' section use xstrdup, not strdup in ll-merge.c
| * | | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-06-203-7/+7
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | * maint-1.6.0: git-show-ref.txt: remove word and make consistent git-svn documentation: fix typo in 'rebase vs. pull/merge' section use xstrdup, not strdup in ll-merge.c
| | * | 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>
* | | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-06-131-33/+32
|\ \ \ \ | |/ / / | | | | | | | | | | | | * maint-1.6.1: git-rerere.txt: grammatical fixups and cleanups
| * | | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-06-132-34/+34
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | * maint-1.6.0: git-rerere.txt: grammatical fixups and cleanups http-push.c::remove_locks(): fix use after free
| | * | 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>
* | | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-05-241-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * maint-1.6.1: http-push.c::remove_locks(): fix use after free
| * \ \ \ Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-05-241-1/+2
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | * maint-1.6.0: http-push.c::remove_locks(): fix use after free
| | * | 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>
* | | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-05-131-1/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * maint-1.6.1: ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
| * | | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-05-131-1/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | * maint-1.6.0: ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
| | * | 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>
* | | | Merge branch 'jc/maint-read-tree-multi' into maint-1.6.2Junio C Hamano2009-05-122-8/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jc/maint-read-tree-multi: Revert "checkout branch: prime cache-tree fully"
| * | | | Revert "checkout branch: prime cache-tree fully"Junio C Hamano2009-05-122-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic in 83ae209 (checkout branch: prime cache-tree fully, 2009-04-20) is bogus; checkout can switch branches with a dirty index and in such a case the tree won't match HEAD. Add t2014-switch to catch this breakage. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano2009-05-080-0/+0
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | * maint-1.6.1:
| * | | | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-05-081-2/+2
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | * maint-1.6.0: dir.c: Fix two minor grammatical errors in comments
* | | | | Merge branch 'rj/maint-1.6.0-svn-parse-fix' into maintJunio C Hamano2009-05-051-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * rj/maint-1.6.0-svn-parse-fix: git-svn: fix a sloppy Getopt::Long usage
| * | | | | git-svn: fix a sloppy Getopt::Long usageRobin H. Johnson2009-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Getopt-Long v2.38 is much stricter about sloppy getopt usage. The trailing pipe causes git-svn testcases to fail for all of the --stdin argument calls. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'maint-1.6.0' into maintJunio C Hamano2009-05-051-2/+2
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | * maint-1.6.0: dir.c: Fix two minor grammatical errors in comments
| * | | | | 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>
* | | | | improve error message in config.cAlex Riesen2009-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show errno if opening a lockfile fails. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4018-diff-funcname: add cpp xfuncname pattern to syntax testBrandon Casey2009-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>