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 test-hg-hg

[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 everyt

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

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar --- 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 --- a/contrib/examples/git-c

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

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

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

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar --- 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 a/builtin/clean.c b/builti

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

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar --- 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 +- t/t9400-git-c

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

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

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

2014-03-15 Thread Justin Lebar
Signed-off-by: Justin Lebar --- 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 deletions(-) diff

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 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, but > that's

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 > --- > t/test-lib.sh | 4 ++-- > 1 file changed, 2 insert

[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 --- builtin/add.c | 21 ++--- 1 file c

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 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 the >> whole h

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 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 bracket > - prun

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" 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 > --- > builtin/mv.c | 5 + > 1

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 wrote: > On 2014-03-11 22.03, Junio C Hamano wrote: >> Benoit Pierre 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" f

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" up

Re: [GSOC] Git Configuration API improvements

2014-03-15 Thread karthik nayak
On Fri, Mar 14, 2014 at 10:01 AM, Jeff King 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 >> wrote: >> > karthik nayak writes: >> > >> >> Currently we have multiple invocation of git_config() in an >> >> individual invo

[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 yo

[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 --- 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

[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 --- I attempted to come

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 repositorie

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 unsubscri

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 wrote: >> On 2014-03-11 22.03, Junio C Hamano wrote: >>> Benoit Pierre writes: >>> Add (failing) test: with commit changing the environment to let hooks now that no editor will be used (by

[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 microproj

[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 microproj

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

2014-03-15 Thread Benoit Pierre
Signed-off-by: Benoit Pierre --- 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 --- a/t/t7505-prepare-commit-msg-hook.sh +++ b/t/t7505-pre

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

2014-03-15 Thread Benoit Pierre
Signed-off-by: Benoit Pierre --- 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 --- a/t/t7505-prepare-commit-msg-hook.sh +++ b/t/t7505

[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 --- t/t7513-commit-patch.sh |

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 branc

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

2014-03-15 Thread Benoit Pierre
Signed-off-by: Benoit Pierre --- 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 char *name, ...); extern

[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 --- 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 --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge.c b/builtin/merge.c index bdf6655..e15d0

[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 --- t/t7505-prepare-commit-msg-hook.sh | 27 +-- 1 file

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 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 these patc

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

[PATCH/GSoC_v3] branch.c: turn nested if-else logic to table-driven

2014-03-15 Thread Yao Zhao
Signed-off-by: Yao Zhao --- branch.c | 53 + 1 file changed, 29 insertions(+), 24 deletions(-) Hello Eric, Thank you and Junio for reviewing my code. It is really helpful to improve my code quality. This is version 3 of patch. Previous addres

[PATCH] gitk: Avoid issues with script path format

2014-03-15 Thread Steven Penny
Tk’s "wish" for Windows can be built two ways win this provides a "wish" that uses GDI; it only understands Windows paths such as C:\foo\bar unix this provides a "wish" that uses X11; it understands Windows and Cygwin paths such as C:\foo\bar or /foo/bar Some Cygwin users will pref