summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-01-14fast-import: tag may point to any object typeLibravatar Dmitry Potapov1-5/+5
If you tried to export the official git repository, and then to import it back then git-fast-import would die complaining that "Mark :1 not a commit". Accordingly to a generated crash file, Mark 1 is not a commit but a blob, which is pointed by junio-gpg-pub tag. Because git-tag allows to create such tags, git-fast-import should import them. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-22Prevent git blame from segfaulting on a missing author nameLibravatar David Reiss2-3/+23
The human-readable author and committer name can be missing from commits imported from foreign SCM interfaces. Make sure we parse the "author" and "committer" line a bit more leniently and avoid segfaulting by assuming the name always exists. Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-19rebase -i: abort cleanly if the editor fails to launchLibravatar Björn Gustavsson1-1/+1
If the user's configured editor is emacsclient, the editor will fail to launch if emacs is not running and the git command that tried to lanuch the editor will abort. For most commands, all you have to do is to start emacs and repeat the command. The "git rebase -i" command, however, aborts without cleaning the "$GIT_DIR/rebase-merge" directory if it fails to launch the editor, so you'll need to do "git rebase --abort" before repeating the rebase command. Change "git rebase -i" to terminate using "die_abort" (instead of with "die") if the initial launch of the editor fails. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-17technical-docs: document hash APILibravatar Stephen Boyd1-2/+48
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-17api-strbuf.txt: fix typos and document launch_editor()Libravatar Stephen Boyd1-2/+8
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16Git 1.6.5.7Libravatar Junio C Hamano4-3/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16worktree: don't segfault with an absolute pathspec without a work treeLibravatar Junio C Hamano2-2/+20
If a command is run with an absolute path as a pathspec inside a bare repository, e.g. "rev-list HEAD -- /home", the code tried to run strlen() on NULL, which is the result of get_git_work_tree(), and segfaulted. It should just fail instead. Currently the function returns NULL even inside .git/ in a repository with a work tree, but that is a separate issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-16ignore unknown color configurationLibravatar Jeff King4-3/+26
When parsing the config file, if there is a value that is syntactically correct but unused, we generally ignore it. This lets non-core porcelains store arbitrary information in the config file, and it means that configuration files can be shared between new and old versions of git (the old versions might simply ignore certain configuration). The one exception to this is color configuration; if we encounter a color.{diff,branch,status}.$slot variable, we die if it is not one of the recognized slots (presumably as a safety valve for user misconfiguration). This behavior has existed since 801235c (diff --color: use $GIT_DIR/config, 2006-06-24), but hasn't yet caused a problem. No porcelain has wanted to store extra colors, and we once a color area (like color.diff) has been introduced, we've never changed the set of color slots. However, that changed recently with the addition of color.diff.func. Now a user with color.diff.func in their config can no longer freely switch between v1.6.6 and older versions; the old versions will complain about the existence of the variable. This patch loosens the check to match the rest of git-config; unknown color slots are simply ignored. This doesn't fix this particular problem, as the older version (without this patch) is the problem, but it at least prevents it from happening again in the future. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-15help.autocorrect: do not run a command if the command given is junkLibravatar Johannes Sixt1-2/+5
If a given command is not found, then help.c tries to guess which one the user could have meant. If help.autocorrect is 0 or unset, then a list of suggestions is given as long as the dissimilarity between the given command and the candidates is not excessively high. But if help.autocorrect was non-zero (i.e., a delay after which the command is run automatically), the latter restriction on dissimilarity was not obeyed. In my case, this happened: $ git ..daab02 WARNING: You called a Git command named '..daab02', which does not exist. Continuing under the assumption that you meant 'read-tree' in 4.0 seconds automatically... The patch reuses the similarity limit that is also applied when the list of suggested commands is printed. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-14Illustrate "filter" attribute with an exampleLibravatar Nanako Shiraishi1-0/+19
The example was taken from aa4ed402c9721170fde2e9e43c3825562070e65e (Add 'filter' attribute and external filter driver definition). Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Git 1.6.5.6Libravatar Junio C Hamano4-3/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Fix archive format with -- on the command lineLibravatar Junio C Hamano1-6/+10
Giving --format from the command line, or using output file extention to DWIM the output format, with a pathspec that is disambiguated with an explicit double-dash on the command line, e.g. git archive -o file --format=zip HEAD -- path git archive -o file.zip HEAD -- path didn't work correctly. This was because the code reordered (when one was given) or added (when the format was inferred) a --format argument at the end, effectively making it to "archive HEAD -- path --format=zip", i.e. an extra pathspec that is unlikely to match anything. The command line argument list should always be "options, revs and then paths", and we should set a good example by inserting the --format at the beginning instead. Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10Remove post-upload-hookLibravatar Junio C Hamano4-172/+2
This hook runs after "git fetch" in the repository the objects are fetched from as the user who fetched, and has security implications. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-08Merge branch 'mm/maint-merge-ff-error-message-fix' into maintLibravatar Junio C Hamano3-18/+27
* mm/maint-merge-ff-error-message-fix: builtin-merge: show user-friendly error messages for fast-forward too. merge-recursive: make the error-message generation an extern function Conflicts: merge-recursive.c
2009-12-08Merge branch 'jn/maint-pull-rebase-error-message' into maintLibravatar Junio C Hamano1-15/+33
* jn/maint-pull-rebase-error-message: pull: clarify advice for the unconfigured error case
2009-12-08Merge branch 'jk/maint-add-p-delete-fix' into maintLibravatar Junio C Hamano2-1/+25
* jk/maint-add-p-delete-fix: add-interactive: fix deletion of non-empty files
2009-12-07add-interactive: fix deletion of non-empty filesLibravatar Jeff King2-1/+25
Commit 24ab81a fixed the deletion of empty files, but broke deletion of non-empty files. The approach it took was to factor out the "deleted" line from the patch header into its own hunk, the same way we do for mode changes. However, unlike mode changes, we only showed the special "delete this file" hunk if there were no other hunks. Otherwise, the user would annoyingly be presented with _two_ hunks: one for deleting the file and one for deleting the content. This meant that in the non-empty case, we forgot about the deleted line entirely, and we submitted a bogus patch to git-apply (with "/dev/null" as the destination file, but not marked as a deletion). Instead, this patch combines the file deletion hunk and the content deletion hunk (if there is one) into a single deletion hunk which is either staged or not. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05Git 1.6.5.5Libravatar Junio C Hamano4-5/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05Fix diff -B/--dirstat miscounting of newly added contentsLibravatar Linus Torvalds1-1/+10
What used to happen is that diffcore_count_changes() simply ignored any hashes in the destination that didn't match hashes in the source. EXCEPT if the source hash didn't exist at all, in which case it would count _one_ destination hash that happened to have the "next" hash value. As a consequence, newly added material was often undercounted, making output from --dirstat and "complete rewrite" detection used by -B unrelialble. This changes it so that: - whenever it bypasses a destination hash (because it doesn't match a source), it counts the bytes associated with that as "literal added" - at the end (once we have used up all the source hashes), we do the same thing with the remaining destination hashes. - when hashes do match, and we use the difference in counts as a value, we also use up that destination hash entry (the 'd++'). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05reset: improve worktree safety valvesLibravatar Jeff King2-5/+33
The existing code checked to make sure we were not in a bare repository when doing a hard reset. However, we should take this one step further, and make sure we are in a worktree. Otherwise, we can end up munging files inside of '.git'. Furthermore, we should do the same check for --merge resets, which have the same properties. Actually, a merge reset of HEAD^ would already complain, since further down in the code we want a worktree. However, it is nicer to check up-front; then we are sure we cover all cases ("git reset --merge" would run, even though it wasn't doing anything) and we can give a more specific message. Add tests to t7103 to cover these cases and some missing ones. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05Documentation: Avoid use of xmlto --stringparamLibravatar Todd Zullinger3-11/+23
The --stringparam option is not available on older xmlto versions. Instead, set man.base.url.for.relative.links via a .xsl file. Older docbook versions will ignore this without causing grief to users of older xmlto versions. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-04archive: clarify description of path parameterLibravatar René Scharfe1-2/+3
Mention that path parameters are based on the current working directory. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> -- Documentation/git-archive.txt | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-04rerere: don't segfault on failure to open rr-cacheLibravatar Jeff King1-0/+2
The rr-cache directory should always exist if we are doing garbage collection (earlier code paths check this explicitly), but we may not necessarily succeed in opening it (for example, due to permissions problems). In that case, we should print an error message rather than simply segfaulting. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Prepare for 1.6.5.5Libravatar Junio C Hamano1-0/+44
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Merge branch 'uk/maint-shortlog-encoding' into maintLibravatar Junio C Hamano2-9/+39
* uk/maint-shortlog-encoding: t4201: use ISO8859-1 rather than ISO-8859-1 shortlog: respect commit encoding
2009-12-03Merge branch 'fc/maint-format-patch-pathspec-dashes' into maintLibravatar Junio C Hamano2-1/+7
* fc/maint-format-patch-pathspec-dashes: format-patch: add test for parsing of "--" format-patch: fix parsing of "--" on the command line
2009-12-03Merge branch 'ap/maint-merge-strategy-list-fix' into maintLibravatar Junio C Hamano1-1/+1
* ap/maint-merge-strategy-list-fix: builtin-merge.c: call exclude_cmds() correctly.
2009-12-03Merge branch 'jc/maint-am-keep' into maintLibravatar Junio C Hamano1-5/+6
* jc/maint-am-keep: Remove dead code from "git am"
2009-12-03Merge branch 'rs/work-around-grep-opt-insanity' into maintLibravatar Junio C Hamano9-25/+32
* rs/work-around-grep-opt-insanity: Protect scripted Porcelains from GREP_OPTIONS insanity mergetool--lib: simplify guess_merge_tool()
2009-12-03Merge branch 'rj/maint-cygwin-count-objects' into maintLibravatar Junio C Hamano1-0/+1
* rj/maint-cygwin-count-objects: git-count-objects: Fix a disk-space under-estimate on Cygwin
2009-12-03Merge branch 'mm/maint-hint-failed-merge' into maintLibravatar Junio C Hamano5-3/+32
* mm/maint-hint-failed-merge: user-manual: Document that "git merge" doesn't like uncommited changes. merge-recursive: point the user to commit when file would be overwritten.
2009-12-03Merge branch 'th/maint-remote-update-help-string' into maintLibravatar Junio C Hamano1-1/+1
* th/maint-remote-update-help-string: Update 'git remote update' usage string to match man page.
2009-12-03Merge branch 'rj/maint-t9700' into maintLibravatar Junio C Hamano1-1/+1
* rj/maint-t9700: t9700-perl-git.sh: Fix a test failure on Cygwin
2009-12-03Merge branch 'ls/maint-mailinfo-no-inbody' into maintLibravatar Junio C Hamano16-5/+122
* ls/maint-mailinfo-no-inbody: git am/mailinfo: Don't look at in-body headers when rebasing
2009-12-03Merge branch 'mo/maint-crlf-doc' into maintLibravatar Junio C Hamano1-3/+4
* mo/maint-crlf-doc: core.autocrlf documentation: mention the crlf attribute
2009-12-03Merge branch 'th/remote-usage' into maintLibravatar Junio C Hamano2-21/+52
* th/remote-usage: git remote: Separate usage strings for subcommands
2009-12-03Merge branch 'pb/maint-use-custom-perl' into maintLibravatar Junio C Hamano4-4/+5
* pb/maint-use-custom-perl: Make sure $PERL_PATH is defined when the test suite is run.
2009-12-03Merge branch 'mm/config-pathname-tilde-expand' into maintLibravatar Junio C Hamano5-37/+69
* mm/config-pathname-tilde-expand: Documentation: avoid xmlto input error expand_user_path: expand ~ to $HOME, not to the actual homedir. Expand ~ and ~user in core.excludesfile, commit.template
2009-12-03Merge branch 'bc/grep-i-F' into maintLibravatar Junio C Hamano4-6/+27
* bc/grep-i-F: grep: Allow case insensitive search of fixed-strings
2009-12-03Merge branch 'jk/maint-break-rename-reduce-memory' into maintLibravatar Junio C Hamano2-3/+10
* jk/maint-break-rename-reduce-memory: diffcore-rename: reduce memory footprint by freeing blob data early diffcore-break: save cnt_data for other phases diffcore-break: free filespec data as we go
2009-12-03Merge branch 'rj/maint-simplify-cygwin-makefile' into maintLibravatar Junio C Hamano1-4/+2
* rj/maint-simplify-cygwin-makefile: Makefile: merge two Cygwin configuration sections into one
2009-12-03Merge branch 'rg/doc-workflow' into maintLibravatar Junio C Hamano1-0/+115
* rg/doc-workflow: Add branch management for releases to gitworkflows
2009-12-03Merge branch 'np/maint-sideband-favor-status' into maintLibravatar Junio C Hamano2-23/+23
* np/maint-sideband-favor-status: give priority to progress messages
2009-12-03Documentation: xmlto 0.0.18 does not know --stringparamLibravatar Junio C Hamano1-0/+7
Newer DocBook stylesheets want man.base.url.for.relative.links parameter set when formatting manpages with external references to turn them into full URLs, and leave a helpful "you should set this parameter" message in the output. Earlier we added the MAN_BASE_URL make variable to specify the value for it. When MAN_BASE_URL is not given, it ought to be safe to set the parameter to empty; it would result in an empty leading path for older stylesheets that ignore the parameter, and newer ones would produce the same "relative URL" without the message. Unfortunately, older xmlto (at least version 0.0.18 released in early 2004 that comes with RHEL/CentOS 5) does not understand the --stringparam command line option, so we cannot add the parameter definition unconditionally to the command line. Work it around by passing the parameter only when set. If you do not have a suitable URL prefix, you can pass a quoted empty string to it, like so: $ make MAN_BASE_URL='""' Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03t4201: use ISO8859-1 rather than ISO-8859-1Libravatar Brandon Casey1-2/+2
Some ancient platforms do not have an extensive list of alternate names for character encodings. For example, Solaris 7 and IRIX 6.5 do not know that ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use the older name. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03pull: clarify advice for the unconfigured error caseLibravatar Jan Krüger1-15/+33
When pull --rebase fails because it cannot find what branch to merge against, the error message implies we are trying to merge. Say "rebase against" instead of "merge with" to avoid confusion. The configuration suggested to remedy the situation uses a confusing syntax, with variables specified in the dotted form accepted by 'git config' but separated from their values by the '=' delimiter used by config files. Since the user will have to edit this output anyway, it is more helpful to provide a config file snippet to paste into an editor and modify. Signed-off-by: Jan Krüger <jk@jk.gs> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Git 1.6.5.4Libravatar Junio C Hamano2-2/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Unconditionally set man.base.url.for.relative.linksLibravatar Junio C Hamano1-2/+5
Even setting it to empty is better than leaving it unset as it prevents the warning cruft from appearing in the output. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03Documentation/Makefile: allow man.base.url.for.relative.link to be set from MakeLibravatar Junio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <junio@kernel.org>
2009-12-02Prepare for 1.6.5.4Libravatar Junio C Hamano2-1/+33
Signed-off-by: Junio C Hamano <gitster@pobox.com>