Re: [PATCH] GSoC Change multiple if-else statements to be table-driven

2014-03-17 Thread Eric Sunshine
On Fri, Mar 14, 2014 at 12:54 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Thu, Mar 13, 2014 at 4:20 PM, Yao Zhao zhaox...@umn.edu wrote: Subject: [PATCH] GSoC Change multiple if-else statements to be table-driven It's a good idea to let

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

2014-03-17 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Would it make sense to go one step further to introduce two macros to make this kind of screw-up less likely? ... After letting my eyes coast over hits from git grep memmove, there do seem to be some places that these would help readability, but not

Re: Using - for previous branch failing with rebase

2014-03-17 Thread Junio C Hamano
Tim Chase g...@tim.thechases.com writes: Is this just an interface inconsistency or is there a some technical reason this doesn't work (or, has it been addressed/fixed, and just not pulled into Debian Stable's 1.7.10.4 version of git)? It is merely that nobody thought rebase would benefit

Re: [PATCH] Documentation/git-am: Document supported --patch-format options

2014-03-17 Thread Junio C Hamano
Chris Packham judge.pack...@gmail.com writes: Ping? Hasn't it been already cooking in 'next' for a few days? -- 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][GSOC2014] install_branch_config: change logical chain to lookup table

2014-03-17 Thread Eric Sunshine
On Fri, Mar 14, 2014 at 5:30 PM, TamerTas tamer...@outlook.com wrote: Signed-off-by: TamerTas tamer...@outlook.com --- Thanks again for the feedback it's been a great learning experience. Comments Below :) I have refactored the commit [1] to * suggested changes [2]. format-patch was

Re: [PATCH] branch.c: simplify chain of if statements

2014-03-17 Thread Matthieu Moy
Dragos Foianu dragos.foi...@gmail.com writes: + const char *verbose_prints[4] = { + Branch %s set up to track remote branch %s from %s%s, + Branch %s set up to track local branch %s%s, + Branch %s set up to track remote ref %s%s, + Branch

Re: [PATCH] GSoC Change multiple if-else statements to be table-driven

2014-03-17 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Perhaps it is time to mark this microproject as taken on the GSoC page [2], along a fews others for which we have received multiple submissions. [2]: https://github.com/git/git.github.io/blob/master/SoC-2014-Microprojects.md I actually have

Re: [PATCH] Documentation/git-am: Document supported --patch-format options

2014-03-17 Thread Chris Packham
On 17/03/14 19:39, Junio C Hamano wrote: Chris Packham judge.pack...@gmail.com writes: Ping? Hasn't it been already cooking in 'next' for a few days? Indeed I think I missed a What's cooking. Do you want me to submit a fixup for the spelling mistake? -- To unsubscribe from this list:

[PATCH] fixup! Documentation/git-am: Document supported --patch-format options

2014-03-17 Thread Chris Packham
--- On 17/03/14 20:35, Chris Packham wrote: On 17/03/14 19:39, Junio C Hamano wrote: Chris Packham judge.pack...@gmail.com writes: Ping? Hasn't it been already cooking in 'next' for a few days? Indeed I think I missed a What's cooking. Do you want me to submit a fixup for the spelling

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

2014-03-17 Thread Eric Sunshine
On Sun, Mar 16, 2014 at 2:08 AM, Yao Zhao zhaox...@umn.edu wrote: Signed-off-by: Yao Zhao zhaox...@umn.edu --- branch.c | 53 + 1 file changed, 29 insertions(+), 24 deletions(-) Hello Eric, Thank you and Junio for reviewing my code. It is

Re: [PATCH] branch.c: simplify chain of if statements

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 3:23 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Dragos Foianu dragos.foi...@gmail.com writes: + const char *verbose_prints[4] = { + Branch %s set up to track remote branch %s from %s%s, + Branch %s set up to track local branch

Re: [PATCH] branch.c: simplify chain of if statements

2014-03-17 Thread Eric Sunshine
Thanks for the submission. Comments below to give you a taste of the Git review process... On Sun, Mar 16, 2014 at 5:22 PM, Dragos Foianu dragos.foi...@gmail.com wrote: This patch uses a table-driven approach in order to make the code cleaner. In fact, this change is not table-driven (emphasis

Re: [PATCH] Rewrite the diff-no-index.c

2014-03-17 Thread Eric Sunshine
Thanks for the resubmission. Comments below... On Sun, Mar 16, 2014 at 8:44 AM, ubuntu2...@126.com wrote: From: 沈承恩 ubuntu2...@126.com Subject: [PATCH] Rewrite the diff-no-index.c This is your second version of the patch, so you should say [PATCH v2]. Most patches rewrite something, so

Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names

2014-03-17 Thread Kicer Jiao
Dear all, I have a git-project which source code use gbk encoding. When use gitweb blame view, it will report an error then stop parse: Malformed UTF-8 character (fatal) at /usr/share/gitweb/gitweb.cgi line 1595, lt;$fdgt; line 45. After apply this patch, blame view of gbk source file will

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

2014-03-17 Thread Eric Sunshine
On Sun, Mar 16, 2014 at 7:42 AM, Thomas Rast t...@thomasrast.ch wrote: Fabian Ruch baf...@gmail.com writes: 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

Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names

2014-03-17 Thread Kicer Jiao
Dear all, I have a git-project which source code use gbk encoding. When use gitweb blame view, it will report an error then stop parse: Malformed UTF-8 character (fatal) at /usr/share/gitweb/gitweb.cgi line 1595, lt;$fdgt; line 45. After apply this patch, blame view of gbk source file will

[PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-17 Thread Aleksey Mokhovikov
This is a milliproject from git google summer of code page. The current code that selects the output message is quite easy to understand. So I tried to improve it by removing nested conditions and code duplication. The output string is generated by selecting the proper parts of the message and

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-17 Thread Matthieu Moy
Hi, Aleksey Mokhovikov moxobu...@gmail.com writes: This is a milliproject from git google summer of code page. The current code that selects the output message is quite easy to understand. So I tried to improve it by removing nested conditions and code duplication. The output string is

Re: feature-request: git notes copy --to ref

2014-03-17 Thread Uwe Kleine-König
Hello again, On Thu, Feb 20, 2014 at 10:03:34PM +0100, Uwe Kleine-König wrote: I'm playing around with git-notes and want to share some of my notes with my co-workers. We have a central repository for our various topic branches and want to track upstream inclusion in git-notes. So we have to

Re: [PATCH] Removed subshell invocations in many of the tests when possible

2014-03-17 Thread Eric Sunshine
Thanks for the submission. Comments below to give you a taste of the Git review process.. On Sun, Mar 16, 2014 at 3:40 AM, David Tran unsignedz...@gmail.com wrote: Subject: Removed subshell invocations in many of the tests when possible Use imperative mode: remove rather than removed many of

Re:Re: [PATCH] Rewrite the diff-no-index.c

2014-03-17 Thread 沈承恩
Thank you for your comments.If I rename some function when I work on a large project like git,whether it will cause other error that I can not solve .So I use the ugly way for this reason. At 2014-03-17 17:13:38,Eric Sunshine sunsh...@sunshineco.com wrote: Thanks for the resubmission. Comments

Re: [PATCH] Rewrite the diff-no-index.c

2014-03-17 Thread Matthieu Moy
- Original Message - Thank you for your comments.If I rename some function when I work on a large project like git,whether it will cause other error that I can not solve .So I use the ugly way for this reason. (please, don't top-post on this list). The read_directory to be renamed is

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-17 Thread Eric Sunshine
Thanks for the submission. Comments below to give you a taste of the Git review process... On Mon, Mar 17, 2014 at 5:55 AM, Aleksey Mokhovikov moxobu...@gmail.com wrote: Subject: [GSOC] Selection of the verbose message is replaced with generated message in install_branch_config() Mentioning

Re:Re: [PATCH] Rewrite the diff-no-index.c

2014-03-17 Thread 沈承恩
thank you for your comments At 2014-03-17 17:13:38,Eric Sunshine sunsh...@sunshineco.com wrote: Thanks for the resubmission. Comments below... On Sun, Mar 16, 2014 at 8:44 AM, ubuntu2...@126.com wrote: From: 沈承恩 ubuntu2...@126.com Subject: [PATCH] Rewrite the diff-no-index.c This is your

Re: [PATCH] branch.c: simplify chain of if statements

2014-03-17 Thread Dragos Foianu
Eric Sunshine sunshine at sunshineco.com writes: In fact, this change is not table-driven (emphasis on *driven*). It merely moves the strings into a table, but all the logic is still in the code. To be table-driven, the logic would be encoded in the table as well, and that logic would *drive*

[PATCH v2] log: add --nonlinear-barrier to help see non-linear history

2014-03-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- v2 renames the option name to --nonlinear-barrier and fixes using it with --dense. Best used with --no-merges to see patch series. Documentation/rev-list-options.txt | 7 ++ log-tree.c | 4 +++ revision.c

Re: [PATCH] branch.c: simplify chain of if statements

2014-03-17 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 17, 2014 at 12:46 PM, Dragos Foianu dragos.foi...@gmail.com wrote: The reason I did not go with this is because I would still need the four ifs in order to keep the bug check part of the code. I might be able to find a work-around for it on the second attempt. I have seen N_()

[BUG] contrib/subtree: t/t7900-subtree.sh: test 21 fails when environment variable 'prefix' is set

2014-03-17 Thread Gilles Filippini
Hi, Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: expecting success: echo You must provide the --prefix option. expected test_must_fail git subtree split actual 21

push fail

2014-03-17 Thread shawn wilson
How do I get more info here (and hopefully resolve this)? % git push To ssh://server/foo/repo.git ! [rejected]test - test (non-fast-forward) error: failed to push some refs to 'ssh://server/foo/repo.git' -- To unsubscribe from this list: send the line unsubscribe git in the body of a

Re: push fail

2014-03-17 Thread Dragos Foianu
shawn wilson ag4ve.us at gmail.com writes: How do I get more info here (and hopefully resolve this)? % git push To ssh://server/foo/repo.git ! [rejected]test - test (non-fast-forward) error: failed to push some refs to 'ssh://server/foo/repo.git' non-fast-forward means that

Re: push fail

2014-03-17 Thread Matthieu Moy
shawn wilson ag4ve...@gmail.com writes: How do I get more info here (and hopefully resolve this)? % git push To ssh://server/foo/repo.git ! [rejected]test - test (non-fast-forward) error: failed to push some refs to 'ssh://server/foo/repo.git' You probably have a configuration

Re: [PATCH] GSoC Change multiple if-else statements to be table-driven

2014-03-17 Thread Michael Haggerty
On 03/17/2014 08:31 AM, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: Perhaps it is time to mark this microproject as taken on the GSoC page [2], along a fews others for which we have received multiple submissions. I just marked #8 as taken, as it's been beaten to

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

2014-03-17 Thread Michael Haggerty
On 03/17/2014 07:33 AM, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Would it make sense to go one step further to introduce two macros to make this kind of screw-up less likely? ... After letting my eyes coast over hits from git grep memmove, there do seem to be some

[PATCHv2] branch.c: simplify chain of if statements

2014-03-17 Thread Dragos Foianu
This patch uses a table to store the different messages that can be emitted by the verbose install_branch_config function. It computes an index based on the three flags and prints the message located at the specific index in the table of messages. If the index somehow is not within the table, we

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

2014-03-17 Thread Michael Haggerty
Quint, Thanks for v3 of the patch and for sticking with it. See a few comments below. On 03/15/2014 05:39 PM, Quint Guvernator wrote: 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

[PATCH] tests: set temp variables using 'env' in test function instead of subshell

2014-03-17 Thread David Tran
Originally, the code used subshells instead of FOO=BAR command because the variable would otherwise leak into the surrounding context of the POSIX shell when 'command' is a shell function. The subshell was used to hold the context for the test. Using 'env' in the test function sets the temp

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

2014-03-17 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: 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.

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

2014-03-17 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: * po/git-help-user-manual (2014-02-18) 1 commit - Provide a 'git help user-manual' route to the docbook I am not sure if this is even needed. My rhetorical question would be what should 'git help user-manual' do? for the beginner, ... Why would

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

2014-03-17 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: ... I'd first fix the main issue: stale content. I'm not sure who uses git show-branch or mailx anymore, for instance. Unfortunately, I haven't seen a representation better than what show-branch gives me when assessing what needs to happen during

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

2014-03-17 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: There are two minor fixes [1] [2] on top of v5, but I'm not going to send v6 again unless I see more substantial changes. Just give me a signal or something before you merge to next so I have a chance to fix them if v6 never comes. [1]

Re: [PATCH v5 03/28] Convert git_snpath() to strbuf_git_path()

2014-03-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: In the previous patch, git_snpath() is modified to allocate a new strbuf buffer because vsnpath() needs that. But that makes it awkward because git_snpath() receives a pre-allocated buffer from outside and has to copy data back. Rename it to

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

2014-03-17 Thread Uwe Storbeck
On Mar 15, Johannes Sixt wrote: - echo $@ | sed -e 's/^/# /' + printf '%s\n' $@ | sed -e 's/^/# /' This should be printf '%s\n' $* | sed -e 's/^/# /' Right, that should be $* to always be one argument for the format pattern. Thanks Uwe -- To unsubscribe from

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

2014-03-17 Thread 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 --- Changed $@ to $* in printf. Thanks to Johannes Sixt to point that out. t/test-lib.sh | 4 ++--

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre benoit.pie...@gmail.com writes: 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).

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre benoit.pie...@gmail.com writes: +test_expect_failure 'edit hunk commit -p -m message' ' + test_when_finished rm -f editor_was_started Not just when finished, run rm -f here to make sure that the file does not exist. Later other people may add new tests before this test

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

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 11:07 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/17/2014 07:33 AM, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Would it make sense to go one step further to introduce two macros to make this kind of screw-up less likely? potential

Re: [PATCH v2] log: add --nonlinear-barrier to help see non-linear history

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 8:51 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- v2 renames the option name to --nonlinear-barrier and fixes using it with --dense. Best used with --no-merges to see patch series.

Re: [PATCH] GSoC Change multiple if-else statements to be table-driven

2014-03-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 03/17/2014 08:31 AM, Junio C Hamano wrote: So in short, yes it would have been nicer if we had more micros than candidates, but I do not think it was detrimental for the purpose of these micro exercises that multiple candidates ended up

[PATCH] Add grep.fullName config variable

2014-03-17 Thread Andreas Schwab
This configuration variable sets the default for the --full-name option. Signed-off-by: Andreas Schwab sch...@linux-m68k.org --- Documentation/git-grep.txt | 3 +++ grep.c | 5 + 2 files changed, 8 insertions(+) diff --git a/Documentation/git-grep.txt

Re: [PATCH v2] rebase -i: replace an echo command by printf

2014-03-17 Thread Junio C Hamano
Uwe Storbeck u...@ibr.ch writes: to avoid shell dependent behavior. Please do not start the body of the log message half-sentence. The title ought to be a freestanding title, not just a beginning half of a sentence that needs to be read with the rest to be understood. Something like this,

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

2014-03-17 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Uwe Storbeck wrote: Backslash sequences are interpreted as control characters by the echo command of some shells (e.g. dash). This has bothered me for a while but never enough to do anything about it. Thanks for fixing it. Signed-off-by: Uwe

Re: [PATCH] GSoC Change multiple if-else statements to be table-driven

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 10:11 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/17/2014 08:31 AM, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: Perhaps it is time to mark this microproject as taken on the GSoC page [2], along a fews others for which we have received

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

2014-03-17 Thread Benoit Pierre
On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano gits...@pobox.com wrote: Benoit Pierre benoit.pie...@gmail.com writes: 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

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

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 3:46 PM, Benoit Pierre benoit.pie...@gmail.com wrote: On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano gits...@pobox.com wrote: Benoit Pierre benoit.pie...@gmail.com writes: Add (failing) tests: with commit changing the environment to let hooks know that no editor will

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

2014-03-17 Thread Benoit Pierre
On Mon, Mar 17, 2014 at 7:53 PM, Junio C Hamano gits...@pobox.com wrote: Benoit Pierre benoit.pie...@gmail.com writes: +test_expect_failure 'edit hunk commit -p -m message' ' + test_when_finished rm -f editor_was_started Not just when finished, run rm -f here to make sure that the file

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

2014-03-17 Thread Benoit Pierre
On Mon, Mar 17, 2014 at 8:51 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Mar 17, 2014 at 3:46 PM, Benoit Pierre benoit.pie...@gmail.com wrote: On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano gits...@pobox.com wrote: Benoit Pierre benoit.pie...@gmail.com writes: [...] diff

[PATCH] subtree: initialize prefix variable

2014-03-17 Thread Jeff King
On Mon, Mar 17, 2014 at 01:58:00PM +0100, Gilles Filippini wrote: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: I think it just needs the patch below. -- 8 -- We parse the --prefix

Re: [PATCH] subtree: initialize prefix variable

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 3:59 PM, Jeff King p...@peff.net wrote: On Mon, Mar 17, 2014 at 01:58:00PM +0100, Gilles Filippini wrote: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: I think

Re: [PATCH v2] log: add --nonlinear-barrier to help see non-linear history

2014-03-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- v2 renames the option name to --nonlinear-barrier and fixes using it with --dense. Best used with --no-merges to see patch series. I think that the earlier name show linear-break is

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

2014-03-17 Thread Quint Guvernator
2014-03-17 12:29 GMT-04:00 Michael Haggerty mhag...@alum.mit.edu: This hunk uses the magic number 11 a couple lines later. Junio (I think rightly) objected [1] to rewrites in these circumstances because they make it even less obvious where the constant came from and thereby make the complete

Re: [PATCH] GSoC Change multiple if-else statements to be table-driven

2014-03-17 Thread Quint Guvernator
2014-03-17 15:27 GMT-04:00 Eric Sunshine sunsh...@sunshineco.com: A quick (perhaps inaccurate) search of the mailing list shows that, of the remaining untaken items, #10, 11, 12, 15, 16, and 18 have had just one submission, and #13 had two, so we're okay. I am still working on #14: Change

Re: [BUG] contrib/subtree: t/t7900-subtree.sh: test 21 fails when environment variable 'prefix' is set

2014-03-17 Thread Junio C Hamano
Gilles Filippini gilles.filipp...@free.fr writes: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is set. For instance here is what happens when prefix=/usr: expecting success: echo You must provide the --prefix option. expected

Re: [PATCH] subtree: initialize prefix variable

2014-03-17 Thread Jeff King
On Mon, Mar 17, 2014 at 04:08:50PM -0400, Eric Sunshine wrote: On Mon, Mar 17, 2014 at 3:59 PM, Jeff King p...@peff.net wrote: On Mon, Mar 17, 2014 at 01:58:00PM +0100, Gilles Filippini wrote: Test 21 from contrib/subtree/t/t7900-subtree.sh fails when an environment variable 'prefix' is

Re: [PATCH] tests: set temp variables using 'env' in test function instead of subshell

2014-03-17 Thread Junio C Hamano
David Tran unsignedz...@gmail.com writes: Fixed the broken -chain and the tests run correctly. The double env is fixed to be a single env. The useless subshells are removed. ... Hmph. test_expect_success 'need valid notes ref' ' - (MSG=1 GIT_NOTES_REF=/ export MSG GIT_NOTES_REF -

[PATCH 2/3][GSOC] diff: use is_dot_or_dotdot() instead of strcmp()

2014-03-17 Thread Hiroyuki Sano
The is_dot_or_dotdot() is used to check if the string is either . or ... Signed-off-by: Hiroyuki Sano sh19910...@gmail.com --- diff-no-index.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diff-no-index.c b/diff-no-index.c index 1ed5c9d..ccd9270 100644 ---

[PATCH 1/3][GSOC] diff: rename read_directory() to get_directory_list()

2014-03-17 Thread Hiroyuki Sano
Including dir.h in diff-no-index.c, it causes a compile error, because the same name function read_directory() is declared globally in dir.h. This change is to avoid conflicts as above. Signed-off-by: Hiroyuki Sano sh19910...@gmail.com --- diff-no-index.c | 6 +++--- 1 file changed, 3

[PATCH 3/3][GSOC] fsck: use is_dot_or_dotdot() instead of strcmp()

2014-03-17 Thread Hiroyuki Sano
The is_dot_or_dotdot() is used to check if the string is either . or ... Signed-off-by: Hiroyuki Sano sh19910...@gmail.com --- fsck.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fsck.c b/fsck.c index b3022ad..c9d7784 100644 --- a/fsck.c +++ b/fsck.c @@ -6,6

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre benoit.pie...@gmail.com writes: On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano gits...@pobox.com wrote: Benoit Pierre benoit.pie...@gmail.com writes: Add (failing) tests: with commit changing the environment to let hooks know that no editor will be used (by setting GIT_EDITOR

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre benoit.pie...@gmail.com writes: Isn't the point of using when finished to have each test leave the tree clean after execution, to avoid bleeding onto the next test(s)? But you cannot anticipate what other people will do in the future before you have a chance to run this piece.

Re: [PATCH 1/3] wt-status: Make status messages more consistent with others

2014-03-17 Thread Junio C Hamano
Andrew Wong andrew.k...@gmail.com writes: This is mainly changing messages that say: run git foo --bar to use git foo --bar to baz git foo --bar is fine, but to baz was hard to read without first realizing that 'baz' stands for some/any verb. I think rephrasing it to use

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

2014-03-17 Thread Quint Guvernator
Hi again, all. I've gone through the patch again to filter for the use of magic numbers so that I can leave those hunks alone. Junio says, and Michael agrees, that: The original hunks show that the code knows and relies on magic numbers 7 and 8 very clearly and there are rooms for improvement.

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

2014-03-17 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 v4 0/1] general style: replaces memcmp() with starts_with()

2014-03-17 Thread Quint Guvernator
My mistake, folks. This is [PATCH v4]. Apologies for the confusion. Quint -- 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 3/3] reset: Print a warning when user uses git reset during a merge

2014-03-17 Thread Junio C Hamano
Andrew Wong andrew.k...@gmail.com writes: During a merge, --mixed is most likely not what the user wants. Using --mixed during a merge would leave the merged changes and new files mixed in with the local changes. The user would have to manually clean up the work tree, which is non-trivial. In

Re: [PATCH 2/3] merge: Advise user to use git merge --abort to abort merges

2014-03-17 Thread Junio C Hamano
Andrew Wong andrew.k...@gmail.com writes: Print message during git merge and git status. Add a new mergeHints advice to silence these messages. This sounds sensible. Don't we want to have this one take effect on the places where advice.resolveConflict is used in git-pull? I.e. something

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

2014-03-17 Thread Jeff King
On Mon, Mar 17, 2014 at 03:06:02PM -0400, Eric Sunshine wrote: On Mon, Mar 17, 2014 at 11:07 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/17/2014 07:33 AM, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Would it make sense to go one step further to introduce

Re: [PATCH] index-pack: do not segfault when keep_name is NULL

2014-03-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: keep_name is used to print error messages a couple lines down. Reset it to the real path returned by odb_pack_keep() if it's set to NULL by caller. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- One of these moments I will make

Re: [PATCH 4/4] gc --aggressive: three phase repacking

2014-03-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: As explained in the previous commit,... [PATCH 3/4] becomes a commit with an empty log message for some reason. Have you tried running am -s on it? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH] Documentation/gitk: Document new config file location

2014-03-17 Thread Junio C Hamano
Astril Hayato astrilhay...@gmail.com writes: User configuration file is now stored at $XDG_CONFIG_HOME/git/gitk Signed-off-by: Astril Hayato astrilhay...@gmail.com --- Documentation/gitk.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gitk.txt

Re: [PATCH] Add grep.fullName config variable

2014-03-17 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: This configuration variable sets the default for the --full-name option. Signed-off-by: Andreas Schwab sch...@linux-m68k.org --- Would this change break Porcelains (e.g. Emacs modes) and force them to be updated to explicitly pass --no-full-name

Re: [PATCH 1/3][GSOC] diff: rename read_directory() to get_directory_list()

2014-03-17 Thread Junio C Hamano
Hiroyuki Sano sh19910...@gmail.com writes: Including dir.h in diff-no-index.c, it causes a compile error, because the same name function read_directory() is declared globally in dir.h. This change is to avoid conflicts as above. Signed-off-by: Hiroyuki Sano sh19910...@gmail.com ---

Re: [PATCH 3/3][GSOC] fsck: use is_dot_or_dotdot() instead of strcmp()

2014-03-17 Thread Junio C Hamano
Hiroyuki Sano sh19910...@gmail.com writes: The is_dot_or_dotdot() is used to check if the string is either . or ... Signed-off-by: Hiroyuki Sano sh19910...@gmail.com --- fsck.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fsck.c b/fsck.c index

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

2014-03-17 Thread Philip Oakley
From: Ramkumar Ramachandra artag...@gmail.com Philip Oakley wrote: * po/everyday-doc (2014-01-27) 1 commit - Make 'git help everyday' work This may make the said command to emit something, but the source is not meant to be formatted into a manual pages to begin with, and also its contents are

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

2014-03-17 Thread Junio C Hamano
Quint Guvernator quintus.pub...@gmail.com writes: 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

Re: [PATCH 4/4] gc --aggressive: three phase repacking

2014-03-17 Thread Duy Nguyen
On Tue, Mar 18, 2014 at 5:12 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: As explained in the previous commit,... [PATCH 3/4] becomes a commit with an empty log message for some reason. Have you tried running am -s on it? am -s worked fine. am

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

2014-03-17 Thread Jeff King
On Mon, Mar 17, 2014 at 03:52:51PM -0700, Junio C Hamano wrote: diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 3e1d5c3..4135980 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -193,7 +193,7 @@ static int verify_format(const char *format)

Re: [PATCH 0/3] Make git more user-friendly during a merge conflict

2014-03-17 Thread Junio C Hamano
Andrew Wong andrew.k...@gmail.com writes: 2/3: I've added advice.mergeHints to silent the messages that suggests git merge--abort. 3/3: I've added a warning message when users used git reset during a merge. This warning will be printed if the user is in the middle of a merge. In future

[PATCH v2] index-pack: do not segfault when keep_name is NULL

2014-03-17 Thread Nguyễn Thái Ngọc Duy
Use the name that is returned by odb_pack_keep() when the caller passes NULL in keep_name. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/index-pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index

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

2014-03-17 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Mar 17, 2014 at 03:52:51PM -0700, Junio C Hamano wrote: diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 3e1d5c3..4135980 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -193,7 +193,7 @@ static int

Re: [PATCH 4/4] gc --aggressive: three phase repacking

2014-03-17 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Tue, Mar 18, 2014 at 5:12 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: As explained in the previous commit,... [PATCH 3/4] becomes a commit with an empty log message for some reason. Have you tried

Re: [PATCH 0/3] Make git more user-friendly during a merge conflict

2014-03-17 Thread Andrew Wong
On Mon, Mar 17, 2014 at 7:04 PM, Junio C Hamano gits...@pobox.com wrote: Has this series been tested with existing test suite? I tentatively queued it to 'pu' but then had to revert because many tests started failing, causing me to redo the today's integration cycle for 'pu' once again. I

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

2014-03-17 Thread Quint Guvernator
2014-03-17 18:52 GMT-04:00 Junio C Hamano gits...@pobox.com: Thanks. This probably needs retitled, though (hint: replaces? who does so?) and the message rewritten (see numerous reviews on other GSoC micros from Eric). I found some messages [1] by Eric concerning imperative voice (simplify

Re: [PATCH v2] rebase -i: replace an echo command by printf

2014-03-17 Thread Uwe Storbeck
On Mar 17, Junio C Hamano wrote: Will tentatively queue with the above rewrite, but if you feel strongly, please send an replacement. No need for a replacement, your wording is good. I couldn't do it better. I'll borrow your commit message for my other patch to fix the continued title there

[PATCH v3] test-lib.sh: do not echo externally supplied strings

2014-03-17 Thread Uwe Storbeck
In some places we echo a string that is supplied by the calling test script and may contain backslash sequences. The echo command of some shells, most notably dash, interprets these backslash sequences (POSIX.1 allows this) which may scramble the test output. Signed-off-by: Uwe Storbeck

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

2014-03-17 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Philip Oakley philipoak...@iee.org writes: * po/git-help-user-manual (2014-02-18) 1 commit - Provide a 'git help user-manual' route to the docbook I am not sure if this is even needed. My rhetorical question would be what should 'git help user-manual'

[GSoC14][RFC] Is there any interest in adding a port of checkpatch.pl to contrib/?

2014-03-17 Thread Jacopo Notarstefano
It seems to me that the topic of adding the checkpatch.pl script to Git's source tree has cropped up several times in the past, as recently as a couple of days ago: $gmane/243607. It should be noted that its usage for its sake has been discouraged by Junio Hamano in $gmane/205998. Also, its use

Re: Using - for previous branch failing with rebase

2014-03-17 Thread Tim Chase
On 2014-03-16 23:37, Junio C Hamano wrote: Tim Chase g...@tim.thechases.com writes: Is this just an interface inconsistency or is there a some technical reason this doesn't work (or, has it been addressed/fixed, and just not pulled into Debian Stable's 1.7.10.4 version of git)? It is

Re: push fail

2014-03-17 Thread shawn wilson
Thanks. Yeah, I should've thought to do a pull On Mon, Mar 17, 2014 at 9:34 AM, Dragos Foianu dragos.foi...@gmail.com wrote: shawn wilson ag4ve.us at gmail.com writes: How do I get more info here (and hopefully resolve this)? % git push To ssh://server/foo/repo.git ! [rejected]

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

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 7:46 PM, Quint Guvernator quintus.pub...@gmail.com wrote: 2014-03-17 18:52 GMT-04:00 Junio C Hamano gits...@pobox.com: Thanks. This probably needs retitled, though (hint: replaces? who does so?) and the message rewritten (see numerous reviews on other GSoC micros from

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

2014-03-17 Thread Quint Guvernator
2014-03-17 21:59 GMT-04:00 Eric Sunshine sunsh...@sunshineco.com: I can't speak for Junio, but the description could be made more concise and to-the-point. Aside from using imperative voice, you can eliminate redundancy, some of which comes from repeating in prose what the patch itself already

  1   2   >