aboutsummaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAge
* Merge branch 'pn/commit-autosquash'Junio C Hamano2010-12-03
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * pn/commit-autosquash: add tests of commit --squash commit: --squash option for use with rebase --autosquash add tests of commit --fixup commit: --fixup option for use with rebase --autosquash pretty.c: teach format_commit_message() to reencode the output commit: helper methods to reduce redundant blocks of code Conflicts: Documentation/git-commit.txt t/t3415-rebase-autosquash.sh
| * add tests of commit --squashPat Notz2010-11-04
| | | | | | | | | | | | | | | | | | t7500: test expected behavior of commit --squash t3415: test interaction of commit --squash with rebase --autosquash t3900: test commit --squash with i18n encodings Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * add tests of commit --fixupPat Notz2010-11-04
| | | | | | | | | | | | | | | | | | t7500: test expected behavior of commit --fixup t3415: test interaction of commit --fixup with rebase --autosquash t3900: test commit --fixup with i18n encodings Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'cb/leading-path-removal'Junio C Hamano2010-11-29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/leading-path-removal: use persistent memory for rejected paths do not overwrite files in leading path lstat_cache: optionally return match_len add function check_ok_to_remove() t7607: add leading-path tests t7607: use test-lib functions and check MERGE_HEAD Conflicts: t/t7607-merge-overwrite.sh
| * | use persistent memory for rejected pathsClemens Buchacher2010-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An aborted merge prints the list of rejected paths as part of the error message. Since commit f66caaf9 (do not overwrite files in leading path), some of those paths do not have static buffers, so we have to keep a copy. Use string_list's to accomplish this. This changes the order of the list to the order in which the paths are processed. Previously, it was reversed. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | do not overwrite files in leading pathClemens Buchacher2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the work tree contains an untracked file x, and unpack-trees wants to checkout a path x/*, the file x is removed unconditionally. Instead, apply the same checks that are normally used for untracked files, and abort if the file cannot be removed. Signed-off-by: Clemens Buchacher <drizzd@aon.at>
| * | t7607: add leading-path testsClemens Buchacher2010-10-13
| | | | | | | | | | | | Signed-off-by: Clemens Buchacher <drizzd@aon.at>
| * | t7607: use test-lib functions and check MERGE_HEADClemens Buchacher2010-10-13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the test_commit and test_path_is_missing functions from the test library. Also make sure that a merge which fails due to pre-merge checks aborts properly and does not leave MERGE_HEAD behind. The "will not overwrite removed file" test is an exception to this. It notices the untracked file at a stage where the merge is already well under way. Therefore we cannot abort the merge without major restructuring. See the following thread for more details. http://mid.gmane.org/7vskopwxej.fsf@gitster.siamese.dyndns.org Signed-off-by: Clemens Buchacher <drizzd@aon.at>
* | Merge branch 'en/merge-recursive'Junio C Hamano2010-11-29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * en/merge-recursive: (41 commits) t6022: Use -eq not = to test output of wc -l merge-recursive:make_room_for_directories - work around dumb compilers merge-recursive: Remove redundant path clearing for D/F conflicts merge-recursive: Make room for directories in D/F conflicts handle_delete_modify(): Check whether D/F conflicts are still present merge_content(): Check whether D/F conflicts are still present conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts conflict_rename_delete(): Check whether D/F conflicts are still present merge-recursive: Delay modify/delete conflicts if D/F conflict present merge-recursive: Delay content merging for renames merge-recursive: Delay handling of rename/delete conflicts merge-recursive: Move handling of double rename of one file to other file merge-recursive: Move handling of double rename of one file to two merge-recursive: Avoid doubly merging rename/add conflict contents merge-recursive: Update merge_content() call signature merge-recursive: Update conflict_rename_rename_1to2() call signature merge-recursive: Structure process_df_entry() to handle more cases merge-recursive: Have process_entry() skip D/F or rename entries merge-recursive: New function to assist resolving renames in-core only merge-recursive: New data structures for deferring of D/F conflicts ... Conflicts: t/t6020-merge-df.sh t/t6036-recursive-corner-cases.sh
| * | t6022: Use -eq not = to test output of wc -lBrian Gernhardt2010-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | When comparing numbers such as "3" to "$(wc -l)", we should check for numerical equality using -eq instead of string equality using = because some implementations of wc output extra whitespace. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | merge-recursive: Make room for directories in D/F conflictsElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are unmerged entries present, make sure to check for D/F conflicts first and remove any files present in HEAD that would be in the way of creating files below the correspondingly named directory. Such files will be processed again at the end of the merge in process_df_entry(); at that time we will be able to tell if we need to and can reinstate the file, whether we need to place its contents in a different file due to the directory still being present, etc. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | handle_delete_modify(): Check whether D/F conflicts are still presentElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | If all the paths below some directory involved in a D/F conflict were not removed during the rest of the merge, then the contents of the file whose path conflicted needs to be recorded in file with an alternative filename. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | merge_content(): Check whether D/F conflicts are still presentElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | If all the paths below some directory involved in a D/F conflict were not removed during the rest of the merge, then the contents of the file whose path conflicted needs to be recorded in file with an alternative filename. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | conflict_rename_rename_1to2(): Fix checks for presence of D/F conflictsElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is called from process_df_entry(), near the end of the merge. Rather than just checking whether one of the sides of the merge had a directory at the same path as one of our files, check whether that directory is still present by this point of our merge. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | conflict_rename_delete(): Check whether D/F conflicts are still presentElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | If all the paths below some directory involved in a D/F conflict were not removed during the rest of the merge, then the contents of the file whose path conflicted needs to be recorded in file with an alternative filename. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | merge-recursive: Delay content merging for renamesElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | Move the handling of content merging for renames from process_renames() to process_df_entry(). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | merge-recursive: Move handling of double rename of one file to twoElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | Move the handling of rename/rename conflicts where one file is renamed to two different files, from process_renames() to process_df_entry(). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | merge-recursive: Avoid doubly merging rename/add conflict contentsElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a commit moves A to B while another commit created B (or moved C to B), and these two different commits serve as different merge-bases for a later merge, c94736a (merge-recursive: don't segfault while handling rename clashes 2009-07-30) added some special code to avoid segfaults. Since that commit, the two versions of B are merged in place (which could be potentially conflicting) and the intermediate result is used as the virtual ancestor. However, right before this special merge, try_merge was turned on, meaning that process_renames() would try an alternative merge that ignores the 'add' part of the conflict, and, if the merge is clean, store that as the new virtual ancestor. This could cause incorrect merging of criss-cross merges; it would typically result in just recording a slightly confusing merge base, but in some cases it could cause silent acceptance of one side of a merge as the final resolution when a conflict should have been flagged. When we do a special merge for such a rename/add conflict between merge-bases, turn try_merge off to avoid an inappropriate second merge. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6036: Add testcase for undetected conflictElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If merging two lines of development involves a rename/add conflict, and two different people make such a merge but resolve it differently, and then someone tries to merge the resulting two merges, then they should clearly get a conflict due to the different resolutions from the previous developers. However, in some such cases the conflict would not be detected and git would silently accept one of the two versions being merged as the final merge resolution. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6036: Add a second testcase similar to the first but with content changesElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c94736a (merge-recursive: don't segfault while handling rename clashes 2009-07-30) added t6036 with a testcase that involved dual renames and a criss-cross merge. Add a test that is nearly identical, but which also involves content modification -- a case git currently does not merge correctly. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6036: Test index and worktree state, not just that merge failsElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c94736a (merge-recursive: don't segfault while handling rename clashes 2009-07-30) added this testcase with an interesting corner case test, which previously had cased git to segfault. This test ensures that the segfault does not return and that the merge correctly fails; just add some checks that verify the state of the index and worktree after the merge are correct. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6020: Add a testcase for modify/delete + directory/file conflictElijah Newren2010-09-29
| | | | | | | | | | | | | | | Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6020: Modernize style a bitElijah Newren2010-09-29
| | | | | | | | | | | | | | | Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6022: Add tests for rename/rename combined with D/F conflictsElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests where one file is renamed to two different paths in different sides of history, and where each of the new files matches the name of a directory from the opposite side of history. Include tests for both the case where the merge results in those directories not being cleanly removed, and where those directories are cleanly removed during the merge. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)Elijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An interesting testcase is having two files each in their own subdirectory getting renamed to the toplevel at the directory pathname of the other. Questions arise as to whether the order of operations matters and whether the directories can correctly get out of the way and make room for the new files. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6022: Add tests with both rename source & dest involved in D/F conflictsElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having the source of a rename be involved in a directory/file conflict does not currently pose any difficulties to the current merge-recursive algorithm (in contrast to destinations of renames and D/F conflicts). However, combining the two seemed like good testcases to include for completeness. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6022: Add tests for reversing order of merges when D/F conflicts presentElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When merging two branches with some path involved in a D/F conflict, the choice of which branch to merge into the other matters for (at least) two reasons: (1) whether the working copy has a directory full of files that is in the way of a file, or a file exists that is in the way of a directory of files, (2) when the directory full of files does not disappear due to the merge, what files at the same paths should be renamed to (e.g. filename~HEAD vs. filename~otherbranch). Add some tests that reverse the merge order of two other tests, and which verify the contents are as expected (namely, that the results are identical other than modified-for-uniqueness filenames involving branch names). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6022: Add test combinations of {content conflict?, D/F conflict remains?}Elijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add testing of the various ways that a renamed file to a path involved in a directory/file conflict may be involved in. This includes whether or not there are conflicts of the contents of the renamed file (if the file was modified on both sides of history), and whether the directory from the other side of the merge will disappear as a result of the merge or not. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t6032: Add a test checking for excessive output from mergeElijah Newren2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous D/F fixes I submitted (5a2580d and ae74548) had caused merge to become excessively spammy, which was fixed in 96ecac6 (merge-recursive: Avoid excessive output for and reprocessing of renames 2010-08-20). Add a new test to avoid repeating that mistake with my several upcoming changes. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t3030: Add a testcase for resolvable rename/add conflict with symlinksSchalk, Ken2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d5af510 (RE: [PATCH] Avoid rename/add conflict when contents are identical 2010-09-01) avoided erroring out in a rename/add conflict when the contents were identical. A simpler fix could have handled that particular testcase, but it would not correctly handle the case where a symlink is involved. Add another testcase using symlinks, to avoid breaking that case. Signed-off-by: Ken Schalk <ken.schalk@intel.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'en/rename-d-f' into en/merge-recursiveJunio C Hamano2010-09-29
| |\ \ | | | | | | | | | | | | | | | | | | | | * en/rename-d-f: merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir t3509: Add rename + D/F conflict testcase that recursive strategy fails
| | * | merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dirElijah Newren2010-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In merge-recursive.c, whenever there was a rename where a file name on one side of the rename matches a directory name on the other side of the merge, then the very first check that string_list_has_string(&o->current_directory_set, ren1_dst) would trigger forcing it into marking it as a rename/directory conflict. However, if the path is only renamed on one side and a simple three-way merge between the separate files resolves cleanly, then we don't need to mark it as a rename/directory conflict. So, we can simply move the check for rename/directory conflicts after we've verified that there isn't a rename/rename conflict and that a threeway content merge doesn't work. This changes the particular error message one gets in the case where the directory name that a file on one side of the rename matches is not also part of the rename pair. For example, with commits containing the files: COMMON -> (HEAD, MERGE ) --------- --------------- ------- sub/file1 -> (sub/file1, newsub) <NULL> -> (newsub/newfile, <NULL>) then previously when one tried to merge MERGE into HEAD, one would get CONFLICT (rename/directory): Rename sub/file1->newsub in HEAD directory newsub added in merge Renaming sub/file1 to newsub~HEAD instead Adding newsub/newfile Automatic merge failed; fix conflicts and then commit the result. After this patch, the error message will instead become: Removing newsub Adding newsub/newfile CONFLICT (file/directory): There is a directory with name newsub in merge. Adding newsub as newsub~HEAD Automatic merge failed; fix conflicts and then commit the result. That makes more sense to me, because git can't know that there's a conflict until after it's tried resolving paths involving newsub/newfile to see if they are still in the way at the end (and if newsub/newfile is not in the way at the end, there should be no conflict at all, which did not hold with git previously). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | t3509: Add rename + D/F conflict testcase that recursive strategy failsElijah Newren2010-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When one side of a file rename matches a directory name on the other side, the recursive merge strategy will fail. This is true even if the merge is trivially resolvable. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jn/cherry-pick-refresh-index'Junio C Hamano2010-11-29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jn/cherry-pick-refresh-index: cherry-pick/revert: transparently refresh index
| * | | | cherry-pick/revert: transparently refresh indexJonathan Nieder2010-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A stat-dirty index is not a detail that ought to concern the operator of porcelain such as "git cherry-pick". Without this change, a cherry-pick after copying a worktree with rsync errors out with a misleading message. $ git cherry-pick build/top error: Your local changes to 'file.h' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge. Noticed-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'fc/apply-p2-get-header-name'Junio C Hamano2010-11-29
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fc/apply-p2-get-header-name: test: git-apply -p2 rename/chmod only Fix git-apply with -p greater than 1
| * | | | | test: git-apply -p2 rename/chmod onlyJunio C Hamano2010-11-05
| |/ / / / | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jn/fast-import-fix'Junio C Hamano2010-11-29
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/fast-import-fix: fast-import: do not clear notes in do_change_note_fanout() t9300 (fast-import): another test for the "replace root" feature fast-import: tighten M 040000 syntax fast-import: filemodify after M 040000 <tree> "" crashes
| * | | | | t9300 (fast-import): another test for the "replace root" featureJonathan Nieder2010-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another test for the replace root feature. One can imagine an implementation for which R "some/subdir" "" would free some state associated to the subdir and leave fast-import confused. Luckily, git's is not such an implementation. While at it, change the previous test to use C "some/subdir" "" instead of R (i.e., test both syntaxes). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | fast-import: tighten M 040000 syntaxJonathan Nieder2010-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tree_content_set() is asked to modify the path "foo/bar/", it first recurses like so: tree_content_set(root, "foo/bar/", sha1, S_IFDIR) -> tree_content_set(root:foo, "bar/", ...) -> tree_content_set(root:foo/bar, "", ...) And as a side-effect of 2794ad5 (fast-import: Allow filemodify to set the root, 2010-10-10), this last call is accepted and changes the tree entry for root:foo/bar to refer to the specified tree. That seems safe enough but let's reject the new syntax (we never meant to support it) and make it harder for frontends to introduce pointless incompatibilities with git fast-import 1.7.3. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | fast-import: filemodify after M 040000 <tree> "" crashesJonathan Nieder2010-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until M 040000 <tree> "" syntax was introduced in commit 2794ad5 (fast-import: Allow filemodify to set the root, 2010-10-10), it was impossible for the root entry to refer to an unloaded tree. Update various functions to take that possibility into account. Otherwise M 040000 <tree> "" M 100644 :1 "foo" and similar commands (using D, C, or R after resetting the root tree) segfault. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'kb/blame-author-email'Junio C Hamano2010-11-29
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kb/blame-author-email: blame: Add option to show author email instead of name Conflicts: t/annotate-tests.sh
| * | | | | | blame: Add option to show author email instead of nameKevin Ballard2010-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new option -e (or --show-email) to git-blame that will display the author's email instead of name on each line. This option works for both git-blame and git-annotate. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'cm/diff-check-at-eol'Junio C Hamano2010-11-29
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cm/diff-check-at-eol: diff --check: correct line numbers of new blank lines at EOF
| * | | | | | | diff --check: correct line numbers of new blank lines at EOFChristoph Mallon2010-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whitespace check printed the value of the wrong variable, i.e. the beginning of the block of blank lines at the EOF (possibly absent) in the old file. As "git diff --check" is used by users to check their changes before making a commit, we should point at the line number in the file after the change. Signed-off-by: Christoph Mallon <christoph.mallon@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ak/apply-non-git-epoch'Junio C Hamano2010-11-29
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ak/apply-non-git-epoch: apply: handle patches with funny filename and colon in timezone apply: Recognize epoch timestamps with : in the timezone
| * | | | | | | | apply: handle patches with funny filename and colon in timezoneJonathan Nieder2010-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some patches have a timezone formatted like '-08:00' instead of '-0800' in their ---/+++ lines (e.g. http://lwn.net/Articles/131729/). Take this into account when searching for the start of the timezone (which is the end of the filename). This does not actually affect the outcome of patching unless (1) a file being patched has a non-' ' whitespace character (e.g., tab) in its filename, or (2) the patch is whitespace-damaged, so the tab between filename and timestamp has been replaced with spaces. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | apply: Recognize epoch timestamps with : in the timezoneAnders Kaseorg2010-10-13
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some patches have a timezone formatted like ‘-08:00’ instead of ‘-0800’ (e.g. http://lwn.net/Articles/131729/), so git apply would fail to recognize the epoch timestamp of deleted files and would create empty files instead. Teach it to support both formats, and add a test case. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'tc/smart-http-post-redirect'Junio C Hamano2010-11-29
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tc/smart-http-post-redirect: smart-http: Don't change POST to GET when following redirect
| * | | | | | | | smart-http: Don't change POST to GET when following redirectTay Ray Chuan2010-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a long time (29508e1 "Isolate shared HTTP request functionality", Fri Nov 18 11:02:58 2005), we've followed HTTP redirects with CURLOPT_FOLLOWLOCATION. However, when the remote HTTP server returns a redirect the default libcurl action is to change a POST request into a GET request while following the redirect, but the remote http backend does not expect that. Fix this by telling libcurl to always keep the request as type POST with CURLOPT_POSTREDIR. For users of libcurl older than 7.19.1, use CURLOPT_POST301 instead, which only follows 301s instead of both 301s and 302s. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>