summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-20merge-recursive: Avoid excessive output for and reprocessing of renamesLibravatar Elijah Newren1-6/+2
In 5a2580d (merge_recursive: Fix renames across paths below D/F conflicts 2010-07-09) and ae74548 (merge-recursive: Fix multiple file rename across D/F conflict 2010-08-17), renames across D/F conflicts were fixed by making process_renames() consider as unprocessed renames whose dst_entry "still" had higher stage entries. The assumption was that those higher stage entries would have been cleared out of dst_entry by that point in cases where the conflict could be resolved (normal renames with no D/F conflicts). That is not the case -- higher stage entries will remain in all cases. Fix this by checking for higher stage entries corresponding to D/F conflicts, namely that stages 2 and 3 have exactly one nonzero mode between them. The nonzero mode stage corresponds to a file at the path, while the stage with a zero mode will correspond to a directory at that path (since rename/delete conflicts will have already been handled before this codepath is reached.) Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18merge-recursive: Fix multiple file rename across D/F conflictLibravatar Elijah Newren2-1/+2
In 5a2580d (merge_recursive: Fix renames across paths below D/F conflicts 2010-07-09), detection was added for renames across paths involved in a directory<->file conflict. However, the change accidentally involved reusing an outer loop index ('i') in an inner loop, changing its values and causing a slightly different type of breakage for cases where there are multiple renames across the D/F conflict. Fix by creating a new temporary variable 'i'. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t6031: Add a testcase covering multiple renames across a D/F conflictLibravatar Elijah Newren1-0/+31
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18merge-recursive: Fix typoLibravatar Elijah Newren1-1/+1
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12Mark tests that use symlinks as needing SYMLINKS prerequisiteLibravatar Elijah Newren2-3/+3
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-27t/t6035-merge-dir-to-symlink.sh: Remove TODO on passing testLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Various merge-recursive cases were fixed in "merge-recursive: Fix D/F conflicts" by Elijah Newren. Some tests were changed from test_expect_failure to test_expect_success, but one fell through the cracks. Change that test to use test_expect_success. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09fast-import: Improve robustness when D->F changes provided in wrong orderLibravatar Elijah Newren1-0/+8
When older versions of fast-export came across a directory changing to a symlink (or regular file), it would output the changes in the form M 120000 :239821 dir-changing-to-symlink D dir-changing-to-symlink/filename1 When fast-import sees the first line, it deletes the directory named dir-changing-to-symlink (and any files below it) and creates a symlink in its place. When fast-import came across the second line, it was previously trying to remove the file and relevant leading directories in tree_content_remove(), and as a side effect it would delete the symlink that was just created. This resulted in the symlink silently missing from the resulting repository. To improve robustness, we ignore file deletions underneath directory names that correspond to non-directories. This can also be viewed as a minor optimization: since there cannot be a file and a directory with the same name in the same directory, the file clearly can't exist so nothing needs to be done to delete it. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09fast-export: Fix output order of D/F changesLibravatar Elijah Newren2-1/+30
The fast-import stream format requires incremental changes which take place immediately, meaning that for D->F conversions all files below the relevant directory must be deleted before the resulting file of the same name is created. Reversing the order can result in fast-import silently deleting the file right after creating it, resulting in the file missing from the resulting repository. We correct this by first sorting the diff_queue_struct in depth-first order. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09merge_recursive: Fix renames across paths below D/F conflictsLibravatar Elijah Newren3-4/+15
The rename logic in process_renames() handles renames and merging of file contents and then marks files as processed. However, there may be higher stage entries left in the index for other reasons (e.g., due to D/F conflicts). By checking for such cases and marking the entry as not processed, it allows process_entry() later to look at it and handle those higher stages. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09merge-recursive: Fix D/F conflictsLibravatar Elijah Newren2-19/+80
The D/F conflicts that can be automatically resolved (file or directory unmodified on one side of history), have the nice property that process_entry() can correctly handle all subpaths of the D/F conflict. In the case of D->F conversions, it will correctly delete all non-conflicting files below the relevant directory and the directory itself (note that both untracked and conflicting files below the directory will prevent its removal). So if we handle D/F conflicts after all other conflicts, they become fairly simple to handle -- we just need to check for whether or not a path (file/directory) is in the way of creating the new content. We do this by having process_entry() defer handling such entries to a subsequent process_df_entry() step. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09Add a rename + D/F conflict testcaseLibravatar Alexander Gladysh1-0/+35
This is a simple testcase where both sides of the rename are paths involved in (separate) D/F merge conflicts Signed-off-by: Alexander Gladysh <agladysh@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09Add additional testcases for D/F conflictsLibravatar Elijah Newren2-4/+84
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-23Git 1.7.1Libravatar Junio C Hamano3-9/+8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-23Merge branch 'maint'Libravatar Junio C Hamano1-9/+34
* maint: Documentation improvements for the description of short format.
2010-04-23Documentation improvements for the description of short format.Libravatar Eric Raymond1-9/+34
Incorporates the detailed explanation from Jeff King in <20100410040959.GA11977@coredump.intra.peff.net> and fixes the bug noted by Junio C Hamano in <7vmxxc1i8g.fsf@alter.siamese.dyndns.org>. Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-22Sync with 1.7.0.6Libravatar Junio C Hamano2-1/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-22Git 1.7.0.6Libravatar Junio C Hamano4-3/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-22Merge branch 'mg/use-default-abbrev-length-in-rev-list' into maintLibravatar Junio C Hamano1-1/+1
* mg/use-default-abbrev-length-in-rev-list: rev-list: use default abbrev length when abbrev-commit is in effect
2010-04-22Merge branch 'wp/doc-filter-direction' into maintLibravatar Junio C Hamano1-4/+4
* wp/doc-filter-direction: documentation: clarify direction of core.autocrlf
2010-04-22Merge branch 'jk/maint-diffstat-overflow' into maintLibravatar Junio C Hamano1-9/+12
* jk/maint-diffstat-overflow: diff: use large integers for diffstat calculations
2010-04-22Merge branch 'da/maint-python-startup' into maintLibravatar Junio C Hamano1-3/+2
* da/maint-python-startup: Makefile: Remove usage of deprecated Python "has_key" method
2010-04-21Merge branch 'maint'Libravatar Junio C Hamano1-2/+6
* maint: Documentation/Makefile: fix interrupted builds of user-manual.xml
2010-04-21Documentation/Makefile: fix interrupted builds of user-manual.xmlLibravatar Jonathan Nieder1-2/+6
Unlike gcc, asciidoc does not atomically write its output file or delete it when interrupted. If it is interrupted in the middle of writing an XML file, the result will be truncated input for xsltproc. XSLTPROC user-manual.html user-manual.xml:998: parser error : Premature end of data in t Take care of this case by writing to a temporary and renaming it when finished. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19Merge branch 'maint'Libravatar Junio C Hamano3-7/+8
* maint: t7012: Mark missing tests as TODO reflog: remove 'show' from 'expire's usage string MSVC: Fix build by adding missing termios.h dummy
2010-04-19t7012: Mark missing tests as TODOLibravatar Michael J Gruber1-6/+6
Currently, there are 6 tests which are not even written but are 'test_expect_failure message false'. Do not abuse test_expect_failure as a to do marker, but mark them as '#TODO' instead. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19reflog: remove 'show' from 'expire's usage stringLibravatar SZEDER Gábor1-1/+1
Most of 'expire's options are not recognized by the 'show' subcommand, hence it errors out. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19Merge branch 'maint-1.6.6' into maintLibravatar Junio C Hamano1-0/+1
* maint-1.6.6: MSVC: Fix build by adding missing termios.h dummy
2010-04-19MSVC: Fix build by adding missing termios.h dummyLibravatar Johannes Sixt1-0/+1
A use of this header file was introduced in eb80042 (Add missing #include to support TIOCGWINSZ on Solaris, 2010-01-11). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Git 1.7.1-rc2Libravatar Junio C Hamano2-2/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Merge branch 'rr/remote-helper-doc'Libravatar Junio C Hamano2-58/+119
* rr/remote-helper-doc: Documentation/remote-helpers: Fix typos and improve language Fixup: Second argument may be any arbitrary string Documentation/remote-helpers: Add invocation section Documentation/urls: Rewrite to accomodate <transport>::<address> Documentation/remote-helpers: Rewrite description
2010-04-18Merge branch 'wp/doc-filter-direction'Libravatar Junio C Hamano1-4/+4
* wp/doc-filter-direction: documentation: clarify direction of core.autocrlf
2010-04-18Merge branch 'jk/maint-diffstat-overflow'Libravatar Junio C Hamano1-9/+12
* jk/maint-diffstat-overflow: diff: use large integers for diffstat calculations
2010-04-18Merge branch 'jg/auto-initialize-notes-with-percent-n-in-format'Libravatar Junio C Hamano4-5/+64
* jg/auto-initialize-notes-with-percent-n-in-format: t3301: add tests to use --format="%N" pretty: Initialize notes if %N is used
2010-04-18Merge branch 'maint'Libravatar Junio C Hamano1-2/+2
* maint: Documentation: Describe other situations where -z affects git diff
2010-04-18Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano9-44/+60
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Display dirty submodules correctly gitk: Fix display of copyright symbol gitk: Add emacs editor variable block gitk: Avoid calling tk_setPalette on Windows gitk: Don't clobber "Remember this view" setting gitk: Add comments to explain encode_view_opts and decode_view_opts gitk: Use consistent font for all text input fields gitk: Set the font for all listbox widgets gitk: Set the font for all spinbox widgets gitk: Remove forced use of sans-serif font gitk: Add Ctrl-W shortcut for closing the active window
2010-04-18Documentation/remote-helpers: Fix typos and improve languageLibravatar Ramkumar Ramachandra1-28/+23
Fix some typos and errors in grammar and tense. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Fixup: Second argument may be any arbitrary stringLibravatar Ramkumar Ramachandra1-3/+2
This is intended to be a fixup for commit ad466d1 in pu. As Jonathan Neider pointed out, the second argument may be any arbitrary string, and need not conform to any URL-like shape. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Documentation/remote-helpers: Add invocation sectionLibravatar Ramkumar Ramachandra1-1/+34
Add an 'Invocation' section to specify what the command line arguments mean. Also include a link to git-remote in the 'See Also' section. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Documentation/urls: Rewrite to accomodate <transport>::<address>Libravatar Ramkumar Ramachandra1-23/+36
Rewrite the first part of the document to explicitly show differences between the URLs that can be used with different transport protocols. Mention <transport>::<address> format to explicitly invoke a remote helper. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Documentation/remote-helpers: Rewrite descriptionLibravatar Ramkumar Ramachandra1-6/+27
Rewrite the description section to describe what exactly remote helpers are and the need for them. Also mention the curl family of remote helpers as an example. [jc: with readability fixes from Jonathan squashed in] Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18Documentation: Describe other situations where -z affects git diffLibravatar Charles Bailey1-2/+2
-z also alters the behaviour of --name-only and --name-status. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18rebase-interactive: silence warning when no commits rewrittenLibravatar Jeff King1-0/+1
If you do a "rebase -i" and don't change any commits, nothing is rewritten, and we have no REWRITTEN_LIST. The shell prints out an ugly message: $ GIT_EDITOR=true git rebase -i HEAD^ /path/to/git-rebase--interactive: 1: cannot open /path/to/repo/.git/rebase-merge/rewritten-list: No such file Successfully rebased and updated refs/heads/master. We can fix it by not running "notes copy" at all if nothing was rewritten. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18t3301: add tests to use --format="%N"Libravatar Junio C Hamano1-0/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17Merge branch 'maint'Libravatar Junio C Hamano4-13/+23
* maint: t1010-mktree: Adjust expected result to code and documentation combined diff: correctly handle truncated file Document new "already-merged" rule for branch -d
2010-04-17t6006: do not write to /tmpLibravatar Matthew Ogilvie1-1/+1
Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17git-instaweb: pass through invoking user's path to gitweb CGI scriptsLibravatar Chris Webb1-2/+2
When used with lighttpd or mongoose, git-instaweb previously passed a hard-coded, default value of PATH to the gitweb CGI script. Use the invoking user's value for PATH for this instead. (This is already implicitly the behaviour for other web servers supported by git-instaweb.) Signed-off-by: Chris Webb <chris@arachsys.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-04-17gitweb: simplify gitweb.min.* generation and clean-up rulesLibravatar Junio C Hamano1-37/+38
GITWEB_CSS and GITWEB_JS are meant to be "what URI should the installed cgi script use to refer to the stylesheet and JavaScript", never "this is the name of the file we are building". Don't use them to decide what file to build minified versions in. While we are at it, lose FILES that is used only for "clean" target in a misguided way. "make clean" should try to remove all the potential build artifacts regardless of a minor configuration change. Instead of trying to remove only the build product "make clean" would have created if it were run without "clean", explicitly list the three potential build products for removal. Tested-by: Mark Rada <marada@uwaterloo.co> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17tag -v: use RUN_GIT_CMD to run verify-tagLibravatar Jonathan Nieder1-2/+2
This is the preferred way to run a git command. The only obvious observable effects I can think of are that the exec is properly reported in GIT_TRACE output and that verifying signed tags will still work if the git-verify-tag hard link in gitexecdir goes missing. Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17documentation: clarify direction of core.autocrlfLibravatar Will Palmer1-4/+4
The description for core.autocrlf refers to reads from / writes to "the filesystem", the only use of this rather ambiguous term, which technically could be referring to the git object database. (All other mentions are part of phrases such as "..filesystems (like NFS).."). Other sections, including the section on core.safecrlf, use the term "work tree" for the same purpose as the term "the filesystem" is used in the core.autocrlf section, so that seems like a good alternative, which makes it clearer what direction the addition/removal of CR characters occurs in. Signed-off-by: Will Palmer <wmpalmer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17diff: use large integers for diffstat calculationsLibravatar Jeff King1-9/+12
The diffstat "added" and "changed" fields generally store line counts; however, for binary files, they store file sizes. Since we store and print these values as ints, a diffstat on a file larger than 2G can show a negative size. Instead, let's use uintmax_t, which should be at least 64 bits on modern platforms. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>