summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-06Merge branch 'jn/block-sha1' into maintLibravatar Junio C Hamano2-7/+6
* 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-08-06Merge branch 'jn/make-assembly-in-right-directory' into maintLibravatar Junio C Hamano1-1/+1
* jn/make-assembly-in-right-directory: Makefile: fix location of listing produced by "make subdir/foo.s"
2012-08-06Merge branch 'ms/daemon-doc-typo' into maintLibravatar Junio C Hamano1-1/+1
* ms/daemon-doc-typo: Documentation/git-daemon: add missing word
2012-08-06Merge branch 'lm/git-blame-el' into maintLibravatar Junio C Hamano1-36/+37
* lm/git-blame-el: git-blame.el: Do not use bare 0 to mean (point-min) git-blame.el: Use with-current-buffer where appropriate git-blame.el: Do not use goto-line in lisp code
2012-08-06Merge branch 'rs/ipv6-ssh-url' into maintLibravatar Junio C Hamano1-1/+1
* rs/ipv6-ssh-url: git: Wrong parsing of ssh urls with IPv6 literals ignores port
2012-08-06Merge branch 'rs/git-blame-mapcar-mapc' into maintLibravatar Junio C Hamano1-1/+1
* rs/git-blame-mapcar-mapc: git-blame.el: use mapc instead of mapcar
2012-08-06Merge branch 'rr/doc-commit' into maintLibravatar Junio C Hamano1-0/+8
* rr/doc-commit: commit: document a couple of options
2012-08-06doc: A few minor copy edits.Libravatar Štěpán Němec5-10/+10
- (glossary) the quotes around the Wikipedia URL prevented its linkification in frontends that support it; remove them - (manual) newer version (SHA-1) == following, older == preceding, not the other way around - trivial typo and wording fixes Signed-off-by: Štěpán Němec <stepnem@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-06Merge branch 'jk/maint-checkout-orphan-check-fix' into maintLibravatar Junio C Hamano1-1/+1
* jk/maint-checkout-orphan-check-fix: checkout: don't confuse ref and object flags
2012-08-06Merge branch 'mh/maint-revisions-doc' into maintLibravatar Junio C Hamano1-6/+37
* mh/maint-revisions-doc: Enumerate revision range specifiers in the documentation Make <refname> documentation more consistent.
2012-08-06Merge branch 'jc/mergetool-tool-help' into maintLibravatar Junio C Hamano3-5/+49
* jc/mergetool-tool-help: mergetool: support --tool-help option like difftool does
2012-07-30Git 1.7.11.4Libravatar Junio C Hamano4-3/+35
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-30Merge branch 'jk/maint-commit-document-editmsg' into maintLibravatar Junio C Hamano1-0/+9
"$GIT_DIR/COMMIT_EDITMSG" file that is used to hold the commit log message user edits was not documented. * jk/maint-commit-document-editmsg: commit: document the temporary commit message file
2012-07-30Merge branch 'jk/maint-advise-vaddf' into maintLibravatar 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-30Merge branch 'kk/maint-commit-tree' into maintLibravatar Junio C Hamano3-4/+18
"git commit-tree" learned a more natural "-p <parent> <tree>" order of arguments long time ago, but recently forgot it by mistake. * kk/maint-commit-tree: Revert "git-commit-tree(1): update synopsis" commit-tree: resurrect command line parsing updates
2012-07-30Merge branch 'jv/maint-no-ext-diff' into maintLibravatar 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-30Merge branch 'pg/maint-1.7.9-am-where-is-patch' into maintLibravatar Junio C Hamano2-0/+8
When "git am" failed, old timers knew to check .git/rebase-apply/patch to see what went wrong, but we never told the users about it. * pg/maint-1.7.9-am-where-is-patch: am: indicate where a failed patch is to be found
2012-07-30Merge branch 'jl/maint-1.7.10-recurse-submodules-with-symlink' into maintLibravatar Junio C Hamano2-2/+17
When "git submodule add" clones a submodule repository, it can get confused where to store the resulting submodule repository in the superproject's .git/ directory when there is a symbolic link in the path to the current directory. * jl/maint-1.7.10-recurse-submodules-with-symlink: submodules: don't stumble over symbolic links when cloning recursively
2012-07-30Merge branch 'jc/maint-filter-branch-epoch-date' into maintLibravatar Junio C Hamano4-5/+15
In 1.7.9 era, we taught "git rebase" about the raw timestamp format but we did not teach the same trick to "filter-branch", which rolled a similar logic on its own. * jc/maint-filter-branch-epoch-date: t7003: add test to filter a branch with a commit at epoch date.c: Fix off by one error in object-header date parsing filter-branch: do not forget the '@' prefix to force git-timestamp
2012-07-25checkout: don't confuse ref and object flagsLibravatar Jeff King1-1/+1
When we are leaving a detached HEAD, we do a revision traversal to check whether we are orphaning any commits, marking the commit we're leaving as the start of the traversal, and all existing refs as uninteresting. Prior to commit 468224e5, we did so by calling for_each_ref, and feeding each resulting refname to setup_revisions. Commit 468224e5 refactored this to simply mark the pending objects, saving an extra lookup. However, it confused the "flags" parameter to the each_ref_fn clalback, which is about the flags we found while looking up the ref with the object flag. Because REF_ISSYMREF ("this ref is a symbolic ref, e.g. refs/remotes/origin/HEAD") happens to be the same bit pattern as SEEN ("we have picked this object up from the pending list and moved it to revs.commits list"), we incorrectly reported that a commit previously at the detached HEAD will become unreachable if the only ref that can reach the commit happens to be pointed at by a symbolic ref. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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-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-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-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
2012-07-22Merge branch 'jk/maint-commit-amend-only-no-paths' into maintLibravatar Junio C Hamano2-1/+14
"git commit --amend --only --" was meant to allow "Clever" people to rewrite the commit message without making any change even when they have already changes for the next commit added to their index, but it never worked as advertised since it was introduced in 1.3.0 era. * jk/maint-commit-amend-only-no-paths: commit: fix "--amend --only" with no pathspec
2012-07-22Merge branch 'tg/maint-cache-name-compare' into maintLibravatar Junio C Hamano2-4/+48
Even though the index can record pathnames longer than 1<<12 bytes, in some places we were not comparing them in full, potentially replacing index entries instead of adding. * tg/maint-cache-name-compare: cache_name_compare(): do not truncate while comparing paths
2012-07-22Merge branch 'tr/maint-show-walk' into maintLibravatar Junio C Hamano2-0/+94
"git show"'s auto-walking behaviour was an unreliable and unpredictable hack; it now behaves just like "git log" does when it walks. * tr/maint-show-walk: show: fix "range implies walking" Demonstrate git-show is broken with ranges
2012-07-22Merge branch 'jc/refactor-diff-stdin' into maintLibravatar Junio C Hamano4-50/+67
"git diff", "git status" and anything that internally uses the comparison machinery was utterly broken when the difference involved a file with "-" as its name. This was due to the way "git diff --no-index" was incorrectly bolted on to the system, making any comparison that involves a file "-" at the root level incorrectly read from the standard input. * jc/refactor-diff-stdin: diff-index.c: "git diff" has no need to read blob from the standard input diff-index.c: unify handling of command line paths diff-index.c: do not pretend paths are pathspecs
2012-07-22Merge branch 'mz/empty-rebase-test' into maintLibravatar Junio C Hamano1-0/+8
We did not have test to make sure "git rebase" without extra options filters out an empty commit in the original history. * mz/empty-rebase-test: add test case for rebase of empty commit
2012-07-22Merge branch 'js/fast-export-paths-with-spaces' into maintLibravatar Junio C Hamano2-1/+3
"git fast-export" produced an input stream for fast-import without properly quoting pathnames when they contain SPs in them. * js/fast-export-paths-with-spaces: fast-export: quote paths with spaces
2012-07-22Merge branch 'cw/no-detaching-an-unborn' into maintLibravatar Junio C Hamano2-0/+8
"git checkout --detach", when you are still on an unborn branch, should be forbidden, but it wasn't. * cw/no-detaching-an-unborn: git-checkout: disallow --detach on unborn branch
2012-07-22Merge branch 'vr/use-our-perl-in-tests' into maintLibravatar Junio C Hamano26-44/+65
Some implementations of Perl terminates "lines" with CRLF even when the script is operating on just a sequence of bytes. Make sure to use "$PERL_PATH", the version of Perl the user told Git to use, in our tests to avoid unnecessary breakages in tests. * vr/use-our-perl-in-tests: t/README: add a bit more Don'ts tests: enclose $PERL_PATH in double quotes t/test-lib.sh: export PERL_PATH for use in scripts t: Replace 'perl' by $PERL_PATH
2012-07-19diff: test precedence of external diff driversLibravatar Jeff King1-0/+40
There are three ways to specify an external diff command: GIT_EXTERNAL_DIFF in the environment, diff.external in the config, or a "diff" gitattribute. The current order of precedence is: 1. gitattribute 2. GIT_EXTERNAL_DIFF 3. diff.external Usually our rule is that environment variables should take precedence over on-disk config (i.e., option 2 should come before option 1). However, this situation is trickier than some, because option 1 is more specific to the individual file than option 2 (which affects all files), so it might be preferable. So the current behavior can be seen as implementing "do the specific thing if we can, but fall back to this general thing". This is probably not what we would do if we were writing git from scratch, but it has been this way for several years, and is not worth changing. So let's at least document that this is the way it's supposed to work with a test. While we're there, let's also make sure that diff.external (which was not previously tested at all) works by running it through the same tests as GIT_EXTERNAL_DIFF. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-17diff: correctly disable external_diff with --no-ext-diffLibravatar Junio C Hamano2-3/+24
Upon seeing a type-change filepair, "diff --no-ext-diff" does not show the usual "deletion followed by addition" split patch and does not run the external diff driver either. This is because the logic to disable external diff was placed at a wrong level in the callchain. run_diff_cmd() decides to show the split patch only when external diff driver is not configured or specified via GIT_EXTERNAL_DIFF environment, but this is done before checking if --no-ext-diff was given. To make things worse, run_diff_cmd() checks --no-ext-diff and disables the output for such a filepair completely, as the callchain below it (e.g. builtin_diff) does not want to handle typechange filepairs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-17Revert "git-commit-tree(1): update synopsis"Libravatar Junio C Hamano1-1/+1
This reverts commit d28436736a078a429213003a9472e8caeb86c286, which was done without realizing that the updated command line argument order was lost by mistake.
2012-07-17Merge branch 'kk/maint-1.7.9-commit-tree' into kk/maint-commit-treeLibravatar Junio C Hamano2-3/+17
* kk/maint-1.7.9-commit-tree: commit-tree: resurrect command line parsing updates
2012-07-17commit-tree: resurrect command line parsing updatesLibravatar Junio C Hamano2-3/+17
79a9312 (commit-tree: update the command line parsing, 2011-11-09) updated the command line parser to understand the usual "flags first and then non-flag arguments" order, in addition to the original and a bit unusual "tree comes first and then zero or more -p <parent>". Unfortunately, ba3c69a (commit: teach --gpg-sign option, 2011-10-05) broke it by mistake. Resurrect it, and protect the feature with a test from future breakages. Noticed by Keshav Kini Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-16Documentation/git-daemon: add missing wordLibravatar Michael Schubert1-1/+1
Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-13am: indicate where a failed patch is to be foundLibravatar Paul Gortmaker2-0/+8
If "git am" fails to apply something, the end user may need to know where to find the patch that failed to apply, so that the user can do other things (e.g. trying "GNU patch" on it, running "diffstat" to see what it tried to change, etc.) The input to "am" may have contained more than one patch, or the message may have been MIME encoded, and knowing what the user fed to "am" does not help very much for this purpose. Also introduce advice.amworkdir configuration to allow people who learned where to look to squelch this message. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-12t7003: add test to filter a branch with a commit at epochLibravatar Junio C Hamano2-3/+13
Running filter-branch on a history that has a commit with timestamp at epoch used to fail, but it should have been fixed. Add test to make sure it won't break again. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-12date.c: Fix off by one error in object-header date parsingLibravatar Junio C Hamano1-1/+1
It is perfectly OK for a valid decimal integer to begin with '9' but 116eb3a (parse_date(): allow ancient git-timestamp, 2012-02-02) did not express the range correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-12submodules: don't stumble over symbolic links when cloning recursivelyLibravatar Jens Lehmann2-2/+17
Since 69c3051 (submodules: refactor computation of relative gitdir path) cloning a submodule recursively fails for nested submodules when a symbolic link is part of the path to the work tree of the superproject. This happens when module_clone() tries to find the relative paths between the work tree and the git dir. When a symbolic link in current $PWD points to a directory that is at a different level, then determining the number of "../" needed to traverse to the superproject's work tree leads to a wrong result. As there is no portable way to say "pwd -P", use cd_to_toplevel to remove the link from $PWD, which fixes this problem. A test for this issue has been added to t7406. Reported-by: Bob Halley <halley@play-bow.org> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>