summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-09-10config.txt: fix placement of diff.noprefixLibravatar Mark Lodato1-2/+3
In git-config(1), diff.noprefix was placed in between diff.mnemonicprefix and the list of mnemonic prefixes, which is obviously incorrect and very confusing to readers. Now, it is located after the end of the explanation of mnemonicprefix, which makes much more sense. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09xdiff-interface.c: always trim trailing space from xfuncname matchesLibravatar Brandon Casey1-3/+2
Generally, trailing space is removed from the string matched by the xfuncname patterns. The exception is when the matched string exceeds the length of the fixed-size buffer that it will be copied in to. But, a string that exceeds the buffer can still contain trailing space in the portion of the string that will be copied into the buffer. So, simplify this code slightly, and just perform the trailing space removal always. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-09diff.c: call regfree to free memory allocated by regcomp when necessaryLibravatar Brandon Casey1-1/+4
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-06revert: Fix trivial comment style issueLibravatar Elijah Newren1-1/+0
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-06cache_tree_free: Fix small memory leakLibravatar Elijah Newren1-1/+3
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-06Merge branch 'xx/trivial' into maintLibravatar Junio C Hamano3-11/+11
* xx/trivial: tag.c: whitespace breakages fix Fix whitespace issue in object.c t5505: add missing &&
2010-09-05tag.c: whitespace breakages fixLibravatar Junio C Hamano1-9/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-05Fix whitespace issue in object.cLibravatar Jared Hance1-4/+4
Change some expanded tabs (spaces) to tabs in object.c. Signed-off-by: Jared Hance <jaredhance@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-05t5505: add missing &&Libravatar Jens Lehmann1-1/+1
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-03Git 1.7.2.3Libravatar Junio C Hamano3-9/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-03builtin/merge_recursive.c: Add an usage string and make use of it.Libravatar Thiago Farina1-1/+4
This improves the usage output by adding builtin_merge_recursive_usage string that follows the same pattern used by the other builtin commands. The previous output for git merger-recursive was: usage: merge-recursive <base>... -- <head> <remote> ... Now the output is: usage: git merge-recursive <base>... -- <head> <remote> ... Since cmd_merge_recursive is used to handle four different commands we need the %s in the usage string, so the following example: $ git merge-subtree -h Will output: usage: git merge-subtree <base>... -- <head> <remote> ... Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-01Prepare for 1.7.2.3Libravatar Junio C Hamano2-1/+47
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-01Merge branch 'gp/pack-refs-remove-empty-dirs' into maintLibravatar Junio C Hamano2-0/+38
* gp/pack-refs-remove-empty-dirs: pack-refs: remove newly empty directories
2010-09-01Merge branch 'sg/rerere-gc-old-still-used' into maintLibravatar Junio C Hamano4-11/+41
* sg/rerere-gc-old-still-used: rerere: fix overeager gc mingw_utime(): handle NULL times parameter
2010-09-01Merge branch 'np/maint-huge-delta-generation' into maintLibravatar Junio C Hamano1-1/+8
* np/maint-huge-delta-generation: fix >4GiB source delta assertion failure
2010-09-01Merge branch 'dj/fetch-tagopt' into maintLibravatar Junio C Hamano4-7/+56
* dj/fetch-tagopt: fetch: allow command line --tags to override config
2010-09-01Merge branch 'da/fix-submodule-sync-superproject-config' into maintLibravatar Junio C Hamano2-1/+5
* da/fix-submodule-sync-superproject-config: submodule sync: Update "submodule.<name>.url"
2010-09-01Merge branch 'en/rebase-against-rebase-fix' into maintLibravatar Junio C Hamano2-0/+71
* en/rebase-against-rebase-fix: pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches t5520-pull: Add testcases showing spurious conflicts from git pull --rebase
2010-08-29Merge branch 'maint-1.7.1' into maintLibravatar Junio C Hamano1-5/+5
* maint-1.7.1: t0003: add missing && at end of lines
2010-08-29t0003: add missing && at end of linesLibravatar Matthieu Moy1-5/+5
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-26for-each-ref: fix objectname:short bugLibravatar Jay Soffian1-1/+2
When objectname:short was introduced, it forgot to copy the result of find_unique_abbrev. Because the result of find_unique_abbrev is a pointer to static buffer, this resulted in the same value being substituted in for each ref. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-25tree-walk: Correct bitrotted comment about tree_entry()Libravatar Elijah Newren1-1/+4
There was a code comment that referred to the "above two functions" but over time the functions immediately preceding the comment have changed. Just mention the relevant functions by name. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-25Fix 'git log' early pager startup error caseLibravatar Linus Torvalds2-9/+4
We start the pager too early for several git commands, which results in the errors sometimes going to the pager rather than show up as errors. This is often hidden by the fact that we pass in '-X' to less by default, which causes 'less' to exit for small output, but if you do export LESS=-S you can then clearly see the problem by doing git log --prretty which shows the error message ("fatal: unrecognized argument: --prretty") being sent to the pager. This happens for pretty much all git commands that use USE_PAGER, and then check arguments separately. But "git diff" does it too early too (even though it does an explicit setup_pager() call) This only fixes it for the trivial "git log" family case. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-24parse-options: clarify PARSE_OPT_NOARG descriptionLibravatar Jonathan Nieder1-1/+1
Here "takes no argument" means "does not take an argument". The latter phrasing might make it clearer that PARSE_OPT_NOARG does not make an option with an argument that can optionally be left off. Noticed-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-24t3302 (notes): Port to SolarisLibravatar Jonathan Nieder1-1/+1
The time_notes script, which uses POSIX shell features, is currently sometimes run with a non-POSIX /bin/sh. Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-22Typos in code comments, an error message, documentationLibravatar Ralf Wildenhues17-26/+26
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-21fix >4GiB source delta assertion failureLibravatar Nicolas Pitre1-1/+8
When people try insane things such as delta-compressing 4GiB files, they get this assertion: diff-delta.c:285: create_delta_index: Assertion `packed_entry - (struct index_entry *)mem == entries' failed. This happens because: 1) the 'entries' variable is an unsigned int 2) it is assigned with entries = (bufsize - 1) / RABIN_WINDOW (that itself is not a problem unless bufsize > 4G * RABIN_WINDOW) 3) the buffer is indexed from top to bottom starting at "data = buffer + entries * RABIN_WINDOW" and the multiplication here does indeed overflows, making the resulting top of the buffer much lower than expected. This makes the number of actually produced index entries smaller than what was computed initially, hence the assertion. Furthermore, the current delta encoding format cannot represent offsets into a reference buffer with more than 32 bits anyway. So let's just limit the number of entries to what the delta format can encode. Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-21t7403: add missing &&'sLibravatar Jens Lehmann1-2/+2
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-21Tell ignore file about generate files in /gitweb/staticLibravatar Mark Rada1-1/+1
Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-20Merge branch 'jc/maint-follow-rename-fix' into maintLibravatar Junio C Hamano5-18/+41
* jc/maint-follow-rename-fix: log: test for regression introduced in v1.7.2-rc0~103^2~2 diff --follow: do call diffcore_std() as necessary diff --follow: do not waste cycles while recursing
2010-08-20Merge branch 'jn/maint-plug-leak' into maintLibravatar Junio C Hamano3-3/+13
* jn/maint-plug-leak: write-tree: Avoid leak when index refers to an invalid object read-tree: stop leaking tree objects core: Stop leaking ondisk_cache_entrys
2010-08-20Merge branch 'jn/fix-abbrev' into maintLibravatar Junio C Hamano5-4/+3
* jn/fix-abbrev: examples/commit: use --abbrev for commit summary checkout, commit: remove confusing assignments to rev.abbrev archive: abbreviate substituted commit ids again
2010-08-20Merge branch 'vs/doc-spell' into maintLibravatar Junio C Hamano9-16/+18
* vs/doc-spell: Documentation: spelling fixes
2010-08-20Merge branch 'jn/rebase-rename-am' into maintLibravatar Junio C Hamano5-202/+345
* jn/rebase-rename-am: rebase: protect against diff.renames configuration t3400 (rebase): whitespace cleanup Teach "apply --index-info" to handle rename patches t4150 (am): futureproof against failing tests t4150 (am): style fix
2010-08-20Merge branch 'jn/doc-pull' into maintLibravatar Junio C Hamano1-11/+54
* jn/doc-pull: Documentation: flesh out “git pull” description
2010-08-20Merge branch 'bc/use-more-hardlinks-in-install' into maintLibravatar Junio C Hamano1-3/+12
* bc/use-more-hardlinks-in-install: Makefile: make hard/symbolic links for non-builtins too Makefile: link builtins residing in bin directory to main git binary too
2010-08-20Merge branch 'tr/rfc-reset-doc' into maintLibravatar Junio C Hamano1-169/+178
* tr/rfc-reset-doc: Documentation/reset: move "undo permanently" example behind "make topic" Documentation/reset: reorder examples to match description Documentation/reset: promote 'examples' one section up Documentation/reset: separate options by mode Documentation/git-reset: reorder modes for soft-mixed-hard progression
2010-08-20xmalloc: include size in the failure messageLibravatar Matthieu Moy1-1/+2
Out-of-memory errors can either be actual lack of memory, or bugs (like code trying to call xmalloc(-1) by mistake). A little more information may help tracking bugs reported by users. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-19Git 1.7.2.2Libravatar Junio C Hamano4-3/+26
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-19Merge branch 'tr/xsize-bits' into maintLibravatar Junio C Hamano1-0/+2
* tr/xsize-bits: xsize_t: check whether we lose bits
2010-08-19Merge branch 'jc/sha1-name-find-fix' into maintLibravatar Junio C Hamano1-10/+11
* jc/sha1-name-find-fix: sha1_name.c: fix parsing of ":/token" syntax Conflicts: sha1_name.c
2010-08-18Merge branch 'sp/fix-smart-http-deadlock-on-error' into maintLibravatar Junio C Hamano1-2/+3
* sp/fix-smart-http-deadlock-on-error: smart-http: Don't deadlock on server failure
2010-08-18submodule sync: Update "submodule.<name>.url"Libravatar David Aguilar2-1/+5
When "git submodule sync" synchronizes the repository URLs it only updates submodules' .git/config. However, the old URLs still exist in the super-project's .git/config. Update the super-project's configuration so that commands such as "git submodule update" use the URLs from .gitmodules. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-15log: test for regression introduced in v1.7.2-rc0~103^2~2Libravatar Ævar Arnfjörð Bjarmason1-1/+13
Add a regression test for the git log -M --follow $diff_option bug introduced in v1.7.2-rc0~103^2~2, $diff_option being diff related options like -p, --stat, --name-only etc. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-14fetch: allow command line --tags to override configLibravatar Daniel Johnson4-7/+56
Originally, if remote.<name>.tagopt was set, the --tags and option would have no effect when given to git fetch. So if tagopt="--no-tags" git fetch --tags would not actually fetch tags. This patch changes this behavior to only follow what is written in the config if there is no option passed by the command line. Signed-off-by: Daniel Johnson <ComputerDruid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-13diff --follow: do call diffcore_std() as necessaryLibravatar Junio C Hamano4-16/+27
Usually, diff frontends populate the output queue with filepairs without any rename information and call diffcore_std() to sort the renames out. When --follow is in effect, however, diff-tree family of frontend has a hack that looks like this: diff-tree frontend -> diff_tree_sha1() . populate diff_queued_diff . if --follow is in effect and there is only one change that creates the target path, then -> try_to_follow_renames() -> diff_tree_sha1() with no pathspec but with -C -> diffcore_std() to find renames . if rename is found, tweak diff_queued_diff and put a single filepair that records the found rename there -> diffcore_std() . tweak elements on diff_queued_diff by - rename detection - path ordering - pickaxe filtering We need to skip parts of the second call to diffcore_std() that is related to rename detection, and do so only when try_to_follow_renames() did find a rename. Earlier 1da6175 (Make diffcore_std only can run once before a diff_flush, 2010-05-06) tried to deal with this issue incorrectly; it unconditionally disabled any second call to diffcore_std(). This hopefully fixes the breakage. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-13diff --follow: do not waste cycles while recursingLibravatar Junio C Hamano1-1/+1
The "--follow" logic is called from diff_tree_sha1() function, but the input trees to diff_tree_sha1() are not necessarily the top-level trees (compare_tree_entry() calls it while it recursively descends into subtrees). When a newly created path lives in somewhere deep in the source hierarchy, e.g. "platform/", but the rename source is in a totally different place in the destination hierarchy, e.g. "lang-api/src/com/...", running "try_to_find_renames()" while base is set to "platform/" is a wasted call. We only need to run the rename following at the very top level. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-12pull --rebase: Avoid spurious conflicts and reapplying unnecessary patchesLibravatar Elijah Newren2-2/+11
Prior to c85c792 (pull --rebase: be cleverer with rebased upstream branches, 2008-01-26), pull --rebase would run git rebase $merge_head which resulted in a call to git format-patch ... --ignore-if-in-upstream $merge_head..$cur_branch This resulted in patches from $merge_head..$cur_branch being applied, as long as they did not already exist in $cur_branch..$merge_head. Unfortunately, when upstream is rebased, $merge_head..$cur_branch also refers to "old" commits that have already been rebased upstream, meaning that many patches that were already fixed upstream would be reapplied. This could result in many spurious conflicts, as well as reintroduce patches that were intentionally dropped upstream. So the algorithm was changed in c85c792 (pull --rebase: be cleverer with rebased upstream branches, 2008-01-26) and d44e712 (pull: support rebased upstream + fetch + pull --rebase, 2009-07-19). Defining $old_remote_ref to be the most recent entry in the reflog for @{upstream} that is an ancestor of $cur_branch, pull --rebase was changed to run git rebase --onto $merge_head $old_remote_ref which results in a call to git format-patch ... --ignore-if-in-upstream $old_remote_ref..$cur_branch The whole point of this change was to reduce the number of commits being reapplied, by avoiding commits that upstream already has or had. In the rebased upstream case, this change achieved that purpose. It is worth noting, though, that since $old_remote_ref is always an ancestor of $cur_branch (by its definition), format-patch will not know what upstream is and thus will not be able to determine if any patches are already upstream; they will all be reapplied. In the non-rebased upstream case, this new form is usually the same as the original code but in some cases $old_remote_ref can be an ancestor of $(git merge-base $merge_head $cur_branch) meaning that instead of avoiding reapplying commits that upstream already has, it actually includes more such commits. Combined with the fact that format-patch can no longer detect commits that are already upstream (since it is no longer told what upstream is), results in lots of confusion for users (e.g. "git is giving me lots of conflicts in stuff I didn't even change since my last push.") Cases where additional commits could be reapplied include forking from a commit other than the tracking branch, or amending/rebasing after pushing. Cases where the inability to detect upstreamed commits cause problems include independent discovery of a fix and having your patches get upstreamed by some alternative route (e.g. pulling your changes to a third machine, pushing from there, and then going back to your original machine and trying to pull --rebase). Fix the non-rebased upstream case by ignoring $old_remote_ref whenever it is contained in $(git merge-base $merge_head $cur_branch). This should have no affect on the rebased upstream case. Acked-by: Santi Béjar <santi@agolina.net> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12t5520-pull: Add testcases showing spurious conflicts from git pull --rebaseLibravatar Elijah Newren1-0/+62
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12push: mention "git pull" in error message for non-fast forwardsLibravatar Matthieu Moy1-2/+2
The message remains fuzzy to include "git pull", "git pull --rebase" and others, but directs the user to the simplest solution in the vast majority of cases. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>