summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-29Avoid using `echo -n` anywhereLukas Fleischer
`echo -n` is non-portable. The POSIX specification says: Conforming applications that wish to do prompting without <newline> characters or that could possibly be expecting to echo a -n, should use the printf utility derived from the Ninth Edition system. Since all of the affected shell scripts use a POSIX shell shebang, replace `echo -n` invocations with printf. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-03Merge branch 'maint-1.8.1' into maint-1.8.2Junio C Hamano
* maint-1.8.1: git-config: update doc for --get with multiple values
2013-07-03git-config: update doc for --get with multiple valuesJohn Keeping
Since commit 00b347d (git-config: do not complain about duplicate entries, 2012-10-23), "git config --get" does not exit with an error if there are multiple values for the specified key but instead returns the last value. Update the documentation to reflect this. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-11t0070 "mktemp to unwritable directory" needs SANITYTorsten Bögershausen
Use the SANITY prerequisite when testing if a temp file can be created in a read only directory. Skip the test under CYGWIN, or skip it under Unix/Linux when it is run as root. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-11pre-push.sample: Make the script executableWieland Hoffmann
githooks(5) says that "[...]the .sample files are executable by default" which was not true. Signed-off-by: Wieland Hoffmann <themineo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28trivial: Add missing period in documentationPhil Hord
Signed-off-by: Phil Hord <hordp@cisco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09Git 1.8.2.3v1.8.2.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09Merge branch 'tr/copy-revisions-from-stdin' into maintJunio C Hamano
* tr/copy-revisions-from-stdin: read_revisions_from_stdin: make copies for handle_revision_arg
2013-05-09t5004: avoid using tar for checking emptiness of archiveRené Scharfe
Test 2 of t5004 checks if a supposedly empty tar archive really contains no files. 24676f02 (t5004: fix issue with empty archive test and bsdtar) removed our commit hash to make it work with bsdtar, but the test still fails on NetBSD and OpenBSD, which use their own tar that considers a tar file containing only NULs as broken. Here's what the different archivers do when asked to create a tar file without entries: $ uname -v NetBSD 6.0.1 (GENERIC) $ gtar --version | head -1 tar (GNU tar) 1.26 $ bsdtar --version bsdtar 2.8.4 - libarchive 2.8.4 $ : >zero.tar $ perl -e 'print "\0" x 10240' >tenk.tar $ sha1 zero.tar tenk.tar SHA1 (zero.tar) = da39a3ee5e6b4b0d3255bfef95601890afd80709 SHA1 (tenk.tar) = 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c $ : | tar cf - -T - | sha1 da39a3ee5e6b4b0d3255bfef95601890afd80709 $ : | gtar cf - -T - | sha1 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c $ : | bsdtar cf - -T - | sha1 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c So NetBSD's native tar creates an empty file, while GNU tar and bsdtar both give us 10KB of NULs -- just like git archive with an empty tree. Now let's see how the archivers handle these two kinds of empty tar files: $ tar tf zero.tar; echo $? tar: Unexpected EOF on archive file 1 $ gtar tf zero.tar; echo $? gtar: This does not look like a tar archive gtar: Exiting with failure status due to previous errors 2 $ bsdtar tf zero.tar; echo $? 0 $ tar tf tenk.tar; echo $? tar: Cannot identify format. Searching... tar: End of archive volume 1 reached tar: Sorry, unable to determine archive format. 1 $ gtar tf tenk.tar; echo $? 0 $ bsdtar tf tenk.tar; echo $? 0 NetBSD's tar complains about both, bsdtar happily accepts any of them and GNU tar doesn't like zero-length archive files. So the safest course of action is to stay with our block-of-NULs format which is compatible with GNU tar and bsdtar, as we can't make NetBSD's native tar happy anyway. We can simplify our test, however, by taking tar out of the picture. Instead of extracting the archive and checking for the non-presence of files, check if the file has a size of 10KB and contains only NULs. This makes t5004 pass on NetBSD and OpenBSD. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09t5004: ignore pax global header fileRené Scharfe
Versions of tar that don't know pax headers -- like the ones in NetBSD 6 and OpenBSD 5.2 -- extract them as regular files. Explicitly ignore the file created for our global header when checking the list of extracted files, as this is normal and harmless fall-back behaviour. This fixes test 3 of t5004 on these platforms. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09mergetools/kdiff3: do not use --auto when diffingDavid Aguilar
The `kdiff3 --auto` help message is, "No GUI if all conflicts are auto- solvable." This flag was carried over from the original mergetool commands. diff_cmd() is for two-way comparisons only so remove the superfluous flag. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09transport-helper: trivial style cleanupFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-03Merge branch 'tr/remote-tighten-commandline-parsing' into maintJunio C Hamano
* tr/remote-tighten-commandline-parsing: remote: 'show' and 'prune' can take more than one remote remote: check for superfluous arguments in 'git remote add' remote: add a test for extra arguments, according to docs
2013-05-03Merge branch 'jn/glossary-revision' into maintJunio C Hamano
* jn/glossary-revision: glossary: a revision is just a commit
2013-05-03completion: zsh: don't override suffix on _detaultFelipe Contreras
zsh is smart enough to add the right suffix while completing, there's no point in trying to do the same as bash. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-02Documentation/git-commit: Typo under --editAnders Granskogen Bjørnstad
-C takes a commit object, not a file. Signed-off-by: Anders Granskogen Bjørnstad <andersgb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29Merge branch 'fc/zsh-completion' into maintJunio C Hamano
* fc/zsh-completion: complete: zsh: use zsh completion for the main cmd complete: zsh: trivial simplification
2013-04-29complete: zsh: use zsh completion for the main cmdFelipe Contreras
So that we can have a nice zsh completion output: % git <tab> add -- add file contents to the index bisect -- find by binary search the change that introduced a bug branch -- list, create, or delete branches checkout -- checkout a branch or paths to the working tree clone -- clone a repository into a new directory commit -- record changes to the repository diff -- show changes between commits, commit and working tree, etc fetch -- download objects and refs from another repository grep -- print lines matching a pattern init -- create an empty Git repository or reinitialize an existing one log -- show commit logs merge -- join two or more development histories together mv -- move or rename a file, a directory, or a symlink pull -- fetch from and merge with another repository or a local branch push -- update remote refs along with associated objects rebase -- forward-port local commits to the updated upstream head reset -- reset current HEAD to the specified state rm -- remove files from the working tree and from the index show -- show various types of objects status -- show the working tree status tag -- create, list, delete or verify a tag object signed with GPG And other niceties, like 'git --git-dir=<tab>' showing only directories. For the rest, the bash completion stuff is still used. Also, add my copyright, since this more than a thin wrapper. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29complete: zsh: trivial simplificationFelipe Contreras
There should be no functional changes. The only reason I wrapped this code around a sub-function is because zsh did the same in it's bashcompinit script in order to declare the special variable 'words' as hidden, but only in this context. There's no need for that any more since we access __git_main directly, so 'words' is not modified, so there's no need for the sub-function. In zsh mode the array indexes are different though. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: complete branch.*.rebase as booleanRamkumar Ramachandra
6fac1b83 (completion: add missing config variables, 2009-06-29) added "rebase" to the list of completions for "branch.*.*", but forgot to specify completions for the values that this configuration variable can take (namely "false" and "true"). Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: add diff.submodule to config listRamkumar Ramachandra
c47ef57 (diff: introduce diff.submodule configuration variable, 2012-11-13) introduced the diff.submodule configuration variable, but forgot to teach git-completion.bash about it. Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: lexical sorting for diff.statGraphWidthRamkumar Ramachandra
df44483a (diff --stat: add config option to limit graph width, 2012-03-01) added the option diff.startGraphWidth to the list of configuration variables in git-completion.bash, but failed to notice that the list is sorted alphabetically. Move it to its rightful place in the list. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-28documentation: trivial whitespace cleanupsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-28t/Makefile: remove smoke test targetsJohn Keeping
Commit d24fbca (Remove Git's support for smoke testing - 2011-12-23) removed the smoke test support from the test suite but it was re-added by commit 342e9ef (Introduce a performance testing framework - 2012-02-17). This appears to be the result of a mis-rebase, since re-adding the smoke testing infrastructure does not relate to the subject of that commit. The current 'smoke' target is broken since the 'harness' script it uses no longer exists, so just reapply this section of commit d24fbca and remove all of the smoke testing section in the makefile. Signed-off-by: John Keeping <john@keeping.me.uk> Acked-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26Git 1.8.2.2v1.8.2.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26Merge branch 'jk/a-thread-only-dies-once' into maintJunio C Hamano
* jk/a-thread-only-dies-once: run-command: use thread-aware die_is_recursing routine usage: allow pluggable die-recursion checks
2013-04-26Merge branch 'jn/gitweb-install-doc' into maintJunio C Hamano
* jn/gitweb-install-doc: gitweb/INSTALL: GITWEB_CONFIG_SYSTEM is for backward compatibility gitweb/INSTALL: Simplify description of GITWEB_CONFIG_SYSTEM
2013-04-26Merge branch 'fc/untracked-zsh-prompt' into maintJunio C Hamano
* fc/untracked-zsh-prompt: prompt: fix untracked files for zsh
2013-04-26Merge branch 'jk/receive-pack-deadlocks-with-early-failure' into maintJunio C Hamano
* jk/receive-pack-deadlocks-with-early-failure: receive-pack: close sideband fd on early pack errors
2013-04-26Merge branch 'jk/chopped-ident' into maintJunio C Hamano
* jk/chopped-ident: blame: handle broken commit headers gracefully pretty: handle broken commit headers gracefully cat-file: print tags raw for "cat-file -p"
2013-04-26Merge branch 'rt/commentchar-fmt-merge-msg' into maintJunio C Hamano
* rt/commentchar-fmt-merge-msg: t6200: avoid path mangling issue on Windows fmt-merge-msg: use core.commentchar in tag signatures completely fmt-merge-msg: respect core.commentchar in people credits
2013-04-26Merge branch 'rs/empty-archive' into maintJunio C Hamano
* rs/empty-archive: t5004: fix issue with empty archive test and bsdtar
2013-04-26Merge branch 'pe/pull-rebase-v-q' into maintJunio C Hamano
* pe/pull-rebase-v-q: pull: Apply -q and -v options to rebase mode as well
2013-04-26t7409: do not use export X=YTorsten Bögershausen
The shell syntax "export X=Y A=B" is not understood by all shells. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26test-hg-hg-git.sh: do not use export X=YTorsten Bögershausen
The shell syntax "export X=Y" is not understood by all shells. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26test-hg-bidi.sh: do not use export X=YTorsten Bögershausen
The shell syntax "export X=Y A=B" is not understood by all shells. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26t9501: do not use export X=YTorsten Bögershausen
The shell syntax "export X=Y" is not understood by all shells. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26t9020: do not use export X=YTorsten Bögershausen
The shell syntax "export X=Y" is not understood by all shells. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-24Update draft release notes to 1.8.2.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-24Merge branch 'jk/diff-algo-finishing-touches' into maintJunio C Hamano
"git diff --diff-algorithm=algo" was understood by the command line parser, but "git diff --diff-algorithm algo" was not. * jk/diff-algo-finishing-touches: diff: allow unstuck arguments with --diff-algorithm git-merge(1): document diff-algorithm option to merge-recursive
2013-04-24Merge branch 'sr/log-SG-no-textconv' into maintJunio C Hamano
"git log -S/-G" started paying attention to textconv filter, but there was no way to disable this. Make it honor --no-textconv option. * sr/log-SG-no-textconv: diffcore-pickaxe: unify code for log -S/-G diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>" diffcore-pickaxe: port optimization from has_changes() to diff_grep() diffcore-pickaxe: respect --no-textconv diffcore-pickaxe: remove fill_one() diffcore-pickaxe: remove unnecessary call to get_textconv()
2013-04-24Merge branch 'jc/merge-tag-object' into maintJunio C Hamano
"git merge $(git rev-parse v1.8.2)" behaved quite differently from "git merge v1.8.2", as if v1.8.2 were written as v1.8.2^0 and did not pay much attention to the annotated tag payload. Make the code notice the type of the tag object, in addition to the dwim_ref() based classification the current code uses (i.e. the name appears in refs/tags/) to decide when to special case merging of tags. * jc/merge-tag-object: t6200: test message for merging of an annotated tag t6200: use test_config/test_unconfig merge: a random object may not necssarily be a commit
2013-04-24completion: remove duplicate block for "git commit -c"Mårten Kongstad
Remove one of two consecutive, identical blocks for "git commit -c". This was caused by a mechanical mismerge at d931e2fb252e (Merge branch 'mp/complete-paths', 2013-02-08). The side branch wanted to add this block at fea16b47 but the same fix was done independently at 685397585 already. Signed-off-by: Mårten Kongstad <marten.kongstad@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-24remote: 'show' and 'prune' can take more than one remoteThomas Rast
The 'git remote show' and 'prune' subcommands are documented as taking only a single remote name argument, but that is not the case; they will simply iterate the action over all remotes given. Update the documentation and tests to match. With the last user of the -f flag gone, we also remove the code supporting it. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-24remote: check for superfluous arguments in 'git remote add'Thomas Rast
The 'git remote add' subcommand did not check for superfluous command line arguments. Make it so. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-24remote: add a test for extra arguments, according to docsThomas Rast
This adds one test or comment for each subcommand of git-remote according to its current documentation. All but 'set-branches' and 'update' are listed as taking only a fixed number of arguments; for those we can write a test with one more (bogus) argument, and see if the command notices that. They fail on several counts: 'add' does not check for extra arguments, and 'show' and 'prune' actually iterate over remotes (i.e., take any number of args). We'll fix them in the next two patches. The -f machinery is only there to make the tests readable while still ensuring they pass as a whole, and will be removed in the final patch. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-24cherry-pick/revert: make usage say '<commit-ish>...'Kevin Bracey
The usage string for cherry-pick and revert has never been updated to reflect their ability to handle multiple commits. Other documentation is already correct. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-22Start preparing for 1.8.2.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-22Merge branch 'ta/glossary' into maintJunio C Hamano
* ta/glossary: glossary: improve definitions of refspec and pathspec The name of the hash function is "SHA-1", not "SHA1" glossary: improve description of SHA-1 related topics glossary: remove outdated/misleading/irrelevant entries
2013-04-22Merge branch 'jk/doc-http-backend' into maintJunio C Hamano
Improve documentation to illustrate "push authenticated, fetch anonymous" configuration for smart HTTP servers. * jk/doc-http-backend: doc/http-backend: match query-string in apache half-auth example doc/http-backend: give some lighttpd config examples doc/http-backend: clarify "half-auth" repo configuration