summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-27Move initialization of Git::SVN variables into Git::SVN.Libravatar Michael G. Schwern3-7/+9
Also it can compile on its own now, yay! Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract Git::SVN from git-svn into its own .pm file.Libravatar Michael G. Schwern3-2319/+2321
Except for adding the 1; at the end, this is a straight copy & paste. Tests still pass, but its doubtful Git::SVN will compile on its own without git-svn being loaded. Next commit will fix that. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Prepare Git::SVN for extraction into its own file.Libravatar Michael G. Schwern1-4/+18
This means it should be able to load without git-svn being loaded. * Load Git.pm on its own and all the needed command functions. * It needs to grab at a git-svn lexical $_prefix representing the --prefix option. Provide opt_prefix() for that. This is a refactoring artifact. The prefix should really be passed into Git::SVN->new. * Unqualify unnecessarily fully qualified globals like $Git::SVN::default_repo_id. * Lexically isolate the class just to make sure nothing is leaking out. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract some utilities from git-svn to allow extracting Git::SVN.Libravatar Michael G. Schwern6-15/+132
Put them in a new module called Git::SVN::Utils. Yeah, not terribly original and it will be a dumping ground. But its better than having them in the main git-svn program. At least they can be documented and tested. * fatal() is used by many classes. * Change the $can_compress lexical into a function. This should be enough to extract Git::SVN. Signed-off-by: Michael G. Schwern <schwern@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27perl: detect new files in MakeMaker buildsLibravatar Junio C Hamano3-0/+11
While Makefile.PL now finds .pm files on its own, it does not detect new files after it generates perl/perl.mak. [ew: commit message, minor tweaks] ref: http://mid.gmane.org/7vlii51xz4.fsf@alter.siamese.dyndns.org Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27The Makefile.PL will now find .pm files itself.Libravatar Michael G. Schwern1-13/+16
It is no longer necessary to manually add new .pm files to the Makefile.PL. This makes it easier to add modules. It is still necessary to add them to the Makefile, but that extra work should be removed at a future date. Signed-off-by: Michael G Schwern <schwern@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Don't lose Error.pm if $@ gets clobbered.Libravatar Michael G. Schwern1-2/+1
In older Perls, sometimes $@ can become unset between the eval and checking $@. Its safer to check the eval directly. Signed-off-by: Michael G Schwern <schwern@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Quiet warning if Makefile.PL is run with -w and no --localedirLibravatar Michael G. Schwern1-1/+2
Usually it isn't, but its nice if it can be run with warnings on. Signed-off-by: Michael G Schwern <schwern@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-25Merge branch 'jc/test-lib-source-build-options-early'Libravatar Junio C Hamano1-23/+22
Reorders t/test-lib.sh so that we dot-source GIT-BUILD-OPTIONS that records the shell and Perl the user told us to use with Git a lot early, so that test-lib.sh script itself can use "$PERL_PATH" in one of its early operations. * jc/test-lib-source-build-options-early: test-lib: reorder and include GIT-BUILD-OPTIONS a lot earlier
2012-07-25Merge branch 'mm/config-xdg'Libravatar Junio C Hamano4-6/+48
Finishing touches to the XDG support (new feature for 1.7.12) and tests. * mm/config-xdg: t1306: check that XDG_CONFIG_HOME works ignore: make sure we have an xdg path before using it attr: make sure we have an xdg path before using it test-lib.sh: unset XDG_CONFIG_HOME
2012-07-25Merge branch 'cw/rebase-i-root'Libravatar Junio C Hamano2-12/+21
Finishing touches to the "rebase -i --root" (new feature for 1.7.12). * cw/rebase-i-root: rebase -i: handle fixup of root commit correctly
2012-07-25Merge branch 'mh/maint-revisions-doc'Libravatar Junio C Hamano1-6/+37
* mh/maint-revisions-doc: Enumerate revision range specifiers in the documentation Make <refname> documentation more consistent.
2012-07-24Enumerate revision range specifiers in the documentationLibravatar Junio C Hamano1-0/+31
It was a bit hard to learn how <rev>^@, <rev>^! and various other forms of range specifiers are used, because they were discussed mostly in the prose part of the documentation, unlike various forms of extended SHA-1 expressions that are listed in an enumerated list. Also add a few more examples showing use of <rev>, <rev>..<rev> and <rev>^! forms, stolen from a patch by Max Horn. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24Update draft release notes to 1.7.12Libravatar Junio C Hamano1-2/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24Merge branch 'jc/mergetool-tool-help'Libravatar Junio C Hamano3-5/+49
"git mergetool" did not support --tool-help option to give the list of supported backends, like "git difftool" does. * jc/mergetool-tool-help: mergetool: support --tool-help option like difftool does
2012-07-24Merge branch 'jk/maint-commit-document-editmsg'Libravatar Junio C Hamano1-0/+9
Document $GIT_DIR/COMMIT_EDITMSG file. * jk/maint-commit-document-editmsg: commit: document the temporary commit message file
2012-07-24Merge branch 'jk/maint-commit-check-committer-early'Libravatar Junio C Hamano1-1/+1
"git commit --amend" let the user edit the log message and then died when the human-readable committer name was given insufficiently by getpwent(3). * jk/maint-commit-check-committer-early: commit: check committer identity more strictly
2012-07-24Merge branch 'jk/maint-advise-vaddf'Libravatar Junio C Hamano1-1/+1
The advise() function did not use varargs correctly to format its message. * jk/maint-advise-vaddf: advice: pass varargs to strbuf_vaddf, not strbuf_addf
2012-07-24t/lib-httpd: handle running under --valgrindLibravatar Jeff King2-1/+8
Running the http tests with valgrind does not work for two reasons: 1. Apache complains about following the symbolic link from git-http-backend to valgrind.sh. 2. Apache does not pass through the GIT_VALGRIND variable to the backend CGI. This patch fixes both problems. Unfortunately, there is a slight hack we need to handle passing environment variables through Apache. If we just tell it: PassEnv GIT_VALGRIND then Apache will complain when GIT_VALGRIND is not set. If we try: SetEnv GIT_VALGRIND ${GIT_VALGRIND} then when GIT_VALGRIND is not set, it will pass through the literal "${GIT_VALGRIND}". Instead, we now unconditionally pass through GIT_VALGRIND from lib-httpd.sh into apache, even if it is empty. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24rebase -i: handle fixup of root commit correctlyLibravatar Chris Webb2-12/+21
There is a bug with git rebase -i --root when a fixup or squash line is applied to the new root. We attempt to amend the commit onto which they apply with git reset --soft HEAD^ followed by a normal commit. Unlike a real commit --amend, this sequence will fail against a root commit as it has no parent. Fix rebase -i to use commit --amend for fixup and squash instead, and add a test for the case of a fixup of the root commit. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24t1306: check that XDG_CONFIG_HOME worksLibravatar Jeff King1-0/+26
This should override $HOME/.config, but we never actually tested it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24ignore: make sure we have an xdg path before using itLibravatar Matthieu Moy2-1/+8
Commit e3ebc35 (config: fix several access(NULL) calls, 2012-07-12) was fixing access(NULL) calls when trying to access $HOME/.config/git/config, but missed the ones when trying to access $HOME/.config/git/ignore. Fix and test this. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24attr: make sure we have an xdg path before using itLibravatar Jeff King2-5/+13
If we don't have a core.attributesfile configured, we fall back to checking XDG config, which is usually $HOME/.config/git/attributes. However, if $HOME is unset, then home_config_paths will return NULL, and we end up calling fopen(NULL). Depending on your system, this may or may not cause the accompanying test to fail (e.g., on Linux and glibc, the address will go straight to open, which will return EFAULT). However, valgrind will reliably notice the error. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-24test-lib.sh: unset XDG_CONFIG_HOMELibravatar Jeff King1-0/+1
Now that git respects XDG_CONFIG_HOME for some lookups, we must be sure to cleanse the test environment. Otherwise, the user's XDG_CONFIG_HOME could influence the test results. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23Git 1.7.12-rc0Libravatar Junio C Hamano2-1/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23Merge branch 'jn/block-sha1'Libravatar Junio C Hamano2-7/+6
The code to load a word one-byte-at-a-time was optimized into a word-wide load instruction even when the pointer was not aligned, which caused issues on architectures that do not like unaligned access. * jn/block-sha1: Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads block-sha1: put expanded macro parameters in parentheses block-sha1: avoid pointer conversion that violates alignment constraints
2012-07-23Merge branch 'jn/make-assembly-in-right-directory'Libravatar Junio C Hamano1-1/+1
* jn/make-assembly-in-right-directory: Makefile: fix location of listing produced by "make subdir/foo.s"
2012-07-23Merge branch 'th/difftool-diffall'Libravatar Junio C Hamano1-2/+5
Finishing touches to difftool --dirdiff. * th/difftool-diffall: difftool: only copy back files modified during directory diff
2012-07-23Merge branch 'sl/autoconf'Libravatar Junio C Hamano2-27/+46
* sl/autoconf: build: reconfigure automatically if configure.ac changes build: "make clean" should not remove configure-generated files autoconf: use AC_CONFIG_COMMANDS instead of ad-hoc 'config.mak.append' autoconf: remove few redundant semicolons autoconf: remove some redundant shell indirections autoconf: GIT_CONF_APPEND_LINE -> GIT_CONF_SUBST autoconf: GIT_CONF_APPEND_LINE: change signature
2012-07-23Merge branch 'jv/maint-no-ext-diff'Libravatar Junio C Hamano2-3/+64
"git diff --no-ext-diff" did not output anything for a typechange filepair when GIT_EXTERNAL_DIFF is in effect. * jv/maint-no-ext-diff: diff: test precedence of external diff drivers diff: correctly disable external_diff with --no-ext-diff
2012-07-23Merge branch 'kk/maint-commit-tree'Libravatar Junio C Hamano3-4/+18
* kk/maint-commit-tree: Revert "git-commit-tree(1): update synopsis" commit-tree: resurrect command line parsing updates
2012-07-23Merge branch 'jk/mediawiki-credential'Libravatar Junio C Hamano3-34/+22
* jk/mediawiki-credential: mw-to-git: use git-credential's URL parser credential: convert "url" attribute into its parsed subparts mw-to-git: check blank credential attributes via length docs/credential: minor clarity fixups
2012-07-23Merge branch 'mm/mediawiki-usability'Libravatar Junio C Hamano3-32/+116
* mm/mediawiki-usability: git-remote-mediawiki: allow page names with a ':' git-remote-mediawiki: fix incorrect test usage in test git-remote-mediawiki: properly deal with invalid remote revisions git-remote-mediawiki: show progress information when getting last remote revision git-remote-mediawiki: show progress information when listing pages git-remote-mediawiki: use --force when adding notes git-remote-mediawiki: get rid of O(N^2) loop git-remote-mediawiki: make mediafiles export optional git-remote-mediawiki: actually send empty comment when they're empty git-remote-mediawiki: don't split namespaces with spaces
2012-07-23Merge branch 'sn/doc-typofix'Libravatar Junio C Hamano5-10/+10
* sn/doc-typofix: doc: A few minor copy edits.
2012-07-23Merge branch 'tg/ce-namelen-field'Libravatar Junio C Hamano8-52/+65
Split lower bits of ce_flags field and creates a new ce_namelen field in the in-core index structure. * tg/ce-namelen-field: Strip namelen out of ce_flags into a ce_namelen field
2012-07-23Merge branch 'nk/maint-gitweb-log-by-lines'Libravatar Junio C Hamano1-15/+18
Teach gitweb to pay attention to various forms of credits that are similar to "Signed-off-by:" lines. * nk/maint-gitweb-log-by-lines: gitweb: Add support to Link: tag gitweb: Handle other types of tag in git_print_log gitweb: Cleanup git_print_log()
2012-07-23commit: document the temporary commit message fileLibravatar Jeff King1-0/+9
We do not document COMMIT_EDITMSG at all, but users may want to know about it for two reasons: 1. They may want to tell their editor to configure itself for formatting a commit message. 2. If a commit is aborted by an error, the user may want to recover the commit message they typed. Let's put a note in git-commit(1). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23mergetool: support --tool-help option like difftool doesLibravatar Junio C Hamano3-5/+49
This way we do not have to risk the list of tools going out of sync between the implementation and the documentation. In the same spirit as bf73fc2 (difftool: print list of valid tools with '--tool-help', 2012-03-29), trim the list of merge backends in the documentation. We do not want to have a complete list of valid tools; we only want a list to help people guess what kind of things the tools do to be specified there, and refer them to --tool-help for a complete list. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23commit: check committer identity more strictlyLibravatar Jeff King1-1/+1
The identity of the committer will ultimately be pulled from the ident code by commit_tree(). However, we make an attempt to check the author and committer identity early, before the user has done any manual work like inputting a commit message. That lets us abort without them having to worry about salvaging the work from .git/COMMIT_EDITMSG. The early check for committer ident does not use the IDENT_STRICT flag, meaning that it would not find an empty name field. The motivation was presumably because we did not want to be too restrictive, as later calls might be more lax (for example, when we create the reflog entry, we do not care too much about a real name). However, because commit_tree will always get a strict identity to put in the commit object itself, there is no point in being lax only to die later (and in fact it is harmful, because the user will have wasted time typing their commit message). Incidentally, this bug was masked prior to 060d4bb, as the initial loose call would taint the later strict call. So the commit would succeed (albeit with a bogus committer line in the commit object), and nobody noticed that our early check did not match the later one. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23advice: pass varargs to strbuf_vaddf, not strbuf_addfLibravatar Jeff King1-1/+1
The advise() function takes a variable number of arguments and converts them into a va_list object to pass to strbuf for handling. However, we accidentally called strbuf_addf (that takes a variable number of arguments) instead of strbuf_vaddf (that takes a va_list). This bug dates back to v1.7.8.1-1-g23cb5bf, but we never noticed because none of the current callers passes a string with a format specifier in it. And the compiler did not notice because the format string is not available at compile time. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23Makefile: BLK_SHA1 does not require fast htonl() and unaligned loadsLibravatar Jonathan Nieder1-3/+2
block-sha1/ is fast on most known platforms. Clarify the Makefile to be less misleading about that. Early versions of block-sha1/ explicitly relied on fast htonl() and fast 32-bit loads with arbitrary alignment. Now it uses those on some arches but the default behavior is byte-at-a-time access for the sake of arches like ARM, Alpha, and their kin and it is still pretty fast on these arches (fast enough to supersede the mozilla SHA1 implementation and the hand-written ARM assembler implementation that were bundled before). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22Makefile: fix location of listing produced by "make subdir/foo.s"Libravatar Jonathan Nieder1-1/+1
When I invoke "make block-sha1/sha1.s", 'make' runs $(CC) -S without specifying where it should put its output and the output ends up in ./sha1.s. Confusing. Add an -o option to the .s rule to fix this. We were already doing that for most compiler invocations but had forgotten it for the assembler listings. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22block-sha1: put expanded macro parameters in parenthesesLibravatar Jonathan Nieder1-2/+2
't' is currently always a numeric constant, but it can't hurt to prepare for the day that it becomes useful for a caller to pass in a more complex expression. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22block-sha1: avoid pointer conversion that violates alignment constraintsLibravatar Jonathan Nieder1-3/+3
With 660231aa (block-sha1: support for architectures with memory alignment restrictions, 2009-08-12), blk_SHA1_Update was modified to access 32-bit chunks of memory one byte at a time on arches that prefer that: #define get_be32(p) ( \ (*((unsigned char *)(p) + 0) << 24) | \ (*((unsigned char *)(p) + 1) << 16) | \ (*((unsigned char *)(p) + 2) << 8) | \ (*((unsigned char *)(p) + 3) << 0) ) The code previously accessed these values by just using htonl(*p). Unfortunately, Michael noticed on an Alpha machine that git was using plain 32-bit reads anyway. As soon as we convert a pointer to int *, the compiler can assume that the object pointed to is correctly aligned as an int (C99 section 6.3.2.3 "pointer conversions" paragraph 7), and gcc takes full advantage by using a single 32-bit load, resulting in a whole bunch of unaligned access traps. So we need to obey the alignment constraints even when only dealing with pointers instead of actual values. Do so by changing the type of 'data' to void *. This patch renames 'data' to 'block' at the same time to make sure all references are updated to reflect the new type. Reported-tested-and-explained-by: Michael Cree <mcree@orcon.net.nz> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22Update draft release notes to 1.7.12Libravatar Junio C Hamano1-56/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22Sync with 1.7.11.3Libravatar Junio C Hamano2-1/+55
2012-07-22Git 1.7.11.3Libravatar Junio C Hamano4-3/+57
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22Merge branch 'jk/push-delete-ref-error-message' into maintLibravatar Junio C Hamano1-0/+3
The error message from "git push $there :bogo" (and its equivalent "git push $there --delete bogo") mentioned that we tried and failed to guess what ref is being deleted based on the LHS of the refspec, which we don't. * jk/push-delete-ref-error-message: push: don't guess at qualifying remote refs on deletion
2012-07-22Merge branch 'ar/clone-honor-umask-at-top' into maintLibravatar Junio C Hamano3-3/+3
A handful of files and directories we create had tighter than necessary permission bits when the user wanted to have group writability (e.g. by setting "umask 002"). * ar/clone-honor-umask-at-top: add: create ADD_EDIT.patch with mode 0666 rerere: make rr-cache fanout directory honor umask Restore umasks influence on the permissions of work tree created by clone
2012-07-22Merge branch 'cw/amend-commit-without-message' into maintLibravatar Junio C Hamano2-1/+16
"commit --amend" used to refuse amending a commit with an empty log message, with or without "--allow-empty-message". * cw/amend-commit-without-message: Allow edit of empty message with commit --amend