summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-05-31Add git-replace to .gitignoreLibravatar David Aguilar1-0/+1
Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31builtin-replace: use "usage_msg_opt" to give better error messagesLibravatar Christian Couder1-6/+12
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31parse-options: add new function "usage_msg_opt"Libravatar Christian Couder3-1/+13
This function can be used instead of "usage_with_options" when you want to print an error message before the usage string. It may be useful because: if (condition) usage_msg_opt("condition is false", usage, opts); is shorter than: if (condition) { fprintf(stderr, "condition is false\n\n"); usage_with_options(usage, opts); } and may be more consistent. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31builtin-replace: teach "git replace" to actually replaceLibravatar Christian Couder2-1/+59
Teach the syntax: "git replace <object> <replacement>", so that "git replace" can now create replace refs. These replace refs will be used by read_sha1_file to substitute <object> with <replacement> for most of the commands. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31Add new "git replace" commandLibravatar Christian Couder5-0/+120
This command can only be used now to list replace refs in "refs/replace/" and to delete them. The option to list replace refs is "-l". The option to delete replace refs is "-d". The behavior should be consistent with how "git tag" and "git branch" are working. The code has been copied from "builtin-tag.c" by Kristian Høgsberg <krh@redhat.com> and Carlos Rica <jasampler@gmail.com> that was itself based on git-tag.sh and mktag.c by Linus Torvalds. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31environment: add global variable to disable replacementLibravatar Christian Couder9-0/+35
This new "read_replace_refs" global variable is set to 1 by default, so that replace refs are used by default. But reachability traversal and packing commands ("cmd_fsck", "cmd_prune", "cmd_pack_objects", "upload_pack", "cmd_unpack_objects") set it to 0, as they must work with the original DAG. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31mktag: call "check_sha1_signature" with the replacement sha1Libravatar Christian Couder2-3/+16
Otherwise we get a "sha1 mismatch" error for replaced objects. Note that I am not sure at all that this is a good change. It may be that we should just refuse to tag a replaced object. But in this case we should probably give a meaningfull error message instead of "sha1 mismatch". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31replace_object: add a test caseLibravatar Christian Couder1-0/+75
In this patch the setup code is very big, but this will be used in test cases that will be added later. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31object: call "check_sha1_signature" with the replacement sha1Libravatar Christian Couder1-4/+5
Otherwise we get a "sha1 mismatch" error for replaced objects. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31sha1_file: add a "read_sha1_file_repl" functionLibravatar Christian Couder2-3/+12
This new function will replace "read_sha1_file". This latter function becoming just a stub to call the former will a NULL "replacement" argument. This new function is needed because sometimes we need to use the replacement sha1. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31replace_object: add mechanism to replace objects found in "refs/replace/"Libravatar Christian Couder4-3/+125
The code implementing this mechanism has been copied more-or-less from the commit graft code. This mechanism is used in "read_sha1_file". sha1 passed to this function that match a ref name in "refs/replace/" are replaced by the sha1 that has been read in the ref. We "die" if the replacement recursion depth is too high or if we can't read the replacement object. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31refs: add a "for_each_replace_ref" functionLibravatar Christian Couder2-0/+6
This is some preparation work for the following patches that are using the "refs/replace/" ref namespace. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31Merge branch 'sb/opt-filename'Libravatar Junio C Hamano52-96/+144
* sb/opt-filename: parse-opts: add OPT_FILENAME and transition builtins parse-opts: prepare for OPT_FILENAME Conflicts: builtin-log.c
2009-05-31Merge branch 'jc/solaris-0811'Libravatar Junio C Hamano2-1/+5
* jc/solaris-0811: OpenSolaris 200811 (SunOS 5.11) does not want OLD_ICONV Teach Solaris that _XOPEN_SOURCE=600 really menas XPG6
2009-05-31Merge branch 'sb/show-branch-parse-options'Libravatar Junio C Hamano3-71/+84
* sb/show-branch-parse-options: show-branch: migrate to parse-options API parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's Conflicts: parse-options.h
2009-05-31Merge branch 'mm/apply-double-slash'Libravatar Junio C Hamano1-6/+20
* mm/apply-double-slash: apply: handle filenames with double slashes better
2009-05-31Merge branch 'sb/format-patch-parseopt'Libravatar Junio C Hamano1-100/+160
* sb/format-patch-parseopt: format-patch: migrate to parse-options API Conflicts: builtin-log.c
2009-05-31Merge branch 'jc/mktree'Libravatar Junio C Hamano7-135/+280
* jc/mktree: mktree: validate entry type in input mktree --batch: build more than one tree object mktree --missing: updated usage message and man page mktree --missing: allow missing objects t1010: add mktree test mktree: do not barf on a submodule commit builtin-mktree.c: use a helper function to handle one line of input mktree: use parse-options build-in git-mktree
2009-05-31Merge branch 'ew/svn-test-and-old-i18n'Libravatar Junio C Hamano17-93/+91
* ew/svn-test-and-old-i18n: t8005: fix typo, it's ISO-8859-5, not KOI8-R t8005: convert CP1251 character set to ISO8859-5 t8005: use more portable character encoding names t5100: use ancient encoding syntax for backwards compatibility t9301: use ISO8859-1 rather than ISO-8859-1 t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility t3901: avoid negation on right hand side of '|' builtin-mailinfo.c: use "ISO8859-1" instead of "latin1" as fallback encoding builtin-mailinfo.c: compare character encodings case insensitively Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility t3900: use ancient iconv names for backward compatibility
2009-05-31Merge branch 'mw/send-email'Libravatar Junio C Hamano2-20/+27
* mw/send-email: send-email: Remove superfluous `my $editor = ...' send-email: 'References:' should only reference what is sent send-email: Handle "GIT:" rather than "GIT: " during --compose Docs: send-email: --smtp-server-port can take symbolic ports Docs: send-email: Refer to CONFIGURATION section for sendemail.multiedit Docs: send-email: Put options back into alphabetical order
2009-05-31Merge branch 'cc/bisect' (early part)Libravatar Junio C Hamano4-55/+59
* 'cc/bisect' (early part): bisect: check ancestors without forking a "git rev-list" process commit: add function to unparse a commit and its parents bisect: rework some rev related functions to make them more reusable
2009-05-31git-add: no need for -f when resolving a conflict in already tracked pathLibravatar Jeff King2-1/+13
When a path F that matches ignore pattern has a conflict, "git add F" insisted the -f option be given, which did not make sense. It would have required -f when the path was originally added, but when resolving a conflict, it already is tracked. So this should work (and does): $ echo file >.gitignore $ echo content >file $ git add -f file ;# need -f because we are adding new path $ echo more content >>file $ git add file ;# don't need -f; it is not actually an "other" file This is handled under the hood by the COLLECT_IGNORED option to read_directory. When that code finds an ignored file, it checks the index to make sure it is not actually a tracked file. However, the test it uses does not take into account unmerged entries, and considers them to still be ignored. "git ls-files" uses a more elaborate test and gets the right answer and the same test should be used here. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31config.txt: document add.ignore-errorsLibravatar Stephen Boyd1-0/+5
Use the description of "--ignore-errors" from git-add.txt as inspiration. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31bash: remove always true if statement from __git_ps1()Libravatar SZEDER Gábor1-6/+4
The recent commits 8763dbb1 (completion: fix PS1 display during a merge on detached HEAD, 2009-05-16), ff790b6a (completion: simplify "current branch" in __git_ps1(), 2009-05-10), and d7107ca6 (completion: fix PS1 display during an AM on detached HEAD, 2009-05-26) ensure that the branch name in __git_ps1() is always set to something sensible. Therefore, the condition for checking the non-empty branch name is always fulfilled, and can be removed. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31git-apply(1): Clarify that one can select where to apply the patchLibravatar Björn Steinbrink1-1/+1
The patch can be applied to the work tree, the index or both, but the short description made it look like it's always applied to both. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31http-push: reuse existing is_null_refLibravatar Clemens Buchacher1-16/+5
Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-30t9139 uses ancient, backwards-compatible iconv namesLibravatar Eric Wong17-93/+91
This resolves a semantic conflicts early to work with 5ae93df (t3900: use ancient iconv names for backward compatibility, 2009-05-18). Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-30Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano2-3/+61
* git://git.bogomips.org/git-svn: git-svn: refuse to dcommit non-UTF-8 messages
2009-05-30Documentation: teach stash/pop workflow instead of stash/applyLibravatar Thomas Rast2-16/+18
Recent discussion on the list showed some comments in favour of a stash/pop workflow: http://marc.info/?l=git&m=124234911423358&w=2 http://marc.info/?l=git&m=124235348327711&w=2 Change the stash documentation and examples to document pop in its own right (and apply in terms of pop), and use stash/pop in the examples. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-29Merge branch 'sb/maint-1.6.2-opt-filename-fix'Libravatar Junio C Hamano6-0/+93
* sb/maint-1.6.2-opt-filename-fix: apply, fmt-merge-msg: use relative filenames commit: -F overrides -t
2009-05-29Merge branch 'jc/maint-add-p-coalesce-fix'Libravatar Junio C Hamano2-1/+133
* jc/maint-add-p-coalesce-fix: t3701: ensure correctly set up repository after skipped tests Revert "git-add--interactive: remove hunk coalescing" Splitting a hunk that adds a line at the top fails in "add -p"
2009-05-29Merge branch 'rs/maint-grep-word-regexp-fix'Libravatar Junio C Hamano2-1/+9
* rs/maint-grep-word-regexp-fix: grep: fix word-regexp at the beginning of lines
2009-05-29t9120: don't expect failure with SVN_HTTPD_PORT unsetLibravatar Stephen Boyd1-11/+6
The test still passes when SVN_HTTPD_PORT is not set. Futhermore, t9115 and t9118 don't check if SVN_HTTPD_PORT is set even though they both use start_httpd() from lib-git-svn.sh. Admittedly, the test is not very meaningful without SVN_HTTPD_PORT, as commit f5530b (support for funky branch and project names over HTTP(S) 2007-11-11) states that the URI escaping is only done over HTTP(S). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-28Merge branch 'maint'Libravatar Junio C Hamano2-4/+14
* maint: fix segfault showing an empty remote
2009-05-28git-svn: refuse to dcommit non-UTF-8 messagesLibravatar Eric Wong2-3/+61
...without i18n.commitencoding set in the config. SVN tries to store all commit messages in UTF-8, however it is up to the job of the clients to enforce this rule. SVN servers themselves do not always enforce this; allowing clients to commit malformed UTF-8 messages and break repositories. So git-svn will enforce this and tell the user to set i18n.commitencoding when a git commit is is not in UTF-8. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-05-27fix segfault showing an empty remoteLibravatar Clemens Buchacher2-4/+14
In case of an empty list, the search for its tail caused a NULL-pointer dereference. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Reported-by: Erik Faye-Lund <kusmabite@googlemail.com> Acked-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27t8005: fix typo, it's ISO-8859-5, not KOI8-RLibravatar Brandon Casey1-1/+1
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27t5500: Modernize test styleLibravatar Stephen Boyd1-127/+149
Code outside of the test harness was emitting "Initializing..." from git-init. Fixup this test to be more modern: - test_expect_object_count() and count_objects() are unused - use grep directly instead of test "..." = $(grep ...) - end the test_expect_success line with a single-quote and put the test on a new line - put as much code inside the test harness as possible - no_strict_count_check is unused and duplicates the test "new object count" - use && whenever possible to catch errors early - use test_tick instead of GIT_AUTHOR_DATE=$sec - remove debugging aid log.txt - use subshells instead of cd-ing around Also merge the pull test into one large test. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27completion: fix PS1 display during an AM on detached HEADLibravatar Junio C Hamano1-13/+11
This is a companion patch to previous 8763dbb (completion: fix PS1 display during a merge on detached HEAD, 2009-05-16). While rebasing or running am on a detached HEAD, the code failed to set $b (branch description) that enables the whole status display business. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-26imap-send: add support for IPv6Libravatar Benjamin Kramer1-3/+51
Add IPv6 support by implementing name resolution with the protocol agnostic getaddrinfo(3) API. The old gethostbyname(3) code is still available when git is compiled with NO_IPV6. Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Update draft release notes to 1.6.4Libravatar Junio C Hamano1-1/+35
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Merge branch 'maint'Libravatar Junio C Hamano6-9/+68
* maint: Prepare for 1.6.3.2 fix cat-file usage message and documentation fetch: report ref storage DF errors more accurately lock_ref: inform callers of unavailable ref merge-options.txt: Clarify merge --squash Conflicts: RelNotes
2009-05-25Prepare for 1.6.3.2Libravatar Junio C Hamano2-1/+52
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Merge branch 'js/maint-no-ln-across-libexec-and-bin' into maintLibravatar Junio C Hamano1-0/+4
* js/maint-no-ln-across-libexec-and-bin: Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Conflicts: Makefile
2009-05-25Merge branch 'lt/maint-diff-reduce-lstat' into maintLibravatar Junio C Hamano2-3/+3
* lt/maint-diff-reduce-lstat: Teach 'git checkout' to preload the index contents Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
2009-05-25Merge branch 'jm/format-patch-no-auto-n-when-k-is-given' into maintLibravatar Junio C Hamano2-1/+20
* jm/format-patch-no-auto-n-when-k-is-given: format-patch let -k override a config-specified format.numbered
2009-05-25Merge branch 'do/maint-merge-recursive-fix' into maintLibravatar Junio C Hamano2-5/+101
* do/maint-merge-recursive-fix: merge-recursive: never leave index unmerged while recursing
2009-05-25Merge branch 'jk/maint-1.6.0-trace-argv' into maintLibravatar Junio C Hamano1-4/+4
* jk/maint-1.6.0-trace-argv: fix GIT_TRACE segfault with shell-quoted aliases Conflicts: alias.c
2009-05-25Merge branch 'np/push-delta' into maintLibravatar Junio C Hamano3-8/+23
* np/push-delta: allow OFS_DELTA objects during a push
2009-05-25Merge branch 'ar/merge-one-file-diag' into maintLibravatar Junio C Hamano0-0/+0
* ar/merge-one-file-diag: Clarify kind of conflict in merge-one-file helper