summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* reset: support "--mixed --intent-to-add" modend/reset-intent-to-addNguyễn Thái Ngọc Duy2014-02-055-15/+50
| | | | | | | | | | When --mixed is used, entries could be removed from index if the target ref does not have them. When "reset" is used in preparation for commit spliting (in a dirty worktree), it could be hard to track what files to be added back. The new option --intent-to-add simplifies it by marking all removed files intent-to-add. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
* Git 1.9-rc2v1.9-rc2Junio C Hamano2014-01-311-1/+1
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge git://github.com/git-l10n/git-poJunio C Hamano2014-01-319-11470/+15408
|\ | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://github.com/git-l10n/git-po: l10n: Bulgarian translation of git (222t21f1967u) po/TEAMS: Added Bulgarian team l10n: remove 2 blank translations on Danish, Dutch l10n: zh_CN.po: translate 27 messages (2210t0f0u) l10n: Update Swedish translation (2210t0f0u) [fr] update french translation 2210/2210 l10n: vi.po (2210t): Updated git-core translation l10n: git.pot: v1.9 round 1 (27 new, 11 removed)
| * l10n: Bulgarian translation of git (222t21f1967u)Alexander Shopov2014-01-291-0/+10404
| | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * po/TEAMS: Added Bulgarian teamAlexander Shopov2014-01-281-0/+4
| | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * l10n: remove 2 blank translations on Danish, DutchJiang Xin2014-01-253-7004/+0
| | | | | | | | | | | | | | | | | | Two l10n teams haven't contributed a single translation for about two years since they was initialized with a blank template. Remove them can make the Git package smaller and give opportunities to other contributors. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * l10n: zh_CN.po: translate 27 messages (2210t0f0u)Jiang Xin2014-01-251-837/+972
| | | | | | | | | | | | | | Translations for git v1.9-rc0, and also update translations on "graft" and "reference repository". Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * l10n: Update Swedish translation (2210t0f0u)Peter Krefting2014-01-211-826/+933
| | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * Merge branch 'fr-po' of git://github.com/jnavila/gitJiang Xin2014-01-181-843/+964
| |\ | | | | | | | | | | | | * 'fr-po' of git://github.com/jnavila/git: [fr] update french translation 2210/2210
| | * [fr] update french translation 2210/2210Jean-Noel Avila2014-01-181-843/+964
| | | | | | | | | | | | Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
| * | l10n: vi.po (2210t): Updated git-core translationTran Ngoc Quan2014-01-181-1149/+1240
| |/ | | | | | | | | | | | | | | * Updated new strings * Fix typos and review * Change meaning of stage Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * l10n: git.pot: v1.9 round 1 (27 new, 11 removed)Jiang Xin2014-01-181-812/+892
| | | | | | | | | | | | Generate po/git.pot from v1.9-rc0 for git v1.9 l10n round 1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
* | Merge branch 'jn/pager-lv-default-env'Junio C Hamano2014-01-311-1/+1
|\ \ | | | | | | | | | | | | | | | | | | A finishing touch to its test. * jn/pager-lv-default-env: pager test: make fake pager consume all its input
| * | pager test: make fake pager consume all its inputjn/pager-lv-default-envJonathan Nieder2014-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise there is a race: if 'git log' finishes writing before the pager terminates and closes the pipe, all is well, and if the pager finishes quickly enough then 'git log' terminates with SIGPIPE. died of signal 13 at /build/buildd/git-1.9~rc1/t/test-terminal.perl line 33. not ok 6 - LESS and LV envvars are set for pagination Noticed on Ubuntu PPA builders, where the race was lost about half the time. Compare v1.7.0.2~6^2 (tests: Fix race condition in t7006-pager, 2010-02-22). Reported-by: Anders Kaseorg <andersk@MIT.EDU> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.9-rc1v1.9-rc1Junio C Hamano2014-01-272-1/+47
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'as/tree-walk-fix-aggressive-short-cut'Junio C Hamano2014-01-272-1/+14
|\ \ \ | | | | | | | | | | | | | | | | * as/tree-walk-fix-aggressive-short-cut: tree_entry_interesting: match against all pathspecs
| * | | tree_entry_interesting: match against all pathspecsas/tree-walk-fix-aggressive-short-cutAndy Spencer2014-01-272-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current basedir compare aborts early in order to avoid futile recursive searches. However, a match may still be found by another pathspec. This can cause an error while checking out files from a branch when using multiple pathspecs: $ git checkout master -- 'a/*.txt' 'b/*.txt' error: pathspec 'a/*.txt' did not match any file(s) known to git. Signed-off-by: Andy Spencer <andy753421@gmail.com> Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ta/doc-http-protocol-in-html'Junio C Hamano2014-01-272-114/+121
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ta/doc-http-protocol-in-html: http-protocol.txt: don't use uppercase for variable names in "The Negotiation Algorithm" Documentation: make it easier to maintain enumerated documents create HTML for http-protocol.txt
| * | | | http-protocol.txt: don't use uppercase for variable names in "The ↵ta/doc-http-protocol-in-htmlThomas Ackermann2014-01-271-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Negotiation Algorithm" Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Documentation: make it easier to maintain enumerated documentsJunio C Hamano2014-01-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of starting an enumeration of documents with a DOC = doc1 followed by DOC += doc2, DOC += doc3, ..., empty it with "DOC =" at the beginning and consistently add them with "DOC += ...". Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | create HTML for http-protocol.txtThomas Ackermann2014-01-272-105/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./Documentation/technical/http-protocol.txt was missing from TECH_DOCS in Makefile. Add it and also improve HTML formatting while still retaining good readability of the ASCII text: - Use monospace font instead of italicized or roman font for machine output and source text - Use roman font for things which should be body text - Use double quotes consistently for "want" and "have" commands - Use uppercase "C" / "S" consistently for "client" / "server"; also use "C:" / "S:" instead of "(C)" / "(S)" for consistency and to avoid having formatted "(C)" as copyright symbol in HTML - Use only spaces and not a combination of tabs and spaces for whitespace Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'mh/doc-wo-names'Junio C Hamano2014-01-276-40/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * mh/doc-wo-names: doc: remote author/documentation sections from more pages
| * | | | | doc: remote author/documentation sections from more pagesmh/doc-wo-namesMichael Haggerty2014-01-276-40/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We decided at 48bb914e (doc: drop author/documentation sections from most pages, 2011-03-11) to remove "author" and "documentation" sections from our documentation. Remove a few stragglers. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jk/revision-o-is-in-libgit-a'Junio C Hamano2014-01-271-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jk/revision-o-is-in-libgit-a: Makefile: remove redundant object in git-http{fetch,push}
| * | | | | Makefile: remove redundant object in git-http{fetch,push}jk/revision-o-is-in-libgit-aJohn Keeping2014-01-271-2/+2
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | revision.o is included in libgit.a which is in $(GITLIBS), so we don't need to include is separately. This fixes compilation with "-fwhole-program" which otherwise fails with messages like this: libgit.a(revision.o): In function `mark_tree_uninteresting': /home/john/src/git/revision.c:108: multiple definition of `mark_tree_uninteresting' /tmp/ccKQRkZV.ltrans2.ltrans.o:/home/john/src/git/revision.c:108: first defined here Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'sb/repack-in-c'Junio C Hamano2014-01-271-12/+12
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git repack --max-pack-size=8g" stopped being parsed correctly when the command was reimplemented in C. * sb/repack-in-c: repack: propagate pack-objects options as strings repack: make parsed string options const-correct repack: fix typo in max-pack-size option
| * | | | | repack: propagate pack-objects options as stringssb/repack-in-cJeff King2014-01-231-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the original shell version of git-repack, any options destined for pack-objects were left as strings, and passed as a whole. Since the C rewrite in commit a1bbc6c (repack: rewrite the shell script in C, 2013-09-15), we now parse these values to integers internally, then reformat the integers when passing the option to pack-objects. This has the advantage that we catch format errors earlier (i.e., when repack is invoked, rather than when pack-objects is invoked). It has three disadvantages, though: 1. Our internal data types may not be the right size. In the case of "--window-memory" and "--max-pack-size", these are "unsigned long" in pack-objects, but we can only represent a regular "int". 2. Our parsing routines might not be the same as those of pack-objects. For the two options above, pack-objects understands "100m" to mean "100 megabytes", but repack does not. 3. We have to keep a sentinel value to know whether it is worth passing the option along. In the case of "--window-memory", we currently do not pass it if the value is "0". But that is a meaningful value to pack-objects, where it overrides any configured value. We can fix all of these by simply passing the strings from the user along to pack-objects verbatim. This does not actually fix anything for "--depth" or "--window", but these are converted, too, for consistency. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | repack: make parsed string options const-correctJeff King2014-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we use OPT_STRING to parse an option, we get back a pointer into the argv array, which should be "const char *". The compiler doesn't notice because it gets passed through a "void *" in the option struct. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | repack: fix typo in max-pack-size optionJeff King2014-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we see "--max-pack-size", we accidentally propagated this to pack-objects as "--max_pack_size", which does not work at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jk/test-fixes'Junio C Hamano2014-01-272-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/test-fixes: t7700: do not use "touch" unnecessarily t7501: fix "empty commit" test with NO_PERL
| * | | | | | t7700: do not use "touch" unnecessarilyjk/test-fixesJeff King2014-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of touch (such as /usr/ucb/touch on Solaris) do not know about the "-r" option. This would make sense as a feature of test-chmtime, but fortunately this fix is even easier. The test does not care about the timestamp of the .keep file it creates at all, only that it exists. For such a use case, with or without portability issues around "-r", "touch" should not be used in the first place. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t7501: fix "empty commit" test with NO_PERLJeff King2014-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | t7501.9 tries to check that "git commit" will fail when the index is unchanged. It relies on previous tests not to have modified the index. When it was originally written, this was always the case. However, commit c65dc35 (t7501: test the right kind of breakage, 2012-03-30) changed earlier tests (4 and 5) to leave a modification in the index. We never noticed, however, because t7501.7, between the two, clears the index state as a side effect. However, that test depends on the PERL prerequisite, and so it does not always run. Therefore if NO_PERL is set, we do not run the intervening test, the index is left unclean, and t7501.9 fails. We could fix this by moving t7501.9 up in the script. However, this patch instead leaves it in place and adds a "git reset" before the commit. This makes the test more explicit about its preconditions, and will future-proof it against any other changes in the test state. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'nd/negative-pathspec'Junio C Hamano2014-01-272-1/+18
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nd/negative-pathspec: tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()
| * | | | | | | tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()nd/negative-pathspecNguyễn Thái Ngọc Duy2014-01-232-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do ignore trailing slash on a directory, so pathspec "abc/" matches directory "abc". A submodule is also a directory. Apply the same logic to it. This makes "git log submodule-path" and "git log submodule-path/" produce the same output. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'pw/git-p4'Junio C Hamano2014-01-2710-44/+342
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various "git p4" updates. * pw/git-p4: git p4 doc: use two-line style for options with multiple spellings git p4 test: examine behavior with locked (+l) files git p4: fix an error message when "p4 where" fails git p4: handle files with wildcards when doing RCS scrubbing git p4 test: do not pollute /tmp git p4 test: run as user "author" git p4 test: is_cli_file_writeable succeeds git p4 test: explicitly check p4 wildcard delete git p4: work around p4 bug that causes empty symlinks git p4 test: ensure p4 symlink parsing works git p4 test: wildcards are supported
| * | | | | | | | git p4 doc: use two-line style for options with multiple spellingspw/git-p4Pete Wyckoff2014-01-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thomas Rast noticed the docs have a mix of styles when it comes to options with multiple spellings. Standardize the couple in git-p4.txt that are odd. Instead of: -n, --dry-run:: Do this: -n:: --dry-run:: See http://thread.gmane.org/gmane.comp.version-control.git/219936/focus=219945 Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: examine behavior with locked (+l) filesPete Wyckoff2014-01-221-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The p4 server can enforce file locking, so that only one user can edit a file at a time. Git p4 is unable to submit changes to locked files. Currently it exits poorly. Ideally it would notice the locked condition and clean up nicely. Add a bunch of tests that describe the problem, hoping that fixes appear in the future. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4: fix an error message when "p4 where" failsPete Wyckoff2014-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "p4 where" fails, for whatever reason, the error message tries to show an undefined variable. This minor bug applies only when using a client spec, and was introduced recently in 9d57c4a (git p4: implement view spec wildcards with "p4 where", 2013-08-30). Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4: handle files with wildcards when doing RCS scrubbingPete Wyckoff2014-01-222-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9d7d446 (git p4: submit files with wildcards, 2012-04-29) fixed problems with handling files that had p4 wildcard characters, like "@" and "*". But it missed one case, that of RCS keyword scrubbing, which uses "p4 fstat" to extract type information. Fix it by calling wildcard_encode() on the raw filename. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: do not pollute /tmpPete Wyckoff2014-01-223-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generating the submit template for p4 uses tempfile.mkstemp(), which by default puts files in /tmp. For a test that fails, possibly on purpose, this is not cleaned up. Run with TMPDIR pointing into the trash directory so the temp files go away with the test results. To do this required some other minor changes. First, the editor is launched using system(editor + " " + template_file), using shell expansion to build the command string. This doesn't work if editor has a space in it. And is generally unwise as it's easy to fool the shell into doing extra work. Exec the args directly, without shell expansion. Second, without shell expansion, the trick of "P4EDITOR=:" used in the tests doesn't work. Use a real command, true, as the non-interactive editor for testing. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: run as user "author"Pete Wyckoff2014-01-222-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests use author@example.com as the canonical submitter, but he does not have an entry in the p4 users database. This causes the generated change description to complain that the git and p4 users disagree. The complaint message is still valid, but isn't useful in tests. It was introduced in 848de9c (git-p4: warn if git authorship won't be retained, 2011-05-13). Fix t9813 to use @example.com instead of @localhost due to change in p4_add_user(). Move the function into the git p4 test library so author can be added at initialization time. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: is_cli_file_writeable succeedsPete Wyckoff2014-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e9df0f9 (git p4: cygwin p4 client does not mark read-only, 2013-01-26) fixed a problem with "test -w" on cygwin, but mistakenly marked the new test as failing. Fix this. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: explicitly check p4 wildcard deletePete Wyckoff2014-01-221-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no test where p4 deleted a file with a wildcard character. Make sure git p4 applies the wildcard decoding properly when importing a delete that includes a wildcard. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4: work around p4 bug that causes empty symlinksPete Wyckoff2014-01-222-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Damien Gérard highlights an interesting problem. Some p4 repositories end up with symlinks that have an empty target. It is not possible to create this with current p4, but they do indeed exist. The effect in git p4 is that "p4 print" on the symlink returns an empty string, confusing the curret symlink-handling code. Such broken repositories cause problems in p4 as well, even with no git involved. In p4, syncing to a change that includes a bogus symlink causes errors: //depot/empty-symlink - updating /home/me/p4/empty-symlink rename: /home/me/p4/empty-symlink: No such file or directory and leaves no symlink. In git, replicate the p4 behavior by ignoring these bad symlinks. If, in a later p4 revision, the symlink happens to point to something non-null, the symlink will be replaced properly. Add a big test for all this too. This happens to be a regression introduced by 1292df1 (git-p4: Fix occasional truncation of symlink contents., 2013-08-08) and appeared first in 1.8.5. But it shows up only in p4 repositories of dubious character, so can wait for a proper release. Tested-by: Damien Gérard <damien@iwi.me> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: ensure p4 symlink parsing worksPete Wyckoff2014-01-211-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While this happens to work, there was no test to make sure that the basic importing of a symlink from p4 to git functioned. Add a simple test to create a symlink in p4 and import it into git, then verify that the symlink exists and has the correct target. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git p4 test: wildcards are supportedPete Wyckoff2014-01-211-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 9d57c4a (git p4: implement view spec wildcards with "p4 where", 2013-08-30), all the wildcard types should be supported. Change must-fail tests to mark that they now pass. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'ss/safe-create-leading-dir-with-slash'Junio C Hamano2014-01-271-4/+8
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git clone $origin foo\bar\baz" on Windows failed to create the leading directories (i.e. a moral-equivalent of "mkdir -p"). * ss/safe-create-leading-dir-with-slash: safe_create_leading_directories(): on Windows, \ can separate path components
| * | | | | | | | | safe_create_leading_directories(): on Windows, \ can separate path componentsss/safe-create-leading-dir-with-slashMichael Haggerty2014-01-221-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cloning to a directory "C:\foo\bar" from Windows' cmd.exe where "foo" does not exist yet, Git would throw an error like fatal: could not create work tree dir 'c:\foo\bar'.: No such file or directory Fix this by not hard-coding a platform specific directory separator into safe_create_leading_directories(). This patch, including its entire commit message, is derived from a patch by Sebastian Schuberth. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'mh/safe-create-leading-directories'Junio C Hamano2014-01-276-67/+155
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up and protection against concurrent write access to the ref namespace. * mh/safe-create-leading-directories: rename_tmp_log(): on SCLD_VANISHED, retry rename_tmp_log(): limit the number of remote_empty_directories() attempts rename_tmp_log(): handle a possible mkdir/rmdir race rename_ref(): extract function rename_tmp_log() remove_dir_recurse(): handle disappearing files and directories remove_dir_recurse(): tighten condition for removing unreadable dir lock_ref_sha1_basic(): if locking fails with ENOENT, retry lock_ref_sha1_basic(): on SCLD_VANISHED, retry safe_create_leading_directories(): add new error value SCLD_VANISHED cmd_init_db(): when creating directories, handle errors conservatively safe_create_leading_directories(): introduce enum for return values safe_create_leading_directories(): always restore slash at end of loop safe_create_leading_directories(): split on first of multiple slashes safe_create_leading_directories(): rename local variable safe_create_leading_directories(): add explicit "slash" pointer safe_create_leading_directories(): reduce scope of local variable safe_create_leading_directories(): fix format of "if" chaining
| * | | | | | | | | rename_tmp_log(): on SCLD_VANISHED, retrymh/safe-create-leading-directoriesMichael Haggerty2014-01-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If safe_create_leading_directories() fails because a file along the path unexpectedly vanished, try again from the beginning. Try at most 4 times. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>