aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Cope better with a _lot_ of packsJohannes Schindelin2009-05-20
| | | | | | | | | | | You might end up with a situation where you have tons of pack files, e.g. when using hg2git. In this situation, all kinds of operations may end up with a "too many files open" error. Let's recover gracefully from that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Looks-right-to-me-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* for-each-ref: fix segfault in copy_emailJeff King2009-05-20
| | | | | | | | | | | | | | | | | You can trigger a segfault in git.git by doing: git for-each-ref --format='%(taggeremail)' refs/tags/v0.99 The v0.99 tag is special in that it contains no "tagger" header. The bug is obvious in copy_email, which carefully checks to make sure the result of a strchr is non-NULL, but only after already having used it to perform other work. The fix is to move the check up. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* show-branch: Fix die message in parse_reflog_param()Stephen Boyd2009-05-17
| | | | | | | | | Commit 76a44c5 (show-branch --reflog: show the reflog message at the top, 2007-01-19) introduced parse_reflog_param(). The die() call was incorrectly passed arg + 9, when it should have been passed arg. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* completion: add missing options to show-branch and showStephen Boyd2009-05-16
| | | | | | | Add --oneline and --abbrev-commit to show and --sparse to show-branch. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* dir.c: clean up handling of 'path' parameter in read_directory_recursive()Linus Torvalds2009-05-16
| | | | | | | | | | | | | | | | | | | | | | | | Right now we pass two different pathnames ('path' and 'base') down to read_directory_recursive(), and the only real reason for that is that we want to allow an empty 'base' parameter, but when we do so, we need the pathname to "opendir()" to be "." rather than the empty string. And rather than handle that confusion in the caller, we can just fix read_directory_recursive() to handle the case of an empty path itself, by just passing opendir() a "." ourselves if the path is empty. This would allow us to then drop one of the pathnames entirely from the calling convention, but rather than do that, we'll start separating them out as a "filesystem pathname" (the one we use for filesystem accesses) and a "git internal base name" (which is the name that we use for git internally). That will eventually allow us to do things like handle different encodings (eg the filesystem pathnames might be Latin1, while git itself would use UTF-8 for filename information). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix type-punning issuesDan McGee2009-05-16
| | | | | | | | | In these two places we are casting part of our unsigned char sha1 array into an unsigned int, which violates GCCs strict-aliasing rules (and probably other compilers). Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* test: checkout shouldn't say that HEAD has moved if it didn'tNanako Shiraishi2009-05-16
| | | | | Signed-off-by: しらいしななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* completion: enhance "current branch" displayJunio C Hamano2009-05-16
| | | | | | | | | | Introduce GIT_PS1_DESCRIBE option you can set to "contains", "branch", or "describe" to tweak the way how a detached HEAD is described. The default behaviour is to describe only exact match with some tag (otherwise use the first 7 hexdigits) as before. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* completion: simplify "current branch" in __git_ps1()Junio C Hamano2009-05-16
| | | | | | | | | | | | | | | As I very often work on a detached HEAD, I found it pretty confusing when __git_ps1() said 'some-name'. Did I create a branch with that name by mistake, or do I happen to be on a commit with that exact tag? This patch fixes the issue by enclosing non branch names in a pair of parentheses when used to substitute %s token in __git_ps1() argument. It also fixes a small bug where the branch part is left empty when .git/HEAD is unreadable for whatever reason. The output now says "(unknown)". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* completion: fix PS1 display during a merge on detached HEADJunio C Hamano2009-05-16
| | | | | | | | | | | | | | | If your merge stops in a conflict while on a detached HEAD, recent completion code fails to show anything. This was because various cases added to support the operation-in-progress markers (e.g. REBASE, MERGING) forgot that they need to set the variable "b" to something for the result they computed to be displayed at all. Probably not many people make trial merges on a detached HEAD (which is tremendously useful feature of git, by the way), and that may be why this was not noticed for a long time. Acked-By: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* builtin-checkout: Don't tell user that HEAD has moved before it hasDaniel Cordero2009-05-16
| | | | | | | | | | | Previously, checkout would tell the user this message before moving HEAD, without regard to whether the upcoming move will result in success. If the move failed, this causes confusion. Show the message after the move, unless the move failed. Signed-off-by: Daniel Cordero <theappleman@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* pre-commit.sample: don't print incidental SHA1Jim Meyering2009-05-16
| | | | | | | | | Make the sample pre-commit hook script discard all git-rev-parse output, not just stderr. Otherwise, it would print an SHA1. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: Add tests for missing format-patch long optionsStephen Boyd2009-05-16
| | | | | | | | Exercise format-patch's --signoff, --in-reply-to and --start-number long options. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* api-parse-options.txt: use 'func' instead of 'funct'Stephen Boyd2009-05-16
| | | | | Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Turn on USE_ST_TIMESPEC for OpenBSDTony Kemp2009-05-16
| | | | | | | | Like Darwin, OpenBSD's stat struct uses st_ctimespec and st_mtimestruct rather than st_ctim and st_mtim. Signed-off-by: Tony Kemp <tony.kemp@newcastle.edu.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint-1.6.2' into maintJunio C Hamano2009-05-16
|\ | | | | | | | | | | * maint-1.6.2: 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.1' into maint-1.6.2Junio C Hamano2009-05-13
| |\ | | | | | | | | | | | | | | | * 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-13
| | |\ | | | | | | | | | | | | | | | | | | | | * 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-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | GIT 1.6.3.1v1.6.3.1Junio C Hamano2009-05-12
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint-1.6.2' into maintJunio C Hamano2009-05-12
|\ \ \ \ | |/ / / | | | | | | | | | | | | * maint-1.6.2: Revert "checkout branch: prime cache-tree fully"
| * | | Merge branch 'jc/maint-read-tree-multi' into maint-1.6.2Junio C Hamano2009-05-12
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * jc/maint-read-tree-multi: Revert "checkout branch: prime cache-tree fully"
| | * | | Revert "checkout branch: prime cache-tree fully"Junio C Hamano2009-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-08
| |\ \ \ \ | | | |/ / | | |/| | | | | | | * maint-1.6.1:
| | * | | Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano2009-05-08
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | * maint-1.6.0: dir.c: Fix two minor grammatical errors in comments
* | | | | Documentation: cloning to empty directory is allowedAlexander Potashev2009-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cloning into an existing empty directory is now allowed: commit 55892d23981917aefdb387ad7d0429f90cbd446a ("Allow cloning to an existing empty directory") Signed-off-by: Alexander Potashev <aspotashev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Clarify kind of conflict in merge-one-file helperAlex Riesen2009-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not as verbose as the recursive merge driver, but better still. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | git config: clarify --add and --get-colorFelipe Contreras2009-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | archive-tar.c: squelch a type mismatch warningJunio C Hamano2009-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems, giving a value of type time_t to printf "%lo" that expects an unsigned long would give a type mismatch warning. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Start 1.6.3.1 maintenance series.Junio C Hamano2009-05-08
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | GIT 1.6.3v1.6.3Junio C Hamano2009-05-06
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4029: use sh instead of bashNguyễn Thái Ngọc Duy2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4200: convert sed expression which operates on non-text file to perlBrandon Casey2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX only requires sed to work on text files and MERGE_RR is not a text file. Some versions of sed complain that this file is not newline terminated, and exit non-zero. Use perl instead which does not have a problem with it. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4200: remove two unnecessary linesBrandon Casey2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two lines appear to be unnecessary. They set variables which are not used afterwards. The primary motivation to remove them is that the sed invocation exits non-zero for seds which require newline termination of input files. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t/annotate-tests.sh: avoid passing a non-newline terminated file to sedBrandon Casey2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of sed exit non-zero if the file they are supplied is not newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. So rework this test to avoid doing so. This affects tests t8001-annotate.sh and t8002-blame.sh. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4118: avoid sed invocation on file without terminating newlineBrandon Casey2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of sed exit non-zero if the file they are supplied is not newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. In this case the sed invocation can be avoided entirely since the resulting file is equivalent to a previously created file. So, just copy that file into place instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4118: add missing '&&'Brandon Casey2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t8005: use egrep when extended regular expressions are requiredBrandon Casey2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all versions of grep understand backslashed extended regular expressions. Possibly only gnu grep does. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | git-clean doc: the command only affects paths under $(cwd)Junio C Hamano2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fredrik Skolmli and Thomas Rast noticed that it was left unstated that "git clean" ran from a subdirectory will not affect anything outside it, with or without path limiters. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2009-05-05
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: improve error message in config.c t4018-diff-funcname: add cpp xfuncname pattern to syntax test Work around BSD whose typeof(tv.tv_sec) != time_t git-am.txt: reword extra headers in message body git-am.txt: Use date or value instead of time or timestamp git-am.txt: add an 'a', say what 'it' is, simplify a sentence dir.c: Fix two minor grammatical errors in comments git-svn: fix a sloppy Getopt::Long usage
| * | | | Merge branch 'rj/maint-1.6.0-svn-parse-fix' into maintJunio C Hamano2009-05-05
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * 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-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05
| |\ \ \ \ \ | | | |_|/ / | | |/| | | | | | | | | | | | | | | * maint-1.6.0: dir.c: Fix two minor grammatical errors in comments
| | * | | | dir.c: Fix two minor grammatical errors in commentsAllan Caffee2009-05-05
| | |/ / / | | | | | | | | | | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Work around BSD whose typeof(tv.tv_sec) != time_tBernd Ahlers2009-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to POSIX, tv_sec is supposed to be a time_t, but OpenBSD (and FreeBSD, too) defines it to be a long, which triggers a type mismatch when a pointer to it is given to localtime_r(). Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-am.txt: reword extra headers in message bodyStephen Boyd2009-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-am.txt: Use date or value instead of time or timestampStephen Boyd2009-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>