Re: bug: git merge --no-commit loses track of file modes in the index

2014-06-13 Thread Stefan Haller
Joey Hess j...@kitenet.net wrote: If git merge --no-commit is used to merge a commit adding a file with an unusual mode -- specifically a symlink which has mode 12, it fails to stage the right mode into the index. This only happens when core.symlinks=false. I noticed it on FAT, but

Re: [PATCH v2 5/6] Win32: Thread-safe windows console output

2014-06-13 Thread Johannes Sixt
Am 07.06.2014 09:57, schrieb Stepan Kasal: From: Karsten Blees bl...@dcon.de Date: Sat, 14 Jan 2012 22:24:19 +0100 Winansi.c has many static variables that are accessed and modified from the [v][f]printf / fputs functions overridden in the file. This may cause multi threaded git commands that

Re: bug: git merge --no-commit loses track of file modes in the index

2014-06-13 Thread Johannes Sixt
Am 13.06.2014 03:38, schrieb Joey Hess: If git merge --no-commit is used to merge a commit adding a file with an unusual mode -- specifically a symlink which has mode 12, it fails to stage the right mode into the index. This only happens when core.symlinks=false. I noticed it on FAT, but

[PATCH v2] reuse cached commit buffer when parsing signatures

2014-06-13 Thread Jeff King
On Tue, Jun 10, 2014 at 05:35:09PM -0400, Jeff King wrote: Here's a re-roll of the commit-slab series. And here is a re-roll of the --show-signature speedup on top (i.e., the point of the series in the first place), adjusted to use get_commit_buffer. -- 8 -- Subject: reuse cached commit buffer

Re: [PATCH v5 2/4] commit test: Use write_script

2014-06-13 Thread Jeff King
On Thu, Jun 12, 2014 at 02:39:00PM -0500, Caleb Thompson wrote: Use write_script from t/test-lib-functions.sh instead of cat, shebang, and chmod. This protects us from potential shell meta-characters in the name of our trash directory, which would be interpreted if we set $EDITOR directly.

Re: [PATCH v5 3/4] commit test: test_set_editor in each test

2014-06-13 Thread Jeff King
On Thu, Jun 12, 2014 at 02:39:01PM -0500, Caleb Thompson wrote: t/t7507-commit-verbose.sh was using a global test_set_editor call to build its environment. Improve robustness against global state changes by having only tests which intend to use the $EDITOR to check for presence of a diff in

Re: [PATCH 0/5] submodule config lookup API

2014-06-13 Thread Jens Lehmann
Am 13.06.2014 00:04, schrieb Junio C Hamano: Hmph, this seems to conflict in a meaningful (and painful) way with Jens's jl/submodule-recursive-checkout. Then you might wanna drop my series for now, I need to rebase it above Heiko's series myself to make new submodules work anyway. -- To

Re: [PATCH v3 1/2] add strbuf_set operations

2014-06-13 Thread Jeff King
On Thu, Jun 12, 2014 at 04:46:37PM -0700, Jeremiah Mahler wrote: Although strbuf_set() does make the code a bit easier to read when strbufs are repeatedly re-used, re-using a variable for different purposes is generally considered poor programming practice. It's likely

Re: Confusing error message in rebase when commit becomes empty

2014-06-13 Thread Peter Krefting
Phil Hord: Did you have a series of three commits being squashed in your to-do list? I mean, did you have a list like this: pick ... do foo squash ... revert do foo squash ... What I really meant to do. Yes, that is exactly what I had. Plus an extra commit that I moved to the end,

Re: Confusing error message in rebase when commit becomes empty

2014-06-13 Thread Jeff King
On Wed, Jun 11, 2014 at 01:49:04PM +0100, Peter Krefting wrote: Hi! I am rebasing a branch to combine a couple of commits. One is a revert of a previous commit. Since there are commits in-between, I do squash to make sure I get everything, and then add the actual change on top of that. The

Re: Confusing error message in rebase when commit becomes empty

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 08:25:43AM +0100, Peter Krefting wrote: Yes, but empty commits are discouraged on some projects. If you want your change + revert = empty commit to appear after the squash, I would expect you would want to use --keep-empty on your inital rebase command. But I'm not

Re: git rebase --skip stuck in a loop

2014-06-13 Thread Jeff King
On Thu, Jun 12, 2014 at 09:16:34PM -0400, Phillip Susi wrote: I'm assuming this works in the general case, because we have tests for it. Do you perhaps have a repository and a set of reproduction steps we could use to try to reproduce this? If you can get that information, I'm

Why doesn't git-fetch obey -c remote.origin.url on the command-line?

2014-06-13 Thread Ævar Arnfjörð Bjarmason
On a git built from the master branch just now: $ ./git config remote.origin.url https://code.google.com/p/git-core/ $ ./git -c remote.origin.url=git://git.sourceforge.jp/gitroot/git-core/git.git config remote.origin.url git://git.sourceforge.jp/gitroot/git-core/git.git $ GIT_TRACE=1 ./git -c

Re: [PATCH 2/7] test: turn USR_BIN_TIME into a lazy prerequisite

2014-06-13 Thread Jeff King
On Mon, Jun 09, 2014 at 04:22:50PM -0700, Junio C Hamano wrote: Two test scripts (t3302 and t3419) had copy paste code to set USR_BIN_TIME prerequisite. Use the test_lazy_prereq helper to define them in the common t/test-lib.sh. I have to wonder why we even have such a prereq in the first

Re: Why doesn't git-fetch obey -c remote.origin.url on the command-line?

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 09:37:07AM +0200, Ævar Arnfjörð Bjarmason wrote: On a git built from the master branch just now: $ ./git config remote.origin.url https://code.google.com/p/git-core/ $ ./git -c remote.origin.url=git://git.sourceforge.jp/gitroot/git-core/git.git config

Re: [PATCH 2/3] gpg-interface: provide access to the payload

2014-06-13 Thread Jeff King
On Fri, Jun 06, 2014 at 04:15:27PM +0200, Michael J Gruber wrote: diff --git a/builtin/merge.c b/builtin/merge.c [...] + free(signature_check.payload); free(signature_check.gpg_output); free(signature_check.gpg_status);

Re: [PATCH RFC] git-am: support any number of signatures

2014-06-13 Thread Michael S. Tsirkin
On Thu, Jun 12, 2014 at 12:07:03PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: I'm using different signature tags for git am depending on the patch, project and other factors. Sometimes I add multiple tags as well, e.g. QEMU wants both Reviewed-by and

Re: [PATCH RFC] git-am: support any number of signatures

2014-06-13 Thread Michael S. Tsirkin
On Thu, Jun 12, 2014 at 09:25:54PM +0200, René Scharfe wrote: Am 12.06.2014 18:12, schrieb Michael S. Tsirkin: @@ -136,7 +136,7 @@ fall_back_3way () { eval $cmd GIT_INDEX_FILE=$dotest/patch-merge-tmp-index \ git write-tree $dotest/patch-merge-base+ || -cannot_fallback

Re: [PATCH 3/3] verify-commit: scriptable commit signature verification

2014-06-13 Thread Jeff King
On Fri, Jun 06, 2014 at 04:15:28PM +0200, Michael J Gruber wrote: Commit signatures can be verified using git show -s --show-signature or the %G? pretty format and parsing the output, which is well suited for user inspection, but not for scripting. Provide a command verify-commit which is

Re: Our merge bases sometimes suck

2014-06-13 Thread Michael J Gruber
Michael Haggerty venit, vidit, dixit 13.06.2014 00:12: I've been thinking a lot about merge bases lately and think I have discovered something interesting. tl;dr: When two branches have multiple merge bases, git merge-base $master $branch picks one merge base more or less

Re: [PATCH 2/3] gpg-interface: provide access to the payload

2014-06-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.06.2014 09:55: On Fri, Jun 06, 2014 at 04:15:27PM +0200, Michael J Gruber wrote: diff --git a/builtin/merge.c b/builtin/merge.c [...] +free(signature_check.payload); free(signature_check.gpg_output);

Re: [PATCH 3/3] verify-commit: scriptable commit signature verification

2014-06-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.06.2014 10:02: On Fri, Jun 06, 2014 at 04:15:28PM +0200, Michael J Gruber wrote: Commit signatures can be verified using git show -s --show-signature or the %G? pretty format and parsing the output, which is well suited for user inspection, but not for

Re: Our merge bases sometimes suck

2014-06-13 Thread Michael Haggerty
On 06/13/2014 11:38 AM, Michael J Gruber wrote: Michael Haggerty venit, vidit, dixit 13.06.2014 00:12: I've been thinking a lot about merge bases lately and think I have discovered something interesting. tl;dr: When two branches have multiple merge bases, git merge-base $master

Re: [PATCH 2/3] gpg-interface: provide access to the payload

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 11:44:28AM +0200, Michael J Gruber wrote: Perhaps this is a sign that we need a signature_check_clear() helper? ... or simply switch to language which has (or can overload) free for an object :) I hear somebody has reimplemented git in pure javascript. ;P Do we

[PATCHv2 5/6] t7510: test verify-commit

2014-06-13 Thread Michael J Gruber
This mixes the git verify-commit tests in with the git show --show-signature tests, to keep the tests more readable. The tests already mix in the call show tests with the verify tests. So in case of a test beakage, a '-v' run would be needed to reveal the exact point of breakage anyway.

[PATCHv2 1/6] pretty: free the gpg status buf

2014-06-13 Thread Michael J Gruber
4a868fd (pretty: parse the gpg status lines rather than the output, 2013-02-14) made the gpg status lines available to callers and made sure they freed the used space, but missed one spot. Free the status line buffer also in the remaining spot. Signed-off-by: Michael J Gruber

[PATCHv2 0/6] verify-commit: verify commit signatures

2014-06-13 Thread Michael J Gruber
Patch1: unchanged Patch2: unchanged Patch3: as fixed in Junio's tree already (===) Patch4: minor test fix for t7510 Patch5: tests for the verify-commit Patch6: make all struct signature_check users employ the same clear helper Michael J Gruber (6): pretty: free the gpg status buf

[PATCHv2 6/6] gpg-interface: provide clear helper for struct signature_check

2014-06-13 Thread Michael J Gruber
The struct has been growing members whose malloced memory needs to be freed. Do this with one helper function so that no malloced memory shall be left unfreed. Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net --- builtin/merge.c | 6 +- builtin/verify-commit.c | 5 +

[PATCHv2 2/6] gpg-interface: provide access to the payload

2014-06-13 Thread Michael J Gruber
In contrast to tag signatures, commit signatures are put into the header, that is between the other header parts and commit messages. Provide access to the commit content sans the signature, which is the payload that is actually signed. Commit signature verification does the parsing anyways, and

[PATCHv2 3/6] verify-commit: scriptable commit signature verification

2014-06-13 Thread Michael J Gruber
Commit signatures can be verified using git show -s --show-signature or the %G? pretty format and parsing the output, which is well suited for user inspection, but not for scripting. Provide a command verify-commit which is analogous to verify-tag: It returns 0 for good signatures and non-zero

[PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Michael J Gruber
When t7510 was introduced, the author made sure that a for loop in a subshell would return with the appropriate error code. Make sure this is true also the for the first line in each loop, which was missed. Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net --- t/t7510-signed-commit.sh |

Re: [PATCH 3/3] verify-commit: scriptable commit signature verification

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 11:55:22AM +0200, Michael J Gruber wrote: Did you give any thought to just having a git verify command, instead of separate tag/verify commands? Yes. (mathematician's answer) Cute. You know not only the outcome but also why I refrained from doing so:

Re: [PATCHv2 3/6] verify-commit: scriptable commit signature verification

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 12:42:45PM +0200, Michael J Gruber wrote: + + free(signature_check.gpg_output); + free(signature_check.gpg_status); + free(signature_check.signer); + free(signature_check.key); + return signature_check.result != 'G'; +} How about .payload here?

Re: [PATCHv2 1/6] pretty: free the gpg status buf

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 12:42:43PM +0200, Michael J Gruber wrote: 4a868fd (pretty: parse the gpg status lines rather than the output, 2013-02-14) made the gpg status lines available to callers and made sure they freed the used space, but missed one spot. Free the status line buffer also

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 12:42:46PM +0200, Michael J Gruber wrote: When t7510 was introduced, the author made sure that a for loop in a subshell would return with the appropriate error code. Make sure this is true also the for the first line in each loop, which was missed. Signed-off-by:

Re: [PATCHv2 3/6] verify-commit: scriptable commit signature verification

2014-06-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.06.2014 13:19: On Fri, Jun 13, 2014 at 12:42:45PM +0200, Michael J Gruber wrote: + +free(signature_check.gpg_output); +free(signature_check.gpg_status); +free(signature_check.signer); +free(signature_check.key); +return

Re: [PATCHv2 3/6] verify-commit: scriptable commit signature verification

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 01:45:58PM +0200, Michael J Gruber wrote: I sneekily fix this in 6/6... I thought 3/6 is on next already, too late for a real v2. Otherwise I would put 6/6 before everything else. Ah, yeah, I assumed we were still re-rolling (and it looks like you're just on pu so far).

Re: [PATCHv2 5/6] t7510: test verify-commit

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 12:42:47PM +0200, Michael J Gruber wrote: test_expect_success GPG 'detect fudged signature' ' git cat-file commit master raw sed -e s/seventh/7th forged/ raw forged1 git hash-object -w -t commit forged1 forged1.commit + ! git verify-commit

Re: [PATCHv2 5/6] t7510: test verify-commit

2014-06-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.06.2014 13:51: On Fri, Jun 13, 2014 at 12:42:47PM +0200, Michael J Gruber wrote: test_expect_success GPG 'detect fudged signature' ' git cat-file commit master raw sed -e s/seventh/7th forged/ raw forged1 git hash-object -w -t commit

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.06.2014 13:46: On Fri, Jun 13, 2014 at 12:42:46PM +0200, Michael J Gruber wrote: When t7510 was introduced, the author made sure that a for loop in a subshell would return with the appropriate error code. Make sure this is true also the for the first line in

Re: [PATCHv2 3/6] verify-commit: scriptable commit signature verification

2014-06-13 Thread Michael J Gruber
Jeff King venit, vidit, dixit 13.06.2014 13:50: On Fri, Jun 13, 2014 at 01:45:58PM +0200, Michael J Gruber wrote: I sneekily fix this in 6/6... I thought 3/6 is on next already, too late for a real v2. Otherwise I would put 6/6 before everything else. Ah, yeah, I assumed we were still

[PATCH 00/32] Split index resend

2014-06-13 Thread Nguyễn Thái Ngọc Duy
This is basically what's in 'pu' with fixup patches squashed in (also resend is a good way to get people's eyes on it one more time). There's also another minor change that SOMETHING_CHANGED now has value 1. This is the usual value of cache_changed before this series. So if another in-flight

[PATCH 02/32] ewah: delete unused ewah_read_mmap_native declaration

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- ewah/ewok.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ewah/ewok.h b/ewah/ewok.h index 0556ca5..f6ad190 100644 --- a/ewah/ewok.h +++ b/ewah/ewok.h @@ -100,7 +100,6 @@ int ewah_serialize_native(struct ewah_bitmap *self, int fd);

[PATCH 04/32] read-cache: new API write_locked_index instead of write_index/write_cache

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c| 6 ++ builtin/apply.c | 9 - builtin/checkout-index.c | 3 +-- builtin/checkout.c | 11 --- builtin/clone.c | 7 +++ builtin/commit.c | 33

[PATCH 01/32] ewah: fix constness of ewah_read_mmap

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- ewah/ewah_io.c | 4 ++-- ewah/ewok.h| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c index f7f700e..1c2d7af 100644 --- a/ewah/ewah_io.c +++ b/ewah/ewah_io.c @@ -110,9 +110,9 @@ int

[PATCH 03/32] sequencer: do not update/refresh index if the lock cannot be held

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index bde5f04..7b886a6 100644 --- a/sequencer.c +++ b/sequencer.c @@ -679,7 +679,7 @@ static void read_and_refresh_cache(struct

[PATCH 05/32] read-cache: relocate and unexport commit_locked_index()

2014-06-13 Thread Nguyễn Thái Ngọc Duy
This function is now only used by write_locked_index(). Move it to read-cache.c (because read-cache.c will need to be aware of alternate_index_output later) and unexport it. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 - lockfile.c | 20

[PATCH 10/32] resolve-undo: be specific what part of the index has changed

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h| 1 + resolve-undo.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 31d4541..976f2e0 100644 --- a/cache.h +++ b/cache.h @@ -272,6 +272,7 @@ static inline unsigned int

[PATCH 08/32] read-cache: be specific what part of the index has changed

2014-06-13 Thread Nguyễn Thái Ngọc Duy
cache entry additions, removals and modifications are separated out. The rest of changes are still in the catch-all flag SOMETHING_CHANGED, which would be more specific later. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/update-index.c | 6 +++--- cache.h|

[PATCH 07/32] read-cache: be strict about changed in remove_marked_cache_entries()

2014-06-13 Thread Nguyễn Thái Ngọc Duy
remove_marked_cache_entries() deletes entries marked with CE_REMOVE. But if there is no such entry, do not mark the index as changed because that could trigger an index update unnecessarily. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- read-cache.c | 2 ++ 1 file changed, 2

[PATCH 09/32] update-index: be specific what part of the index has changed

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/update-index.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index d2654d6..e0e881b 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@

[PATCH 06/32] read-cache: store in-memory flags in the first 12 bits of ce_flags

2014-06-13 Thread Nguyễn Thái Ngọc Duy
We're running out of room for in-memory flags. But since b60e188 (Strip namelen out of ce_flags into a ce_namelen field - 2012-07-11), we copy the namelen (first 12 bits) to ce_namelen field. So those bits are free to use. Just make sure we do not accidentally write any in-memory flags back.

[PATCH 15/32] entry.c: update cache_changed if refresh_cache is set in checkout_entry()

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Other fill_stat_cache_info() is on new entries, which should set CE_ENTRY_ADDED in cache_changed, so we're safe. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/apply.c | 8 +--- builtin/checkout-index.c | 1 + builtin/checkout.c | 1 + cache.h

[PATCH 11/32] unpack-trees: be specific what part of the index has changed

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- unpack-trees.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 97fc995..a722685 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -246,7 +246,9 @@ static int

[PATCH 13/32] cache-tree: mark istate-cache_changed on cache tree update

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache-tree.c | 25 +++-- cache-tree.h | 2 +- merge-recursive.c | 4 +--- sequencer.c| 4 +--- test-dump-cache-tree.c | 7 --- 5 files changed, 18 insertions(+), 24

[PATCH 17/32] read-cache: split-index mode

2014-06-13 Thread Nguyễn Thái Ngọc Duy
This split-index mode is designed to keep write cost proportional to the number of changes the user has made, not the size of the work tree. (Read cost is another matter, to be dealt separately.) This mode stores index info in a pair of $GIT_DIR/index and $GIT_DIR/sharedindex.SHA-1. sharedindex

[PATCH 16/32] read-cache: save index SHA-1 after reading

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Also update SHA-1 after writing. If we do not do that, the second read_index() will see initialized variable already set and not read .git/index again, which is fine, except istate-sha1 now has a stale value. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h| 1 +

[PATCH 12/32] cache-tree: mark istate-cache_changed on cache tree invalidation

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/blame.c| 2 +- builtin/update-index.c | 4 ++-- cache-tree.c | 15 +++ cache-tree.h | 2 +- cache.h| 1 + read-cache.c | 6 +++--- unpack-trees.c | 2

[PATCH 14/32] cache-tree: mark istate-cache_changed on prime_cache_tree()

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/read-tree.c | 2 +- builtin/reset.c | 2 +- cache-tree.c| 9 + cache-tree.h| 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/builtin/read-tree.c b/builtin/read-tree.c index

[PATCH 20/32] read-cache: mark updated entries for split index

2014-06-13 Thread Nguyễn Thái Ngọc Duy
The large part of this patch just follows CE_ENTRY_CHANGED marks. replace_index_entry() is updated to update split_index-base-cache[] as well so base-cache[] does not reference to a freed entry. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/update-index.c | 2 ++ cache.h

[PATCH 19/32] read-cache: save deleted entries in split index

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Entries that belong to the base index should not be freed. Mark CE_REMOVE to track them. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- read-cache.c | 14 -- split-index.c | 12 split-index.h | 1 + 3 files changed, 21 insertions(+), 6 deletions(-) diff

[PATCH 21/32] split-index: the writing part

2014-06-13 Thread Nguyễn Thái Ngọc Duy
prepare_to_write_split_index() does the major work, classifying deleted, updated and added entries. write_link_extension() then just writes it down. An observation is, deleting an entry, then adding it back is recorded as entry X is deleted, entry X is added, not entry X is replaced. This is

[PATCH 18/32] read-cache: mark new entries for split index

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Make sure entry addition does not lead to unifying the index. We don't need to explicitly keep track of new entries. If ce-index is zero, they're new. Otherwise it's unlikely that they are new, but we'll do a thorough check later at writing time. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH 22/32] split-index: the reading part

2014-06-13 Thread Nguyễn Thái Ngọc Duy
CE_REMOVE'd entries are removed here because only parts of the code base (unpack_trees in fact) test this bit when they look for the presence of an entry. Leaving them may confuse the code ignores this bit and expects to see a real entry. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH 24/32] split-index: strip pathname of on-disk replaced entries

2014-06-13 Thread Nguyễn Thái Ngọc Duy
We know the positions of replaced entries via the replace bitmap in link extension, so the name path does not have to be stored (it's still in the shared index). With this, we also have a way to distinguish additions vs replacements at load time and can catch broken link extensions.

[PATCH 25/32] update-index: new options to enable/disable split index mode

2014-06-13 Thread Nguyễn Thái Ngọc Duy
If you have a large work tree but only make changes in a subset, then $GIT_DIR/index's size should be stable after a while. If you change branches that touch something else, $GIT_DIR/index's size may grow large that it becomes as slow as the unified index. Do --split-index again occasionally to

[PATCH 23/32] split-index: do not invalidate cache-tree at read time

2014-06-13 Thread Nguyễn Thái Ngọc Duy
We are sure that after merge_base_index() is done. cache-tree can still be used with the final index. So don't destroy cache tree. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 + read-cache.c | 3 ++- split-index.c | 1 + 3 files changed, 4 insertions(+), 1

[PATCH 26/32] update-index --split-index: do not split if $GIT_DIR is read only

2014-06-13 Thread Nguyễn Thái Ngọc Duy
If $GIT_DIR is read only, we can't write $GIT_DIR/sharedindex. This could happen when $GIT_INDEX_FILE is set to somehwere outside $GIT_DIR. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- read-cache.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

[PATCH 27/32] rev-parse: add --shared-index-path to get shared index path

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Normally scripts do not have to be aware about split indexes because all shared indexes are in $GIT_DIR. A simple mv $tmp_index $GIT_DIR/somewhere is enough. Scripts that generate temporary indexes and move them across repos must be aware about split index and copy the shared file as well. This

[PATCH 28/32] read-tree: force split-index mode off on --index-output

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Just a (paranoid?) safety measure.. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- read-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c index aa848e1..b1027f7 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2070,7 +2070,8 @@

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Michael J Gruber
Michael J Gruber venit, vidit, dixit 13.06.2014 14:04: Jeff King venit, vidit, dixit 13.06.2014 13:46: On Fri, Jun 13, 2014 at 12:42:46PM +0200, Michael J Gruber wrote: When t7510 was introduced, the author made sure that a for loop in a subshell would return with the appropriate error code.

[PATCH 30/32] read-cache: force split index mode with GIT_TEST_SPLIT_INDEX

2014-06-13 Thread Nguyễn Thái Ngọc Duy
This could be used to run the whole test suite with split indexes. Index splitting is carried out at random. git read-tree also resets the index and forces splitting at the next update. I had a lot of headaches with the test suite, which proves it exercises split index pretty good.

[PATCH 29/32] read-tree: note about dropping split-index mode or index version

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/read-tree.c | 9 + 1 file changed, 9 insertions(+) diff --git a/builtin/read-tree.c b/builtin/read-tree.c index 3204c62..e7e1c33 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -155,6 +155,15 @@ int

[PATCH 32/32] t1700: new tests for split-index mode

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- .gitignore | 1 + Makefile| 1 + cache.h | 2 + read-cache.c| 3 +- t/t1700-split-index.sh (new +x) | 194

[PATCH 31/32] t2104: make sure split index mode is off for the version test

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Version tests only make sense when all entries are in the same file, so we can see if version is downgraded to 2 if 3 is not required. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- t/t2104-update-index-skip-worktree.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Michael J Gruber
Michael J Gruber venit, vidit, dixit 13.06.2014 14:22: Michael J Gruber venit, vidit, dixit 13.06.2014 14:04: Jeff King venit, vidit, dixit 13.06.2014 13:46: On Fri, Jun 13, 2014 at 12:42:46PM +0200, Michael J Gruber wrote: When t7510 was introduced, the author made sure that a for loop in a

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 02:33:02PM +0200, Michael J Gruber wrote: With X Y || exit 1 inside the loop, the loop statement will return false, but the loop will continue (if X returns false), which is exactly the problem that the exit avoids. Make your example iterate over false true

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Johannes Sixt
Am 6/13/2014 14:33, schrieb Michael J Gruber: with this loop, sorry: for X in true false; do for Y in false true; do ($X $Y || exit 1) done echo $X/last inner $Y: $? done gives true/last inner true: 0 false/last inner true: 1 even though on both cases

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Michael J Gruber
Johannes Sixt venit, vidit, dixit 13.06.2014 14:54: Am 6/13/2014 14:33, schrieb Michael J Gruber: with this loop, sorry: for X in true false; do for Y in false true; do ($X $Y || exit 1) done echo $X/last inner $Y: $? done gives true/last inner true: 0

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Johannes Sixt
Am 6/13/2014 15:06, schrieb Michael J Gruber: Johannes Sixt venit, vidit, dixit 13.06.2014 14:54: Am 6/13/2014 14:33, schrieb Michael J Gruber: with this loop, sorry: for X in true false; do for Y in false true; do ($X $Y || exit 1) done echo $X/last inner $Y:

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Jeff King
On Fri, Jun 13, 2014 at 03:21:55PM +0200, Johannes Sixt wrote: I don't think so. What is the outcome of false # simulate a regression grep foo exit 1 ! grep bar || exit 1 assuming that the '! grep bar' happens to be true? Answer: The regression is not diagnosed

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Michael J Gruber
Johannes Sixt venit, vidit, dixit 13.06.2014 15:21: Am 6/13/2014 15:06, schrieb Michael J Gruber: Johannes Sixt venit, vidit, dixit 13.06.2014 14:54: Am 6/13/2014 14:33, schrieb Michael J Gruber: with this loop, sorry: for X in true false; do for Y in false true; do ($X

Re: [msysGit] Multi-line commit message changed to a single one

2014-06-13 Thread Erik Faye-Lund
On Fri, Jun 13, 2014 at 1:44 PM, jese@gmail.com wrote: Hi, Here is a simple script to show my problem. I don't know if it's a wrong operation (from me), a wrong configuration/parameter, or either a bug, but I don't get what I expected. From a git repo (#1), I created a commit

Re: [PATCHv2 4/6] t7510: exit for loop with test result

2014-06-13 Thread Johannes Sixt
Am 6/13/2014 15:31, schrieb Michael J Gruber: rewrite of the form a b test_must_fail c d || exit 1 hoping that will make things both readable (by avoiding !) and concise (by avoiding repeated exits). Thanks! Please note that we use 'test_must_fail' only for git invocations, but we

Re: git rebase --skip stuck in a loop

2014-06-13 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/13/2014 3:34 AM, Jeff King wrote: Thanks for saving the stuck state. If it's possible to share the whole repo, it might be worth seeing (then we can all just run git rebase --continue ourselves). If it's too big or is confidential, just

Vorschlag

2014-06-13 Thread Peter
Hallo Ich habe ein Investment-Portfolio, die Geld in der Bank in China hinterlegt, die ich leicht auf Sie übertragen als Begünstigter bringt. Die Transaktion ist ohne Risiko, da es strategisch geplant abgeschlossen erfolgreich. Kontaktieren Sie mich auf meiner E-Mail-Adresse unten für

[PATCH 0/2] Fixes for the ref-transactions series in origin/pu

2014-06-13 Thread Ronnie Sahlberg
Jun, Please find two fixes for the ref-transactions series in origin/pu Ronnie Sahlberg (2): remotes.c: update calls to new signature for repack_without_refs receive-pack.c: add missing xstrdup builtin/receive-pack.c | 21 +++-- builtin/remote.c | 5 +++-- refs.h

[PATCH 1/2] remotes.c: update calls to new signature for repack_without_refs

2014-06-13 Thread Ronnie Sahlberg
This should be merged into patch: 00c74db refs.c: add an err argument to repack_without_refs Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/remote.c | 5 +++-- refs.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/remote.c

[PATCH 2/2] receive-pack.c: add missing xstrdup

2014-06-13 Thread Ronnie Sahlberg
This should be merged into patch : 1685d87 receive-pack.c: use a reference transaction for updating the refs Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/receive-pack.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git

Re: [PATCH v15 00/48] Use ref transactions

2014-06-13 Thread Ronnie Sahlberg
Looking at it, thanks! I found two issues, I have just sent patches to the list for them. You can just fixup these two patches in origin/pu? Or do you want me to re-send the series? regards ronnie sahlberg On Thu, Jun 12, 2014 at 3:15 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie

Re: Our merge bases sometimes suck

2014-06-13 Thread Jakub Narębski
W dniu 2014-06-13 11:38, Michael J Gruber pisze: Michael Haggerty venit, vidit, dixit 13.06.2014 00:12: I've been thinking a lot about merge bases lately and think I have discovered something interesting. tl;dr: When two branches have multiple merge bases, git merge-base $master $branch

Re: [PATCH v6] Add an explicit GIT_DIR to the list of excludes

2014-06-13 Thread Pasha Bolokhov
+ test_cmp status.actual.2 status.expect.2 It is customary to call the files 'expect' and 'actual'. Furthermore, swap the order so that in case of a failure the diff shows how the actual text was changed from the expected text: test_cmp status.expect.2

Re: [PATCH v5 2/4] commit test: Use write_script

2014-06-13 Thread Caleb Thompson
You're very right - I may have confused this commit message and the one to switch to test_set_editor. I'll rewrite this commit message. What do you think of something like this for the description: Use write_script from t/test-lib-functions.sh instead of cat, shebang, and chmod. This

[PATCH v7] Add an explicit GIT_DIR to the list of excludes

2014-06-13 Thread Pasha Bolokhov
When an explicit '--git-dir' option points to a directory inside the work tree, git treats it as if it were any other directory. In particular, 'git status' lists it as untracked, while 'git add -A' stages the metadata directory entirely Add GIT_DIR to the list of excludes in a dedicated function

Re: [PATCH v5 3/4] commit test: test_set_editor in each test

2014-06-13 Thread Caleb Thompson
On Fri, Jun 13, 2014 at 02:59:42AM -0400, Jeff King wrote: On Thu, Jun 12, 2014 at 02:39:01PM -0500, Caleb Thompson wrote: t/t7507-commit-verbose.sh was using a global test_set_editor call to build its environment. Improve robustness against global state changes by having only tests

[no subject]

2014-06-13 Thread Le Ngoc. Thong
I have a business offer for you; reply on my email:- tinaqatt...@collector.org-- 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 v5 0/4] commit: Add commit.verbose configuration

2014-06-13 Thread Caleb Thompson
On Thu, Jun 12, 2014 at 01:30:10PM -0700, Jeremiah Mahler wrote: On Thu, Jun 12, 2014 at 02:38:58PM -0500, Caleb Thompson wrote: This patch allows people to set commit.verbose to implicitly send --verbose to git-commit. This version incorporates changes suggested by Eric Sunshine, Duy

Re: [PATCH v6] Add an explicit GIT_DIR to the list of excludes

2014-06-13 Thread Junio C Hamano
Pasha Bolokhov pasha.bolok...@gmail.com writes: + test_cmp status.actual.2 status.expect.2 It is customary to call the files 'expect' and 'actual'. Furthermore, swap the order so that in case of a failure the diff shows how the actual text was changed from the expected text:

[PATCH] refs.c: fix delete_ref_loose

2014-06-13 Thread Ronnie Sahlberg
Please use this to fixup the patch: refs.c: add an err argument to delete_ref_loose With this fix and the two previous ones the ref-transactions support in origin/pu passes all tests. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- wrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH 3/3] verify-commit: scriptable commit signature verification

2014-06-13 Thread Junio C Hamano
Jeff King p...@peff.net writes: I realize this isn't really your itch to scratch. It's just that when I see a description like verify a commit, I wonder what exactly verify means. I think that is an important point. If a tool only verifies the signature of the commit when conceivably other

  1   2   >