summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-07-20Teach 'git merge' that some merge strategies no longer existMiklos Vajna
'recur' co-existed with 'recursive' when rewriting it in C, but it no longer available. 'stupid' was also recently removed. "git merge -s confused origin" still includes them in the list of available merge strategies. [jc: this is a squash of two micropatches] Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20cvsserver: Add testsuite for packed refsLars Noschinski
Check that req_update shows refs, even if all refs are packed. Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20refresh-index: fix bitmask assignmentJunio C Hamano
5fdeacb (Teach update-index about --ignore-submodules, 2008-05-14) added a new refresh option flag but did not assign a unique bit for it correctly, and broke "update-index --ignore-missing". This fixes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20git-add --all: documentationJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20git-add --all: testsJunio C Hamano
And here is a small test script that makes sure that: - both modified and new files are included, - removed file is noticed, and - no ignored file is included. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20git-add --all: add all filesJunio C Hamano
People sometimes find that "git add -u && git add ." are 13 keystrokes too many. This reduces it by nine. The support of this has been very low priority for me personally, because I almost never do "git add ." in a directory with already tracked files, and in a new directory, there is no point saying "git add -u". However, for two types of people (that are very different from me), this mode of operation may make sense and there is no reason to leave it unsupported. That is: (1) If you are extremely well disciplined and keep perfect .gitignore, it always is safe to say "git add ."; or (2) If you are extremely undisciplined and do not even know what files you created, and you do not very much care what goes in your history, it does not matter if "git add ." included everything. So there it is, although I suspect I will not use it myself, ever. It will be too much of a change that is against the expectation of the existing users to allow "git commit -a" to include untracked files, and it would be inconsistent if we named this new option "-a", so the short option is "-A". We _might_ want to later add "git commit -A" but that is a separate topic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20builtin-add.c: restructure the code for maintainabilityJunio C Hamano
The implementation of "git add" has four major codepaths that are mutually exclusive: - if "--interactive" or "--patch" is given, spawn "git add--interactive" and exit without doing anything else. Otherwise things are handled internally in this C code; - if "--update" is given, update the modified files and exit without doing anything else; - if "--refresh" is given, do refresh and exit without doing anything else; - otherwise, find the paths that match pathspecs and stage their contents. It led to an unholy mess in the code structure; each of the latter three codepaths has a separate call to read_cache(), even though they are all about "read the current index, update it and write it back", and logically they should read the index once _anyway_. This cleans up the latter three cases by introducing a pair of helper variables: - "add_new_files" is set if we need to scan the working tree for paths that match the pathspec. This variable is false for "--update" and "--refresh", because they only work on already tracked files. - "require_pathspec" is set if the user must give at least one pathspec. "--update" does not need it but all the other cases do. This is in preparation for introducing a new option "--all", that does the equivalent of "git add -u && git add ." (aka "addremove"). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Getting closer to 1.6.0-rc0Junio C Hamano
Update the links to "stale" versions of documentation to link to 1.5.6.4 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19git am --abortNanako Shiraishi
After failing to apply patches in the middle of a series, "git am --abort" lets you go back to the original commit. [jc: doc/help update from Olivier, and fixups for "am -3" squashed in] Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Olivier Marin <dkr@freesurf.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Merge branch 'maint'Junio C Hamano
* maint: GIT 1.5.6.4 builtin-rm: fix index lock file path http-fetch: do not SEGV after fetching a bad pack idx file rev-list: honor --quiet option api-run-command.txt: typofix
2008-07-19Support gitlinks in fast-import.Alexander Gavrilov
Currently fast-import/export cannot be used for repositories with submodules. This patch extends the relevant programs to make them correctly process gitlinks. Links can be represented by two forms of the Modify command: M 160000 SHA1 some/path which sets the link target explicitly, or M 160000 :mark some/path where the mark refers to a commit. The latter form can be used by importing tools to build all submodules simultaneously in one physical repository, and then simply fetch them apart. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19.mailmap updateJunio C Hamano
A few people sent in patches under slightly different spelling recently. Hopefully this catches most of them if not all (with help from Dscho). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Documentation/git-merge.txt: Partial rewrite of How Merge WorksPetr Baudis
The git-merge documentation's "HOW MERGE WORKS" section is confusingly composed and actually omits the most interesting part, the merging of the arguments into HEAD itself, surprisingly not actually mentioning the fast-forward merge anywhere. This patch replaces the "[NOTE]" screenful of highly technical details by a single sentence summing up the interesting information, and instead explains how are the arguments compared with HEAD and the three possible inclusion states that are named "Already up-to-date", "Fast-forward" and "True merge". It also makes it clear that the rest of the section talks only about the true merge situation, and slightly expands the talk on solving conflicts. Junio initiated the removal of the Note screenful altogether and offered many stylistical fixes. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19archive: remove unused headersRené Scharfe
Remove obsolete #includes. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19archive: make zip compression level independent from core gitRené Scharfe
zlib_compression_level is the compression level used for git's object store. It's 1 by default, which is the fastest setting. This variable is also used as the default compression level for ZIP archives created by git archive. For archives, however, zlib's own default of 6 is more appropriate, as it's favouring small size over speed -- archive creation is not that performance critical most of the time. This patch makes git archive independent from git's internal compression level setting. It affects invocations of git archive without explicitly specified compression level option, only. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Documentation: How to ignore local changes in tracked filesPetr Baudis
This patch explains more carefully that `.gitignore` concerns only untracked files and refers the reader to git update-index --assume-unchanged in the need of ignoring uncommitted changes in already tracked files. The description of this option is lifted to a more "porcelainish" level and explains the caveats of this usecase. Whether feasible or not, I believe adding this functionality to the porcelain is out of the scope of this patch. (And I personally think that referring to the plumbing in the case of such a special usage is fine.) This is currently probably one of the top FAQs at #git and the --assume-unchanged switch is not widely known; gitignore(5) is the first place where people are likely to look for it. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Documentation/git-submodule.txt: Further clarify the descriptionPetr Baudis
This patch rewrites the general description yet again, first clarifying the high-level concept, mentioning the difference to remotes and using the subtree merge strategy, then getting to the details about tree entries and .gitmodules file. The patch also makes few smallar grammar fixups within the rest of the description and clarifies how does 'init' relate to 'update --init'. Cc: Heikki Orsila <shdl@zakalwe.fi> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Add ANSI control code emulation for the Windows consolePeter Harris
This adds only the minimum necessary to keep git pull/merge's diffstat from wrapping. Notably absent is support for the K (erase) operation, and support for POSIX write. Signed-off-by: Peter Harris <git@peter.is-a-geek.org> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19builtin-clone: rewrite guess_dir_name()Johannes Sixt
The function has to do three small and independent tasks, but all of them were crammed into a single loop. This rewrites the function entirely by unrolling these tasks. We also now use is_dir_sep(c) instead of c == '/' to increase portability. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Teach lookup_prog not to select directoriesEric Raible
Without this simple fix "git gui" in the git source directory finds the git-gui directory instead of the tcl script in /usr/bin. Signed-off-by: Eric Raible <raible@gmail.com> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19testsuite for cvs co -cFabian Emmes
Check that all branches are displayed. Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de> Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19cvsserver: Add cvs co -c supportLars Noschinski
Implement cvs checkout's -c option by returning a list of all "modules". This is more useful than displaying a perl warning if -c is given. Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19cvsserver: Add support for packed refsLars Noschinski
req_update still parses /refs/heads manually. Replace this by a call to show-ref. Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Testsuite: Unset CVS_SERVERFabian Emmes
The CVS_SERVER environment variable can cause some of the cvsimport tests to fail. So unset this variable at the beginning of the test script. Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de> Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19Link git-shell only to a subset of libgit.aStephan Beyer
Commit 5b8e6f85 introduced stubs for three functions that make no sense for git-shell. But those stubs defined libgit.a functions a second time so that a linker can complain. Now git-shell is only linked to a subset of libgit.a. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19t9001 (send-email): Do not use hardcoded /bin/sh in testJunio C Hamano
Scriptlets used form inside this test began with hardcoded "#!/bin/sh". By setting SHELL_PATH the user is already telling us that what the vendor has in /bin/sh isn't POSIX enough, and we really should try to honor that request. Originally noticed by SungHyun Nam who later tested this patch and verified that it fixes the issue on Solaris 9. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19GIT 1.5.6.4v1.5.6.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19builtin-rm: fix index lock file pathOlivier Marin
When hold_locked_index() is called with a relative git_dir and you are outside the work tree, the lock file become relative to the current directory. So when later setup_work_tree() change the current directory it breaks lock file path and commit_locked_index() fails. This patch move index locking code after setup_work_tree() call to make lock file relative to the working tree as it should be and add a test case. Noticed by Nick Andrew. Signed-off-by: Olivier Marin <dkr@freesurf.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-18Merge branch 'sp/maint-index-pack' into maintJunio C Hamano
* sp/maint-index-pack: index-pack: Honor core.deltaBaseCacheLimit when resolving deltas index-pack: Track the object_entry that creates each base_data index-pack: Chain the struct base_data on the stack for traversal index-pack: Refactor base arguments of resolve_delta into a struct
2008-07-18http-fetch: do not SEGV after fetching a bad pack idx fileJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-18rev-list: honor --quiet optionJunio C Hamano
Nick Andrew noticed that rev-list lets --quiet option to be parsed by underlying diff_options parser but did not pick up the result. This resulted in --quiet option to become effectively a no-op. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-18builtin-remote.c: fix earlier "skip_prefix()" conversionJunio C Hamano
The original code relied on an insane definition of skip_prefix() that returned an empty string for a NULL input and returned the original if the given "prefix" is not a prefix at all (it would have been justifiable if it were called "come_up_with_a_short_name_to_report_ref()" or something, though). In any case, when we replaced it with a more saner definition of the function whose behaviour is true to its name, its callers needed to be adjusted but the conversion missed one call site. This introduces a helper function "abbrev_ref()" whose purpose is to get a full refname and its possible prefix and to strip the prefix part if it matches, or refname itself in full if it doesn't. This makes the callers easier to read again. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-18api-run-command.txt: typofixStephan Beyer
Replace "run_command_v_opt_dir" by "run_command_v_opt_cd". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17Documentation/RelNotes-1.6.0.txt: Expand on the incompatible packfilesPetr Baudis
Note that v1.4.4.5 supports pack index v2, and describe how to keep your repositories backwards-compatible, shall you need to. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17rerere.autoupdate: change the message when autoupdate is in effectJunio C Hamano
This changes the message rerere issues after reusing previous conflict resolution from "Resolved" to "Staged" when autoupdate option is in effect. It is envisioned that in practice, some auto resolitions are trickier and iffier than others, and we would want to add a feature to mark individual resolutions as "this is ok to autoupdate" or "do not autoupdate the result using this resolution even when rerere.autoupdate is in effect" in the future. When that happens, these messages will make the distinction clearer. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17mailinfo: off-by-one fix for [PATCH (foobar)] removal from Subject: lineJunio C Hamano
A patch title "[PATCH] 1" was sanitized by the original code by stripping the "[PATCH]" from the front, but after the conversion to use strbuf this behaviour was broken due to a counting error. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17read-cache.c: typofixJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17Update draft release notes for 1.6.0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17Reword "your branch has diverged..." lines to reduce line lengthAvery Pennarun
The message length depends on the length of the branch name. In my case, the branch name "origin/add-chickens2" put the first line of the "your branch has diverged" message over 80 characters, which triggered "less -FS" to not exit automatically as expected. This patch rewords the messages to make the lines generally shorter, so that you'd need a significantly longer branch name to trigger the problem. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17Merge branch 'mv/dashless'Junio C Hamano
* mv/dashless: make remove-dashes: apply to scripts and programs as well, not just to builtins git-bisect: use dash-less form on git bisect log t1007-hash-object.sh: use quotes for the test description t0001-init.sh: change confusing directory name
2008-07-17Merge branch 'ls/mailinfo'Junio C Hamano
* ls/mailinfo: git-mailinfo: use strbuf's instead of fixed buffers Add some useful functions for strbuf manipulation. Make some strbuf_*() struct strbuf arguments const. Conflicts: builtin-mailinfo.c
2008-07-17Documentation/git-submodule.txt: Add Description sectionPetr Baudis
Figuring out how submodules work conceptually is quite a bumpy ride for a newcomer; the user manual helps (if one knows to actually look into it), but the reference documentation should provide good quick intro as well. This patch attempts to do that, with suggestions from Heikki Orsila. Cc: Heikki Orsila <shdl@zakalwe.fi> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17Merge branch 'sb/dashless'Junio C Hamano
* sb/dashless: Make usage strings dash-less t/: Use "test_must_fail git" instead of "! git" t/test-lib.sh: exit with small negagive int is ok with test_must_fail Conflicts: builtin-blame.c builtin-mailinfo.c builtin-mailsplit.c builtin-shortlog.c git-am.sh t/t4150-am.sh t/t4200-rerere.sh
2008-07-17Merge branch 'rs/archive'Junio C Hamano
* rs/archive: archive: remove extra arguments parsing code archive: unify file attribute handling archive: centralize archive entry writing archive: add baselen member to struct archiver_args add context pointer to read_tree_recursive() archive: remove args member from struct archiver
2008-07-17Merge branch 'ag/blame'Junio C Hamano
* ag/blame: Do not try to detect move/copy for entries below threshold. Avoid rescanning unchanged entries in search for copies.
2008-07-17Merge branch 'rs/rebase-checkout-not-so-quiet'Junio C Hamano
* rs/rebase-checkout-not-so-quiet: git-rebase: report checkout failure Conflicts: git-rebase.sh
2008-07-17Merge branch 'sp/maint-index-pack'Junio C Hamano
* sp/maint-index-pack: index-pack: Honor core.deltaBaseCacheLimit when resolving deltas index-pack: Track the object_entry that creates each base_data index-pack: Chain the struct base_data on the stack for traversal index-pack: Refactor base arguments of resolve_delta into a struct
2008-07-17Merge branch 'maint'Junio C Hamano
* maint: Start preparing 1.5.6.4 release notes git fetch-pack: do not complain about "no common commits" in an empty repo rebase-i: keep old parents when preserving merges t7600-merge: Use test_expect_failure to test option parsing Fix buffer overflow in prepare_attr_stack Fix buffer overflow in git diff Fix buffer overflow in git-grep git-cvsserver: fix call to nonexistant cleanupWorkDir() Documentation/git-cherry-pick.txt et al.: Fix misleading -n description Conflicts: RelNotes
2008-07-16Start preparing 1.5.6.4 release notesJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16git fetch-pack: do not complain about "no common commits" in an empty repoJohannes Schindelin
If the repo is empty, it is obvious that there are no common commits when fetching from _anywhere_. So there is no use in saying it in that case, and it can even be annoying. Therefore suppress the message unilaterally if the repository is empty prior to the fetch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>