Re: [PATCH] Rewrite diff-no-index.c:read_directory() to use is_dot_or_dotdot() and rename it to read_dir()

2014-03-15 Thread Akshay Aurora
Forgot to mention, this is one of the microprojects for GSoC this year. Would be great to have some feedback. On Fri, Mar 14, 2014 at 6:09 PM, Akshay Aurora akshayaur...@yahoo.com wrote: I have renamed diff-no-index.c:read_directory() to read_dir() to avoid name collision with

Re: What's cooking in git.git (Mar 2014, #03; Fri, 14)

2014-03-15 Thread Torsten Bögershausen
On 2014-03-14 23.09, Junio C Hamano wrote: * ap/remote-hg-skip-null-bookmarks (2014-01-02) 1 commit - remote-hg: do not fail on invalid bookmarks Reported to break tests ($gmane/240005) Expecting a reroll. I wonder what should happen here. The change breaks all the tests in

[PATCH 0/6] Fix misuses of nor

2014-03-15 Thread Justin Lebar
I got annoyed by git's awkward use of nor in man pages and in git add -p, so I went ahead and audited all uses of nor in the tree. One might be able to argue that some of the uses I've changed are technically acceptable, but that's a pretty low bar to set for ourselves. I aimed to make

[PATCH 2/6] contrib: Fix misuses of nor

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar jle...@google.com --- contrib/examples/git-commit.sh | 2 +- contrib/svn-fe/svn-fe.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/examples/git-commit.sh b/contrib/examples/git-commit.sh index 23ffb02..4aab1a6 100755 ---

[PATCH 4/6] Fix misuses of nor in comments

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar jle...@gmail.com --- Makefile| 2 +- builtin/apply.c | 2 +- builtin/checkout.c | 2 +- builtin/log.c | 2 +- builtin/pack-objects.c

[PATCH 5/6] Fix misuses of nor outside comments

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar jle...@gmail.com --- builtin/clean.c | 6 +++--- builtin/commit.c | 2 +- git-add--interactive.perl | 4 ++-- perl/Git/SVN.pm | 4 ++-- sha1_file.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 6/6] Tests: Fix misuses of nor

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar jle...@gmail.com --- t/t1001-read-tree-m-2way.sh | 2 +- t/t4005-diff-rename-2.sh | 2 +- t/t4009-diff-rename-4.sh | 2 +- t/t5304-prune.sh | 2 +- t/t6036-recursive-corner-cases.sh | 2 +- t/t7104-reset.sh | 2

[PATCH 1/6] Documentation: Fix misuses of nor

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar jle...@google.com --- Documentation/CodingGuidelines | 4 ++-- Documentation/config.txt| 6 +++--- Documentation/diff-generate-patch.txt | 2 +- Documentation/diff-options.txt | 2

[PATCH 3/6] l10n: Fix misuses of nor

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar jle...@google.com --- po/bg.po| 6 +++--- po/de.po| 6 +++--- po/fr.po| 6 +++--- po/git.pot | 6 +++--- po/it.po| 2 +- po/pt_PT.po | 2 +- po/sv.po| 6 +++--- po/vi.po| 6 +++--- po/zh_CN.po | 6 +++--- 9 files changed, 23 insertions(+), 23

Re: [PATCH 0/6] Fix misuses of nor

2014-03-15 Thread Duy Nguyen
On Sat, Mar 15, 2014 at 3:41 PM, Justin Lebar jle...@google.com wrote: I got annoyed by git's awkward use of nor in man pages and in git add -p, so I went ahead and audited all uses of nor in the tree. One might be able to argue that some of the uses I've changed are technically acceptable,

Re: [PATCH] test-lib.sh: use printf instead of echo

2014-03-15 Thread Johannes Sixt
Am 15.03.2014 00:57, schrieb Uwe Storbeck: when variables may contain backslash sequences. Backslash sequences are interpreted as control characters by the echo command of some shells (e.g. dash). Signed-off-by: Uwe Storbeck u...@ibr.ch --- t/test-lib.sh | 4 ++-- 1 file changed, 2

[PATCH] add: Use struct argv_array in run_add_interactive()

2014-03-15 Thread Fabian Ruch
run_add_interactive() in builtin/add.c manually computes array bounds and allocates a static args array to build the add--interactive command line, which is error-prone. Use the argv-array helper functions instead. Signed-off-by: Fabian Ruch baf...@gmail.com --- builtin/add.c | 21

Re: [PATCH 3/7] test patch hunk editing with commit -p -m

2014-03-15 Thread Torsten Bögershausen
On 2014-03-11 22.03, Junio C Hamano wrote: Benoit Pierre benoit.pie...@gmail.com writes: Add (failing) test: with commit changing the environment to let hooks now that no editor will be used (by setting GIT_EDITOR to :), the edit hunk functionality does not work (no editor is launched and

Re: What's cooking in git.git (Mar 2014, #03; Fri, 14)

2014-03-15 Thread Duy Nguyen
On Sat, Mar 15, 2014 at 5:09 AM, Junio C Hamano gits...@pobox.com wrote: * nd/multiple-work-trees (2014-03-06) 28 commits - FIXUP: minimum compilation fix - count-objects: report unused files in $GIT_DIR/repos/... - gc: support prune --repos - gc: style change -- no SP before closing

Re: [PATCH] add: Use struct argv_array in run_add_interactive()

2014-03-15 Thread Fabian Ruch
On 03/15/2014 12:14 PM, Fabian Ruch wrote: run_add_interactive() in builtin/add.c manually computes array bounds and allocates a static args array to build the add--interactive command line, which is error-prone. Use the argv-array helper functions instead. Signed-off-by: Fabian Ruch

Re: [PATCH] mv: prevent mismatched data when ignoring errors.

2014-03-15 Thread Thomas Rast
brian m. carlson sand...@crustytoothpaste.net writes: We shrink the source and destination arrays, but not the modes or submodule_gitfile arrays, resulting in potentially mismatched data. Shrink all the arrays at the same time to prevent this. Signed-off-by: brian m. carlson

Re: [PATCH 3/7] test patch hunk editing with commit -p -m

2014-03-15 Thread Benoit Pierre
On Sat, Mar 15, 2014 at 1:28 PM, Torsten Bögershausen tbo...@web.de wrote: On 2014-03-11 22.03, Junio C Hamano wrote: Benoit Pierre benoit.pie...@gmail.com writes: Add (failing) test: with commit changing the environment to let hooks now that no editor will be used (by setting GIT_EDITOR to

git submodule update checkout update mode

2014-03-15 Thread 乙酸鋰
Hi, In 2.0.0 release notes (00eda23), Newly cloned submodule repositories by git submodule update, when the checkout update mode is used, will be on a local branch instead of on a detached HEAD, just like submodules added with git submodule add. It is not clear. 1. Is checkout update

Re: [GSOC] Git Configuration API improvements

2014-03-15 Thread karthik nayak
On Fri, Mar 14, 2014 at 10:01 AM, Jeff King p...@peff.net wrote: On Tue, Mar 11, 2014 at 09:49:33PM +0530, karthik nayak wrote: On Tue, Mar 11, 2014 at 8:21 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: karthik nayak karthik@gmail.com writes: Currently we have multiple

[PATCH v3 0/1] general style: replaces memcmp() with starts_with()

2014-03-15 Thread Quint Guvernator
Hi, folks. I've looked through the list's responses and removed the most objectionable hunks from the patch v2, especially in cases where starts_with either hurts readability or further obscures the use of magic numbers. Let me know what you all think about the changes. Thank you all again for

[PATCH v3 1/1] general style: replaces memcmp() with starts_with()

2014-03-15 Thread Quint Guvernator
memcmp() is replaced with negated starts_with() when comparing strings from the beginning and when it is logical to do so. starts_with() looks nicer and it saves the extra argument of the length of the comparing string. Signed-off-by: Quint Guvernator quintus.pub...@gmail.com --- builtin/apply.c

Re: [PATCH 0/6] Fix misuses of nor

2014-03-15 Thread Justin Lebar
I guess I'm cc'd because I made a few of those or/nor mistakes. I actually didn't look that closely at the blame; I cc'ed you because you were a top contributor in a few of the directories I was touching. I suggest that you merge Fix misuses of nor outside comments and Tests: Fix muses of nor

[PATCH v2] mv: prevent mismatched data when ignoring errors.

2014-03-15 Thread brian m. carlson
We shrink the source and destination arrays, but not the modes or submodule_gitfile arrays, resulting in potentially mismatched data. Shrink all the arrays at the same time to prevent this. Add tests to ensure the problem does not recur. Signed-off-by: brian m. carlson

Migration from Github hosted git repository to local server.

2014-03-15 Thread shyam218
Hi All, Could some one help me on this please,we have few repositories in the Github and out of them couple of them are using encryption with git-encrypt(https://github.com/shadowhand/git-encrypt)using this they have encrypted the whole repo. Now,we got a requirement to move all those

Re: [PATCH 3/3] reset: Print a warning when user uses git reset during a merge

2014-03-15 Thread Marc Branchaud
On 14-03-14 04:55 PM, Junio C Hamano wrote: So I am OK with eventually error out by default, but not OK with we know better than the user and will not allow it at all. Can I interpret that as you being OK with my proposed Cowardly refusing approach? M. -- To unsubscribe

Re: [PATCH 3/7] test patch hunk editing with commit -p -m

2014-03-15 Thread Torsten Bögershausen
On 2014-03-15 17.11, Benoit Pierre wrote: On Sat, Mar 15, 2014 at 1:28 PM, Torsten Bögershausen tbo...@web.de wrote: On 2014-03-11 22.03, Junio C Hamano wrote: Benoit Pierre benoit.pie...@gmail.com writes: Add (failing) test: with commit changing the environment to let hooks now that no

[GSOC2014] Invent a New Conflict Style

2014-03-15 Thread TamerTas
Hello everyone, I'm Tamer Tas. I am studying computer engineering in Turkey. I'm about to complete my junior year in Middle East Technical University. After setting up my git development environment, I've submitted patches to a microproject [1][2][3]. I'm still getting feedbacks on the

[GSOC2014] History Repair Tools

2014-03-15 Thread TamerTas
Hello everyone, I'm Tamer Tas. I am studying computer engineering in Turkey. I'm about to complete my junior year in Middle East Technical University. After setting up my git development environment, I've submitted patches to a microproject [1][2][3]. I'm still getting feedbacks on the

[PATCH 1/7] merge hook tests: fix missing '' in test

2014-03-15 Thread Benoit Pierre
Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- t/t7505-prepare-commit-msg-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 3573751..1c95652 100755 ---

[PATCH 2/7] merge hook tests: use 'test_must_fail' instead of '!'

2014-03-15 Thread Benoit Pierre
Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- t/t7505-prepare-commit-msg-hook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 1c95652..5531abb 100755 ---

[PATCH 3/7] test patch hunk editing with commit -p -m

2014-03-15 Thread Benoit Pierre
Add (failing) tests: with commit changing the environment to let hooks know that no editor will be used (by setting GIT_EDITOR to :), the edit hunk functionality does not work (no editor is launched and the whole hunk is committed). Signed-off-by: Benoit Pierre benoit.pie...@gmail.com ---

Using - for previous branch failing with rebase

2014-03-15 Thread Tim Chase
I recently learned that there are several places where git allows use of - to refer to the previous branch, e.g. git checkout -b dev # hack, hack git checkout master git merge - git checkout - However, it doesn't seem to understand - in the context of a rebase: git checkout branch_a

[PATCH 7/7] run-command: mark run_hook_with_custom_index as deprecated

2014-03-15 Thread Benoit Pierre
Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- run-command.h | 1 + 1 file changed, 1 insertion(+) diff --git a/run-command.h b/run-command.h index 88460f9..3653bfa 100644 --- a/run-command.h +++ b/run-command.h @@ -51,6 +51,7 @@ extern int run_hook_le(const char *const *env, const

[PATCH 4/7] commit: fix patch hunk editing with commit -p -m

2014-03-15 Thread Benoit Pierre
Don't change git environment: move the GIT_EDITOR=: override to the hook command subprocess, like it's already done for GIT_INDEX_FILE. Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/checkout.c | 8 builtin/clone.c | 4 ++-- builtin/commit.c| 35

[PATCH 5/7] merge: fix GIT_EDITOR override for commit hook

2014-03-15 Thread Benoit Pierre
Don't set GIT_EDITOR to : when calling prepare-commit-msg hook if the editor is going to be called (e.g. with merge -e). Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge.c b/builtin/merge.c

[PATCH 6/7] merge hook tests: fix and update tests

2014-03-15 Thread Benoit Pierre
- update 'no editor' hook test and add 'editor' hook test - make sure the tree is reset to a clean state after running a test (using test_when_finished) so later tests are not impacted Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- t/t7505-prepare-commit-msg-hook.sh | 27

Re: [PATCH 0/6] Fix misuses of nor

2014-03-15 Thread Duy Nguyen
On Sat, Mar 15, 2014 at 11:56 PM, Justin Lebar jle...@google.com wrote: There's a similar incompatibility with the l10n change and Fix misuses of nor outside comments: The former references strings changed in the latter. Should I merge these, or should I enforce a particular ordering between

Re: [PATCH] mv: prevent mismatched data when ignoring errors.

2014-03-15 Thread Jeff King
On Sat, Mar 15, 2014 at 05:05:29PM +0100, Thomas Rast wrote: diff --git a/builtin/mv.c b/builtin/mv.c index f99c91e..b20cd95 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -230,6 +230,11 @@ int cmd_mv(int argc, const char **argv, const char *prefix)

Re: [PATCH v2] mv: prevent mismatched data when ignoring errors.

2014-03-15 Thread Jeff King
On Sat, Mar 15, 2014 at 06:56:52PM +, brian m. carlson wrote: We shrink the source and destination arrays, but not the modes or submodule_gitfile arrays, resulting in potentially mismatched data. Shrink all the arrays at the same time to prevent this. Add tests to ensure the problem