summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-05-19t3900: use ancient iconv names for backward compatibilityBrandon Casey
Some old iconv implementations do not have many alternate names and/or do not match character encoding names case insensitively. These implementations can not tell that utf-8 and UTF-8 are the same encoding and fail when trying to do the conversion. So use the old names, which modern implementations still support. The following conversions were performed: utf-8 --> UTF-8 ISO-8859-1 --> ISO8859-1 EUCJP --> eucJP Also update t9129 and t9500 which make use of the test files in t/t3900. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-18Merge branch 'np/push-delta'Junio C Hamano
* np/push-delta: allow OFS_DELTA objects during a push
2009-05-18Merge branch 'ar/merge-one-file-diag'Junio C Hamano
* ar/merge-one-file-diag: Clarify kind of conflict in merge-one-file helper
2009-05-18Merge branch 'ar/unlink-err'Junio C Hamano
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
2009-05-18Merge branch 'jk/maint-add-empty'Junio C Hamano
* jk/maint-add-empty: add: don't complain when adding empty project root
2009-05-18Merge branch 'js/add-edit'Junio C Hamano
* js/add-edit: t3702: fix reliance on SHELL_PATH being '/bin/sh' git-add: introduce --edit (to edit the diff vs. the index)
2009-05-18Merge branch 'mh/diff-stat-color'Junio C Hamano
* mh/diff-stat-color: diff: do not color --stat output like patch context
2009-05-18Merge branch 'mh/show-branch-color'Junio C Hamano
* mh/show-branch-color: bash completion: show-branch color support show-branch: color the commit status signs Conflicts: contrib/completion/git-completion.bash
2009-05-18Merge branch 'ac/graph-horizontal-line'Junio C Hamano
* ac/graph-horizontal-line: graph API: Use horizontal lines for more compact graphs
2009-05-18Merge branch 'ae/anon-fetch-info'Junio C Hamano
* ae/anon-fetch-info: fetch: Strip usernames from url's before storing them
2009-05-18Merge branch 'maint'Junio C Hamano
* maint: show-branch: Fix die message in parse_reflog_param()
2009-05-17show-branch: Fix die message in parse_reflog_param()Stephen Boyd
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>
2009-05-17Merge branch 'maint'Junio C Hamano
* maint: completion: add missing options to show-branch and show dir.c: clean up handling of 'path' parameter in read_directory_recursive() Fix type-punning issues
2009-05-17completion: add missing options to show-branch and showStephen Boyd
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>
2009-05-17dir.c: clean up handling of 'path' parameter in read_directory_recursive()Linus Torvalds
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>
2009-05-17Fix type-punning issuesDan McGee
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>
2009-05-17Merge branch 'maint'Junio C Hamano
* maint: test: checkout shouldn't say that HEAD has moved if it didn't completion: enhance "current branch" display completion: simplify "current branch" in __git_ps1() completion: fix PS1 display during a merge on detached HEAD builtin-checkout: Don't tell user that HEAD has moved before it has pre-commit.sample: don't print incidental SHA1 tests: Add tests for missing format-patch long options api-parse-options.txt: use 'func' instead of 'funct' Turn on USE_ST_TIMESPEC for OpenBSD ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
2009-05-17test: checkout shouldn't say that HEAD has moved if it didn'tNanako Shiraishi
Signed-off-by: しらいしななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-17completion: enhance "current branch" displayJunio C Hamano
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>
2009-05-17completion: simplify "current branch" in __git_ps1()Junio C Hamano
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>
2009-05-17completion: fix PS1 display during a merge on detached HEADJunio C Hamano
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>
2009-05-17Improve the naming of guessed target repository for git cloneAlex Riesen
Strip leading and trailing spaces off guessed target directory, and replace sequences of whitespace and 'control' characters with one space character. User still can have any name by specifying it explicitely after url. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-17Use UTF-8 instead of utf8 for backward compatibilityAlex Riesen
An old iconv (GNU libiconv 1.11) does not know about utf8, it does know UTF-8 though, which is also understood by all newer iconv implementations. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16builtin-checkout: Don't tell user that HEAD has moved before it hasDaniel Cordero
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>
2009-05-16pre-commit.sample: don't print incidental SHA1Jim Meyering
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>
2009-05-16tests: Add tests for missing format-patch long optionsStephen Boyd
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>
2009-05-16api-parse-options.txt: use 'func' instead of 'funct'Stephen Boyd
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16Turn on USE_ST_TIMESPEC for OpenBSDTony Kemp
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>
2009-05-16Merge branch 'maint-1.6.2' into maintJunio C Hamano
* 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"
2009-05-14Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano
* 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"
2009-05-14Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano
* 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"
2009-05-13Quote LF in urls git fetch saves in FETCH_HEADAlex Riesen
The fmt-merge-msg does a strong syntax checking of its input and fails with if it is incorrect. The LF character is the only character important for fmt-merge-msg. As the url in FETCH_HEAD plays only informational role, a quoted representation of the url should be good and true enough. The url often comes from either user-editable config or command line, so it is reasonable to expect all kinds of characters in it, including the characters which the format of FETCH_HEAD considers special (line separator in this case). Noticed and reported by Hugo Mildenberger. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-13Documentation: clarify / requirement in 'git check-ref-format'Michael J Gruber
'git check-ref-format' checks for the presence of at least one '/', the idea being that there should be no refs directly below 'refs/', so there should be a category like 'heads/' or 'tags/' in a refname. Try and make this clearer in the man page. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-13bash completion: complete variable names for "git config" with optionsStephen Boyd
This makes it easier for users to get and unset their configuration variables without having to open documentation or dig through their configuration file. __git_config_get_set_variables() retrieves the set configuration variables from the appropriate configuration file. For example, if the user has previously specified --global only the global variables are returned. The same applies for --system, and --file. If no location has been specified, all set variables are returned. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-13Merge branch 'maint'Junio C Hamano
* maint: GIT 1.6.3.1 Revert "checkout branch: prime cache-tree fully"
2009-05-13GIT 1.6.3.1v1.6.3.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-12Merge branch 'maint-1.6.2' into maintJunio C Hamano
* maint-1.6.2: Revert "checkout branch: prime cache-tree fully"
2009-05-12Merge branch 'jc/maint-read-tree-multi' into maint-1.6.2Junio C Hamano
* jc/maint-read-tree-multi: Revert "checkout branch: prime cache-tree fully"
2009-05-12Revert "checkout branch: prime cache-tree fully"Junio C Hamano
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>
2009-05-12t3900: ISO-2022-JP has more than one popular variantsJunio C Hamano
When converting from other encodings (e.g. EUC-JP or UTF-8), there are subtly different variants of ISO-2022-JP, all of which are valid. At the end of line or when a run of string switches to 1-byte sequence, ESC ( B can be used to switch to ASCII or ESC ( J can be used to switch to ISO 646:JP (JIS X 0201) but they essentially are the same character set and are used interchangeably. Similarly the set ESC $ @ switches to (JIS X 0208-1978) and ESC $ B switches to (JIS X 0208-1983) are in practice used interchangeably. Depending on the iconv library and the locale definition on the system, a program that converts from another encoding to ISO-2022-JP can produce different byte sequence, and GIT_TEST_CMP (aka "diff -u") will report the difference as a failure. Fix this by converting the expected and the actual output to UTF-8 before comparing when the end result is ISO-2022-JP. The test vector string in t3900/ISO-2022-JP.txt is expressed with ASCII and JIS X 0208-1983, but it can be expressed with any other possible variant, and when converted back to UTF-8, these variants produce identical byte sequences. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10ls-tree manpage: output of ls-tree is compatible with update-indexAlex Riesen
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>
2009-05-10ls-tree manpage: use "unless" instead of "when ... is not"Alex Riesen
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>
2009-05-09Merge branch 'maint'Junio C Hamano
* maint: Documentation: cloning to empty directory is allowed Clarify kind of conflict in merge-one-file helper git config: clarify --add and --get-color archive-tar.c: squelch a type mismatch warning
2009-05-09allow -t abbreviation for --track in git branchSitaram Chamarty
also makes it consistent with git-checkout Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09add: don't complain when adding empty project rootJeff King
We try to warn the user if one of their pathspecs caused no matches, as it may have been a typo. However, we disable the warning if the pathspec points to an existing file, since that means it is not a typo but simply an empty directory. Unfortunately, the file_exists() test was broken for one special case: the pathspec of the project root is just "". This patch detects this special case and acts as if the file exists (which it must, since it is the project root). The user-visible effect is that this: $ mkdir repo && cd repo && git init && git add . used to complain like: fatal: pathspec '' did not match any files but now is a silent no-op. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09gitweb: Remove function prototypes (cleanup)Jakub Narebski
Use of function prototypes is considered bad practice in Perl. The ones used here didn't accomplish anything anyhow, so they've been removed. >From perlsub(1): [...] the intent of this feature [prototypes] is primarily to let you define subroutines that work like built-in functions [...] you can generate new syntax with it [...] We don't want to have subroutines behaving exactly like built-in functions, we don't want to define new syntax / syntactic sugar, so prototypes in gitweb are not needed... and they can have unintended consequences. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09Documentation: cloning to empty directory is allowedAlexander Potashev
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>
2009-05-09Clarify kind of conflict in merge-one-file helperAlex Riesen
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>
2009-05-09git config: clarify --add and --get-colorFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09archive-tar.c: squelch a type mismatch warningJunio C Hamano
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>