Re: [PATCH] merge, pull: stop advising 'commit -a' in case of conflict
Junio C Hamano gits...@pobox.com writes: Here is how I phrased in the one queued tentatively. OK with me, thanks, -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] read_index_from(): catch out of order entries when reading an index file
Signed-off-by: Jaime Soriano Pastor jsorianopas...@gmail.com --- read-cache.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/read-cache.c b/read-cache.c index 5d3c8bd..023d6d7 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1465,6 +1465,21 @@ static struct cache_entry *create_from_disk(struct ondisk_cache_entry *ondisk, return ce; } +static void check_ce_order(struct cache_entry *ce, struct cache_entry *next_ce) +{ + int name_compare = strcmp(ce-name, next_ce-name); + if (0 name_compare) + die(unordered stage entries in index); + if (!name_compare) { + if (!ce_stage(ce)) + die(multiple stage entries for merged file '%s', + ce-name); + if (ce_stage(ce) ce_stage(next_ce)) + die(unordered stage entries for '%s', + ce-name); + } +} + /* remember to discard_cache() before reading a different cache! */ int do_read_index(struct index_state *istate, const char *path, int must_exist) { @@ -1526,6 +1541,9 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist) ce = create_from_disk(disk_ce, consumed, previous_name); set_index_entry(istate, i, ce); + if (i 0) + check_ce_order(istate-cache[i - 1], ce); + src_offset += consumed; } strbuf_release(previous_name_buf); -- 2.0.4.1.gca370f9.dirty -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL] l10n updates for Git 2.1.1
Hi Junio, Please pull the following l10n updates to the maint branch. The following changes since commit 869951babc24fef5c5cd58f86baefc25b6ed3765: l10n: de.po: improve message when switching branches (2014-08-23 19:17:38 +0200) are available in the git repository at: git://github.com/git-l10n/git-po for you to fetch changes up to 782ac539ea6fd069ede52917f047ffa9a81947e5: po/TEAMS: add new members to German translation team (2014-08-29 07:08:17 +0200) Ralf Thielow (2): l10n: de.po: translate 38 new messages po/TEAMS: add new members to German translation team po/TEAMS |2 + po/de.po | 2872 +- 2 files changed, 1515 insertions(+), 1359 deletions(-) -- Jiang Xin -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] t9300: test filedelete root
On 29 авг. 2014 г., at 2:30, Junio C Hamano gits...@pobox.com wrote: You may have been concentrating on the delete root case, but as long as you claim We add a series to test filedelete command, it would be sensible to test more typical cases of deleting files, not the entire tree as well, no? Perhaps add three paths in the initial commit e.g. hello.c, good/night.txt and good/bye.txt, first remove good/night.txt and validate the result, then remove good/ directory and validate the result, and finally remove the whole thing and validate the result, or something like that? Sure, I’ll add more tests for filedelete command. In a patch series that introduces a demonstration of existing breakage and then fixes the breakage in a separate patch, mark the test that shows the known breakage with test_expect_failure and then turn that line into test_expect_success in the later patch that fixes the breakage. Ok, thanks.-- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] fast-import: fix segfault in store_tree()
On 29 авг. 2014 г., at 3:16, Junio C Hamano gits...@pobox.com wrote: Missing ‘;' Thanks, I’ll fix it. What a stupid mistype, I was writing some amount of Go code recently and it doesn’t use semicolons. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/2] t9300: test filedelete command
Add new fast-import test series for filedelete command. Signed-off-by: Maxim Bublis sat...@yandex-team.ru --- t/t9300-fast-import.sh | 104 + 1 file changed, 104 insertions(+) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 5fc9ef2..9cf5e45 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -3017,4 +3017,108 @@ test_expect_success 'T: empty reset doesnt delete branch' ' git rev-parse --verify refs/heads/not-to-delete ' +### +### series U (filedelete) +### + +cat input INPUT_END +commit refs/heads/U +committer $GIT_COMMITTER_NAME $GIT_COMMITTER_EMAIL $GIT_COMMITTER_DATE +data COMMIT +test setup +COMMIT +M 100644 inline hello.c +data BLOB +blob 1 +BLOB +M 100644 inline good/night.txt +data BLOB +sleep well +BLOB +M 100644 inline good/bye.txt +data BLOB +au revoir +BLOB + +INPUT_END + +test_expect_success 'U: initialize for U tests' ' + git fast-import input +' + +cat input INPUT_END +commit refs/heads/U +committer $GIT_COMMITTER_NAME $GIT_COMMITTER_EMAIL $GIT_COMMITTER_DATE +data COMMIT +delete good/night.txt +COMMIT +from refs/heads/U^0 +D good/night.txt + +INPUT_END + +test_expect_success 'U: filedelete file succeeds' ' + git fast-import input +' + +cat expect EOF +:100644 00 2907ebb4bf85d91bf0716bb3bd8a68ef48d6da76 D good/night.txt +EOF + +git diff-tree -M -r U^1 U actual + +test_expect_success 'U: validate file delete result' ' + compare_diff_raw expect actual +' + +cat input INPUT_END +commit refs/heads/U +committer $GIT_COMMITTER_NAME $GIT_COMMITTER_EMAIL $GIT_COMMITTER_DATE +data COMMIT +delete good dir +COMMIT +from refs/heads/U^0 +D good + +INPUT_END + +test_expect_success 'U: filedelete directory succeeds' ' + git fast-import input +' + +cat expect EOF +:100644 00 69cb75792f55123d8389c156b0b41c2ff00ed507 D good/bye.txt +EOF + +git diff-tree -M -r U^1 U actual + +test_expect_success 'U: validate directory delete result' ' + compare_diff_raw expect actual +' + +cat input INPUT_END +commit refs/heads/U +committer $GIT_COMMITTER_NAME $GIT_COMMITTER_EMAIL $GIT_COMMITTER_DATE +data COMMIT +must succeed +COMMIT +from refs/heads/U^0 +D + +INPUT_END + +test_expect_failure 'U: filedelete root succeeds' ' +git fast-import input +' + +cat expect EOF +:100644 00 c18147dc648481eeb65dc5e66628429a64843327 D hello.c +EOF + +git diff-tree -M -r U^1 U actual + +test_expect_failure 'U: validate root delete result' ' + compare_diff_raw expect actual +' + test_done -- 1.8.5.2 (Apple Git-48) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/2] fast-import: fix segfault in store_tree()
Branch tree is NULLified by filedelete command if we are trying to delete root tree. Add sanity check and use load_tree() in that case. Signed-off-by: Maxim Bublis sat...@yandex-team.ru --- fast-import.c | 6 +- t/t9300-fast-import.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fast-import.c b/fast-import.c index d73f58c..e380804 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1419,7 +1419,7 @@ static void mktree(struct tree_content *t, int v, struct strbuf *b) static void store_tree(struct tree_entry *root) { - struct tree_content *t = root-tree; + struct tree_content *t; unsigned int i, j, del; struct last_object lo = { STRBUF_INIT, 0, 0, /* no_swap */ 1 }; struct object_entry *le = NULL; @@ -1427,6 +1427,10 @@ static void store_tree(struct tree_entry *root) if (!is_null_sha1(root-versions[1].sha1)) return; + if (!root-tree) + load_tree(root); + t = root-tree; + for (i = 0; i t-entry_count; i++) { if (t-entries[i]-tree) store_tree(t-entries[i]); diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 9cf5e45..d400442 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -3107,7 +3107,7 @@ D INPUT_END -test_expect_failure 'U: filedelete root succeeds' ' +test_expect_success 'U: filedelete root succeeds' ' git fast-import input ' @@ -3117,7 +3117,7 @@ EOF git diff-tree -M -r U^1 U actual -test_expect_failure 'U: validate root delete result' ' +test_expect_success 'U: validate root delete result' ' compare_diff_raw expect actual ' -- 1.8.5.2 (Apple Git-48) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/2] fast-import: fix segfault and filedelete tests
Removing root tree with filedelete command would lead to segmentation fault in store_tree(). First patch from patch series adds filedelete command tests with test case to show incorrect behaviour on filedelete root operation. Second one fixes bug by sanity check and load_tree() usage. Maxim Bublis (2): t9300: test filedelete command fast-import: fix segfault in store_tree() fast-import.c | 6 ++- t/t9300-fast-import.sh | 104 + 2 files changed, 109 insertions(+), 1 deletion(-) -- 1.8.5.2 (Apple Git-48) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/9] autoconf: Check for timer_t
For the record, this commit doesn't contain my errata for OS X: ifeq ($(uname_S),Darwin) ... HAVE_DEV_TTY = YesPlease + NO_TIMER_T = UnfortunatelyYes COMPAT_OBJS += compat/precompose_utf8.o ... endif -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git fsck exit code?
On Wed, Aug 27, 2014 at 06:10:12PM -0400, David Turner wrote: It looks like git fsck exits with 0 status even if there are some errors. The only case where there's a non-zero exit code is if verify_pack reports errors -- but not e.g. fsck_object_dir. It will also bail non-zero with _certain_ tree errors that cause git to die() rather than fscking more completely. Is that really the intended behavior? I think it would be nice to at least support --exit-code (but probably a sensible exit code ought to be the default). I don't know that the current behavior is really intended. I agree that I would expect a non-zero exit code if there are errors. Fsck also has some warnings. I do not know what those should produce (I'd think a zero exit normally, and some option like -Werror to turn them into errors). -Peff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] index-pack: handle duplicate base objects gracefully
On Fri, Aug 29, 2014 at 3:08 PM, Jeff King p...@peff.net wrote: On Fri, Aug 29, 2014 at 02:56:18PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: If a pack contains duplicates of an object, and if that object has any deltas pointing at it with REF_DELTA, we will try to resolve the deltas twice. While unusual, this is not strictly an error, but we currently die() with an unhelpful message. Hmm, I vaguely recall Shawn declaring this as an error in the pack stream, though. I agree it is probably a bug on the sending side, but I think last time this came up we decided to try to be liberal in what we accept. c.f. http://thread.gmane.org/gmane.comp.version-control.git/232305/focus=232310 IIRC they aren't valid pack files to contain duplicates. Once upon a time JGit had a bug and android.googlesource.com returned duplicate objects in a Linux kernel repository. This caused at least some versions of git-core to fail very badly in binary search at object lookup time or something. We had a lot of users angry with us. :) I know Nico said its OK last year, but its really not. I don't think implementations are capable of handling it. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html