Re: [RFC/PATCH] pager.c: replace git_config with git_config_get_string

2014-06-28 Thread Matthieu Moy
Karsten Blees karsten.bl...@gmail.com writes: I still don't like that the invalidation is done in git_config_set, though, as this is also used to write completely unrelated files. I don't get it. It is used to write the config files. Yes, we trigger a complete reload instead of just changing

Re: Tackling Git Limitations with Singular Large Line-seperated Plaintext files

2014-06-28 Thread Jarrad Hope
Thank-you all for replying, It's just as Jason suggests - Genbank, FASTA EMBL are more or less the defacto standards, I suspect FASTA will be phased out because (to my knowledge) it does not support gene annotation, nevertheless, they are all text based. These formats usually insert linebreaks

RE: Trouble merging renamed but identical files - CONFLICT (rename/rename)

2014-06-28 Thread Jason Pyeron
-Original Message- From: Jason Pyeron Sent: Friday, June 27, 2014 20:42 To: 'git' Cc: 'Phil Hord' Subject: RE: Trouble merging renamed but identical files - CONFLICT (rename/rename) -Original Message- From: Jason Pyeron Sent: Friday, June 27, 2014 18:39

[PATCH v2 0/4] submodule config lookup API

2014-06-28 Thread Heiko Voigt
Here another iteration with all the comments incorporated: * Dropped the hashmap enum parameter patch * Renamed the test to t7411 * Compilation fixes and style Gmane seems offline for me, so I can not check but this should be the last iteration:

[PATCH v2 1/4] implement submodule config cache for lookup of submodule names

2014-06-28 Thread Heiko Voigt
This submodule configuration cache allows us to lazily read .gitmodules configurations by commit into a runtime cache which can then be used to easily lookup values from it. Currently only the values for path or name are stored but it can be extended for any value needed. It is expected that

[PATCH v2 2/4] extract functions for submodule config set and lookup

2014-06-28 Thread Heiko Voigt
This is one step towards using the new configuration API. We just extract these functions to make replacing the actual code easier. Signed-off-by: Heiko Voigt hvo...@hvoigt.net --- submodule.c | 142 +--- 1 file changed, 97 insertions(+),

[PATCH v2 3/4] use new config API for worktree configurations of submodules

2014-06-28 Thread Heiko Voigt
We remove the extracted functions and directly parse into and read out of the cache. This allows us to have one unified way of accessing submodule configuration values specific to single submodules. Regardless whether we need to access a configuration from history or from the worktree.

[PATCH v2 4/4] do not die on error of parsing fetchrecursesubmodules option

2014-06-28 Thread Heiko Voigt
We should not die when reading the submodule config cache since the user might not be able to get out of that situation when the configuration is part of the history. We should handle this condition later when the value is about to be used. Signed-off-by: Heiko Voigt hvo...@hvoigt.net ---

Re: [RFC/PATCH] pager.c: replace git_config with git_config_get_string

2014-06-28 Thread Karsten Blees
Am 28.06.2014 08:01, schrieb Matthieu Moy: Karsten Blees karsten.bl...@gmail.com writes: I still don't like that the invalidation is done in git_config_set, though, as this is also used to write completely unrelated files. I don't get it. It is used to write the config files. Yes, we

[PATCH 1/2] sha1_file: replace PATH_MAX buffer wirh strbuf in prepare_packed_git_one()

2014-06-28 Thread René Scharfe
Instead of using strbuf to create a message string in case a path is too long for our fixed-size buffer, replace that buffer with a strbuf and thus get rid of the limitation. Signed-off-by: Rene Scharfe l@web.de --- sha1_file.c | 41 +++-- 1 file changed,

[PATCH 2/4] sha1_file: use strncmp for string comparison

2014-06-28 Thread René Scharfe
Avoid overrunning the existing pack name (p-pack_name, a C string) in the case that the new path is longer by using strncmp instead of memcmp for comparing. While at it, replace the magic constant 4 with a strlen call to document its meaning. Signed-off-by: Rene Scharfe l@web.de ---

[PATCH v5 1/7] replace: add --graft option

2014-06-28 Thread Christian Couder
The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are [parents...] Then we create a replace ref that replace commit with the commit we just created. With this new option, it should be

[PATCH v5 2/7] replace: add test for --graft

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++

[PATCH v5 0/7] Add --graft option to git replace

2014-06-28 Thread Christian Couder
Here is a small patch series to implement: git replace [-f] --graft commit [parent...] This patch series goes on top of the patch series that implements --edit. The changes since v4, thanks to Junio and Peff, are: - The series has been rebased on top of Peff's series to store the

[PATCH v5 6/7] replace: remove signature when using --graft

2014-06-28 Thread Christian Couder
It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created when using --graft, but this can be dealt with in another commit or patch series. Signed-off-by: Christian Couder

[PATCH v5 3/7] Documentation: replace: add --graft option

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 ---

[PATCH v5 7/7] replace: add test for --graft with signed commit

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index ca45a84..80b85e3 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -7,6 +7,7 @@

[PATCH v5 4/7] contrib: add convert-grafts-to-replace-refs.sh

2014-06-28 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder

[PATCH v5 5/7] replace: refactor replacing parents

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 42 +- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index 3515979..ad47237 100644 --- a/builtin/replace.c +++

[PATCH 1/2] t6023-merge-file.sh: fix and mark as broken invalid tests

2014-06-28 Thread Max Kirillov
Tests merge without conflict (missing LF at EOF and merge result added missing LF are meaningless - the first one is identical to merge without conflict and the second compares results of those identical tests, which are always same. This has been so since their addition in ba1f5f3537. Probably

[PATCH 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-06-28 Thread Max Kirillov
If 'current-file' does not contain LF at EOF, and change between 'base-file' and 'other-file' does not change any line close to EOF, the 3-way merge should not add LF to EOF. This is what 'diff3 -m' does, and seems to be a reasonable expectation. The change which introduced the behavior is

[PATCH 0/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-06-28 Thread Max Kirillov
Hi. I have noticed that cherry-pick adds trailing newlines when it is not expected to - the change does not contain its addition. Here is the fix for it. The fix is quite debugging-driven, without detailed analysis of how exactly this add_nl parameter works in all cases. But it passes all tests.

[PATCH v2 0/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-06-28 Thread Max Kirillov
I realized the case when the newline adding can be needed. The version 2 have this case (union-merge of changes at EOF without LF) fixed, with adding corresponding tests. Max Kirillov (2): t6023-merge-file.sh: fix and mark as broken invalid tests git-merge-file: do not add LF at EOF while

[PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-06-28 Thread Max Kirillov
If 'current-file' does not contain LF at EOF, and change between 'base-file' and 'other-file' does not change any line close to EOF, the 3-way merge should not add LF to EOF. This is what 'diff3 -m' does, and seems to be a reasonable expectation. The change which introduced the behavior is

[PATCH v2 1/2] t6023-merge-file.sh: fix and mark as broken invalid tests

2014-06-28 Thread Max Kirillov
Tests merge without conflict (missing LF at EOF and merge result added missing LF are meaningless - the first one is identical to merge without conflict and the second compares results of those identical tests, which are always same. This has been so since their addition in ba1f5f3537. Probably

Re: What's cooking in git.git (Jun 2014, #06; Thu, 26)

2014-06-28 Thread Duy Nguyen
On Fri, Jun 27, 2014 at 5:02 AM, Junio C Hamano gits...@pobox.com wrote: * nd/split-index (2014-06-13) 32 commits - t1700: new tests for split-index mode - t2104: make sure split index mode is off for the version test - read-cache: force split index mode with GIT_TEST_SPLIT_INDEX -

Re: [PATCH v2 2/4] fsck: do not die when not enough memory to examine a pack entry

2014-06-28 Thread Duy Nguyen
On Fri, Jun 27, 2014 at 1:09 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: fsck is a tool that error() is more preferred than die(), but many more preferred without justifying why it is more preferred is not quite a justification, is it? Also,

Re: [PATCH v2 4/4] diff: mark any file larger than core.bigfilethreshold binary

2014-06-28 Thread Duy Nguyen
On Sat, Jun 28, 2014 at 1:56 AM, Thomas Braun thomas.br...@virtuell-zuhause.de wrote: The name is misleading and forced me to read it twice before I realized that this is populating the is-binary bit. It might make it a bit better if you renamed it to DIFF_POPULATE_IS_BINARY_BIT or perhaps

Re: [PATCH 1/2] sha1_file: replace PATH_MAX buffer wirh strbuf in prepare_packed_git_one()

2014-06-28 Thread Duy Nguyen
On Sat, Jun 28, 2014 at 9:47 PM, René Scharfe l@web.de wrote: - sprintf(path, %s/pack, objdir); - len = strlen(path); - dir = opendir(path); + strbuf_addstr(path, objdir); + strbuf_addstr(path, /pack); + dir = opendir(path.buf); if (!dir) {

Re: [PATCH 1/3] cache-tree: Create/update cache-tree on checkout

2014-06-28 Thread Duy Nguyen
On Sat, Jun 28, 2014 at 7:20 AM, David Turner dtur...@twopensource.com wrote: When git checkout checks out a branch, create or update the cache-tree so that subsequent operations are faster. Signed-off-by: David Turner dtur...@twitter.com --- builtin/checkout.c| 4 cache-tree.c

[PATCH v2 1/2] sha1_file: replace PATH_MAX buffer wirh strbuf in, prepare_packed_git_one()

2014-06-28 Thread René Scharfe
Instead of using strbuf to create a message string in case a path is too long for our fixed-size buffer, replace that buffer with a strbuf and thus get rid of the limitation. Helped-by: Duy Nguyen pclo...@gmail.com Signed-off-by: Rene Scharfe l@web.de --- @Duy: Thanks for catching the missing

[PATCH v2 2/2] sha1_file: use strncmp for string comparison

2014-06-28 Thread René Scharfe
Avoid overrunning the existing pack name (p-pack_name, a C string) in the case that the new path is longer by using strncmp instead of memcmp for comparing. While at it, replace the magic constant 4 with a strlen call to document its meaning. Signed-off-by: Rene Scharfe l@web.de --- No