aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* git-svn: detect and fail gracefully when dcommitting to a voidMatthieu Moy2008-04-29
| | | | | | | | | | | | | | | | | | | | | | The command git svn clone (URL of an empty SVN repo here) works, creates an empty git repository. I can perform the initial commit there, but then, "git svn dcommit" says : Use of uninitialized value in concatenation (.) or string at .../git-svn line 414. Committing to ... Unable to determine upstream SVN information from HEAD history I guess a correct management of the initial commit in git-svn would be hard to implement, but at least, the error message can be improved. First step is something like the patch below, and better would be for "git svn clone" to warn that it won't be able to do much with the cloned repo. Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* make git-status use a pagerBart Trojanowski2008-04-29
| | | | | | | | make git status act similar to git log and git diff by presenting long output in a pager. Signed-off-by: Bart Trojanowski <bart@jukie.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2008-04-29
|\ | | | | | | | | | | | | | | | | * maint: cvsimport: always pass user data to "system" as a list fix reflog approxidate parsing bug Fix use after free() in builtin-fetch fetch-pack: do not stop traversing an already parsed commit Use "=" instead of "==" in condition as it is more portable
| * Merge branch 'maint-1.5.4' into maintJunio C Hamano2008-04-29
| |\ | | | | | | | | | | | | | | | * maint-1.5.4: cvsimport: always pass user data to "system" as a list fix reflog approxidate parsing bug
| | * cvsimport: always pass user data to "system" as a listJeff King2008-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids invoking the shell. Not only is it faster, but it prevents the possibility of interpreting our arguments in the shell. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * fix reflog approxidate parsing bugJeff King2008-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In get_sha1_basic, we parse a string like HEAD@{10 seconds ago}:path/to/file into its constituent ref, reflog date, and path components. We never actually munge the string itself, but instead keep offsets into the string with their associated lengths. When we call approxidate on the contents inside braces, however, we pass just a string without a length. This means that approxidate could sometimes look past the closing brace and (erroneously) interpret the rest of the string as part of the date. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Fix use after free() in builtin-fetchAlex Riesen2008-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Dave Jones: Since master.kernel.org updated to latest, I noticed that I could crash git-fetch by doing this.. export KERNEL=/pub/scm/linux/kernel/git/ git fetch $KERNEL/torvalds/linux-2.6 master:linus (gdb) bt 0 0x000000349fd6d44b in free () from /lib64/libc.so.6 1 0x000000000048f4eb in transport_unlock_pack (transport=0x7ce530) at transport.c:811 2 0x000000349fd31b25 in exit () from /lib64/libc.so.6 3 0x00000000004043d8 in handle_internal_command (argc=3, argv=0x7fffea4449f0) at git.c:379 4 0x0000000000404547 in main (argc=3, argv=0x7fffea4449f0) at git.c:443 5 0x000000349fd1c784 in __libc_start_main () from /lib64/libc.so.6 6 0x0000000000403ef9 in ?? () 7 0x00007fffea4449d8 in ?? () 8 0x0000000000000000 in ?? () I then remembered, my .bashrc has this.. export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) which is handy for showing up such bugs. More info on this glibc feature is at http://udrepper.livejournal.com/11429.html Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | fetch-pack: do not stop traversing an already parsed commitLinus Torvalds2008-04-28
| | | | | | | | | | | | | | | | | | | | | | | | f3ec549 (fetch-pack: check parse_commit/object results, 2008-03-03) broke common ancestor computation by stopping traversal when it sees an already parsed commit. This should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Use "=" instead of "==" in condition as it is more portableAlex Riesen2008-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | At least the dash from Ubuntu's /bin/sh says: test: 233: ==: unexpected operator Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Die for an early EOF in a file reading loopHeikki Orsila2008-04-27
| | | | | | | | | | | | | | | | | | | | | | | | The resulting data is zero terminated after the read loop, but the subsequent loop that scans for '\n' will overrun the buffer. Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Document functions xmemdupz(), xread() and xwrite()Heikki Orsila2008-04-27
| | | | | | | | | | | | | | | Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2008-04-27
|\ \ \ | |/ / | | | | | | | | | | | | * maint: clone: detect and fail on excess parameters Remove 'header' from --signoff option description
| * | clone: detect and fail on excess parametersJunio C Hamano2008-04-27
| | | | | | | | | | | | | | | | | | | | | "git clone [options] $src $dst excess-garbage" simply ignored excess-garbage without giving any diagnostic message. Fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'maint-1.5.4' into maintJunio C Hamano2008-04-27
| |\ \ | | |/ | | | | | | | | | * maint-1.5.4: Remove 'header' from --signoff option description
| | * Remove 'header' from --signoff option descriptionDan McGee2008-04-27
| | | | | | | | | | | | | | | Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | bash: Add completion for gitk --mergeRichard Quirk2008-04-27
| | | | | | | | | | | | | | | | | | | | | | | | Option is only completed when .git/MERGE_HEAD is present. Signed-off-by: Richard Quirk <richard.quirk@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | rev-parse: fix --verify to error out when passed junk after a good revChristian Couder2008-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch something like: $ git rev-parse --verify <good-rev> <junk> worked whatever junk was as long as <good-rev> could be parsed correctly. This patch makes "git rev-parse --verify" error out when passed any junk after a good rev. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git checkout: add -t alias for --trackMiklos Vajna2008-04-27
| | | | | | | | | | | | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | rev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"Christian Couder2008-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently "git rev-parse --verify <something>" is often used with its error output redirected to /dev/null. This patch makes it easier to do that. The -q|--quiet option is designed to work the same way as it does for "git symbolic-ref". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'ho/shared'Junio C Hamano2008-04-25
|\ \ \ | | | | | | | | | | | | | | | | * ho/shared: Make core.sharedRepository more generic
| * | | Make core.sharedRepository more genericHeikki Orsila2008-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git init --shared=0xxx, where '0xxx' is an octal number, will create a repository with file modes set to '0xxx'. Users with a safe umask value (0077) can use this option to force file modes. For example, '0640' is a group-readable but not group-writable regardless of user's umask value. Values compatible with old Git versions are written as they were before, for compatibility reasons. That is, "1" for "group" and "2" for "everybody". "git config core.sharedRepository 0xxx" is also handled. Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2008-04-24
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: remote: create fetch config lines with '+' push: allow unqualified dest refspecs to DWIM doc/git-gc: add a note about what is collected t5516: remove ambiguity test (1) Linked glossary from cvs-migration page write-tree: properly detect failure to write tree objects
| * | | remote: create fetch config lines with '+'Jeff King2008-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since git-remote always uses remote tracking branches, it should be safe to always force updates of those branches. I.e., we should generate fetch = +refs/heads/*:refs/remotes/$remote/* instead of fetch = refs/heads/*:refs/remotes/$remote/* This was the behavior of the perl version, which seems to have been lost in the C rewrite. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | push: allow unqualified dest refspecs to DWIMJeff King2008-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a push like: git push remote src:dst would go through the following steps: 1. check for an unambiguous 'dst' on the remote; if it exists, then push to that ref 2. otherwise, check if 'dst' begins with 'refs/'; if it does, create a new ref 3. otherwise, complain because we don't know where in the refs hierarchy to put 'dst' However, in some cases, we can guess about the ref type of 'dst' based on the ref type of 'src'. Specifically, before complaining we now check: 2.5. if 'src' resolves to a ref starting with refs/heads or refs/tags, then prepend that to 'dst' So now this creates a new branch on the remote, whereas it previously failed with an error message: git push master:newbranch Note that, by design, we limit this DWIM behavior only to source refs which resolve exactly (including symrefs which resolve to existing refs). We still complain on a partial destination refspec if the source is a raw sha1, or a ref expression such as 'master~10'. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'maint-1.5.4' into maintJunio C Hamano2008-04-24
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | * maint-1.5.4: t5516: remove ambiguity test (1) Linked glossary from cvs-migration page write-tree: properly detect failure to write tree objects
| | * | t5516: remove ambiguity test (1)Jeff King2008-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test tried to push into a remote with ambiguous refs in remotes/$x/master and remotes/$y/master. However, the remote never actually tells us about the refs/remotes hierarchy, so we don't even see this ambiguity. The test happened to pass because we were simply looking for failure, and the test fails for another reason: the dst refspec does not exist and does not begin with refs/, making it invalid. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | Linked glossary from cvs-migration pageMatt Graham2008-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coming from CVS, I found the git glossary vital to learning git and learning how terms in git correlate to the cvs terminology with which I am familiar. This patch links the glossary from the cvs-migration page so cvs users will be able to fine the glossary as soon as they start looking at git documents. Signed-off-by: Matt Graham <mdg149@gmail.com> Acked-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | write-tree: properly detect failure to write tree objectsJunio C Hamano2008-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tomasz Fortuna reported that "git commit" does not error out properly when it cannot write tree objects out. "git write-tree" shares the same issue, as the failure to notice the error is deep in the logic to write tree objects out recursively. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | doc/git-gc: add a note about what is collectedJeff King2008-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to be a FAQ that people try running git-gc, and then get puzzled about why the size of their .git directory didn't change. This note mentions the reasons why things might unexpectedly get kept. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2008-04-23
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Amend git-push refspec documentation git-gc --prune is deprecated svn-git: Use binmode for reading/writing binary rev maps diff options documentation: refer to --diff-filter in --name-status Don't force imap.host to be set when imap.tunnel is set git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc git-svn bug with blank commits and author file archive.c: format_subst - fixed bogus argument to memchr copy.c: copy_fd - correctly report write errors gitattributes: Fix subdirectory attributes specified from root directory
| * | | Merge branch 'maint-1.5.4' into maintJunio C Hamano2008-04-22
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.5.4: svn-git: Use binmode for reading/writing binary rev maps diff options documentation: refer to --diff-filter in --name-status git-svn bug with blank commits and author file archive.c: format_subst - fixed bogus argument to memchr copy.c: copy_fd - correctly report write errors gitattributes: Fix subdirectory attributes specified from root directory
| | * | svn-git: Use binmode for reading/writing binary rev mapsMichael Weber2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, there is a possible interaction with UTF-8 locales in combination with PERL_UNICODE, resulting in "inconsistent size: 40" or "read:"-type errors. See also: perldoc -f binmode <http://perldoc.perl.org/perl581delta.html#UTF-8-no-longer-default-under-UTF-8-locales> Signed-off-by: Michael Weber <michaelw@foldr.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | diff options documentation: refer to --diff-filter in --name-statusMiklos Vajna2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git diff --name-status outputs letters, but the meaning of those letters is documented elsewhere. Add a note to make the manpage more intuitive. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | git-svn bug with blank commits and author fileThomas Guyot-Sionnest2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to import from svn using an author file, git-svn bails out if it encounters a blank author. The attached patch changes this behavior and allow using the author file with blanks authors. I came across this bug while importing from a cvs2svn repo where the initial revision (1) has a blank author. This doesn't break the behavior of bailing out when an unknown author is encountered. Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | archive.c: format_subst - fixed bogus argument to memchrAriel Badichi2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also removed a superfluous test. Signed-off-by: Ariel Badichi <abadichi@bezeqint.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | copy.c: copy_fd - correctly report write errorsAriel Badichi2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the errno could have been lost due to an intervening close() call. This patch also contains minor cosmetic changes. Signed-off-by: Ariel Badichi <abadichi@bezeqint.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | gitattributes: Fix subdirectory attributes specified from root directoryMatthew Ogilvie2008-04-22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Amend git-push refspec documentationSam Vilain2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These paragraphs are a little confusing. Also, make it clearer when you have to specify the full name for <dst> Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | git-gc --prune is deprecatedDmitry Potapov2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 25ee9731c137d0a24b0f4879eb0b0cce9b77d5b0 made the '--prune' option deprecated and removed its description from the git-gc man page. This patch removes all references to this option from the rest of the Git documentation. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Don't force imap.host to be set when imap.tunnel is setJeff King2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for git-imap-send suggests a tunnel setting such as Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null" which works wonderfully and doesn't require a username, password or port setting. However, git-imap-send currently requires that the imap.host variable be set in the config even when it was unused. This patch changes imap-send to only require that the imap.host setting is set if imap.tunnel is not set. Otherwise, server.host is set to "tunnel" for reporting purposes. Acked-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | git-clone.txt: Adjust note to --shared for new pruning behavior of git-gcBrandon Casey2008-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since git-gc now always calls prune, even with --auto, unreferenced objects may be removed by more operations than just git-gc. This is important for clones created using --shared or --reference. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2008-04-22
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: post-receive-email: fix accidental removal of a trailing space in signature line Escape project names before creating pathinfo URLs Escape project name in regexp bash: Add completion for git diff --base --ours --theirs diff-options.txt: document the new "--dirstat" option
| * | | post-receive-email: fix accidental removal of a trailing space in signature lineAndy Parkins2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | post-receive-email adds a signature to the end of emails in generate_email_footer(). The signature was separated from the main email body using the standard string "-- ". (see RFC 3676) a6080a0 (War on whitespace, 2007-06-07) removed the trailing whitespace from "-- ", leaving it as "--", which is not a correct signature separator. This patch restores the missing space, but does it in a way that will not set off the trailing whitespace alarms. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Escape project names before creating pathinfo URLsmartin f. krafft2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a project name contains special URL characters like +, gitweb's links break in subtle ways. The solution is to pass the project name through esc_url() and using the return value. Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Escape project name in regexpmartin f. krafft2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The project name, when used in a regular expression, needs to be quoted properly, so that stuff like '++' in the project name does not cause Perl to barf. Related info: http://bugs.debian.org/476076 This is a bug in Perl's CGI.pm, but fixing that exposed a similar bug in gitweb.perl Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | bash: Add completion for git diff --base --ours --theirsTeemu Likonen2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | diff-options.txt: document the new "--dirstat" optionGerrit Pape2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the documentation for the new option added by 7df7c01 (Add "--dirstat" for some directory statistics, 2008-02-12). Noticed by Clint Adams, reported through http://bugs.debian.org/476437 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | completion: remove use of dashed git commandsDan McGee2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dan McGee <dpmcgee@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | completion: allow 'git remote' subcommand completionDan McGee2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After typing 'git remote ', the subcommand options were not shown. Fix it by adding the missing __gitcomp call. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Spelling fixes in the gitweb documentationRafael Garcia-Suarez2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly spelling and grammar nits. Signed-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>