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

2014-03-17 Thread David Kastrup
Jeff King writes: > On Tue, Mar 18, 2014 at 12:50:50AM -0400, Jeff King wrote: > >> On Sun, Mar 16, 2014 at 08:35:04PM +0700, Nguyễn Thái Ngọc Duy wrote: >> >> > As explained in the previous commit, current aggressive settings >> > --depth=250 --window=250 could slow down repository access >> >

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

2014-03-17 Thread Duy Nguyen
On Tue, Mar 18, 2014 at 12:16 PM, Duy Nguyen wrote: > But I think it's orthogonal to gc --aggressive improvement. There's another reason that improving gc may be a good idea (or not). It depends on how other git implementations handle long delta chains. If they hate long delta chains like current

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

2014-03-17 Thread David Kastrup
Jeff King writes: > On Tue, Mar 18, 2014 at 12:00:48PM +0700, Duy Nguyen wrote: > >> On Tue, Mar 18, 2014 at 11:50 AM, Jeff King wrote: >> > On Sun, Mar 16, 2014 at 08:35:04PM +0700, Nguyễn Thái Ngọc Duy wrote: >> > >> >> As explained in the previous commit, current aggressive settings >> >> --d

Re: [RFC/PATCH] diff: simplify cpp funcname regex

2014-03-17 Thread Jeff King
On Fri, Mar 14, 2014 at 07:56:46AM +0100, Johannes Sixt wrote: > Consider this code: > > void above() > {} > static int Y; > static int A; > int bar() > { > return X; > } > void below() > {} Thanks, this example is very helpful. > When you 'git grep --function-context X',

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

2014-03-17 Thread Duy Nguyen
On Tue, Mar 18, 2014 at 12:07 PM, Jeff King wrote: > [before] > real0m28.824s > user0m28.620s > sys 0m0.232s > > [after] > real0m21.694s > user0m21.544s > sys 0m0.172s > > The numbers below are completely pulled out of a hat, so we can perhaps > do even bett

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

2014-03-17 Thread Jeff King
On Tue, Mar 18, 2014 at 12:00:48PM +0700, Duy Nguyen wrote: > On Tue, Mar 18, 2014 at 11:50 AM, Jeff King wrote: > > On Sun, Mar 16, 2014 at 08:35:04PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > >> As explained in the previous commit, current aggressive settings > >> --depth=250 --window=250 could

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

2014-03-17 Thread Jeff King
On Tue, Mar 18, 2014 at 12:50:50AM -0400, Jeff King wrote: > On Sun, Mar 16, 2014 at 08:35:04PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > As explained in the previous commit, current aggressive settings > > --depth=250 --window=250 could slow down repository access > > significantly. Notice that p

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

2014-03-17 Thread Duy Nguyen
On Tue, Mar 18, 2014 at 11:50 AM, Jeff King wrote: > On Sun, Mar 16, 2014 at 08:35:04PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> As explained in the previous commit, current aggressive settings >> --depth=250 --window=250 could slow down repository access >> significantly. Notice that people usuall

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

2014-03-17 Thread Jeff King
On Sun, Mar 16, 2014 at 08:35:04PM +0700, Nguyễn Thái Ngọc Duy wrote: > As explained in the previous commit, current aggressive settings > --depth=250 --window=250 could slow down repository access > significantly. Notice that people usually work on recent history only, > we could keep recent hist

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

2014-03-17 Thread Jeff King
On Sun, Mar 16, 2014 at 06:30:49PM -, Philip Oakley wrote: > >* jk/branch-at-publish-rebased (2014-01-17) 5 commits > >- t1507 (rev-parse-upstream): fix typo in test title > >- implement @{publish} shorthand > >- branch_get: provide per-branch pushremote pointers > >- branch_get: return early

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

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 9:38 PM, Jacopo Notarstefano wrote: > 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 h

Re: [PATCH v3 0/8] Hiding refs

2014-03-17 Thread Jeff King
On Sat, Mar 15, 2014 at 08:23:08AM +0700, Duy Nguyen wrote: > > The default would start at false, and people who know their server is > > very up-to-date can turn it on. And then when many server > > implementations support it, flip the default to auto. And either leave > > it there forever, or ev

Re: [PATCH v3 0/8] Hiding refs

2014-03-17 Thread Jeff King
On Fri, Mar 14, 2014 at 05:09:45PM -0700, Shawn Pearce wrote: > On Fri, Mar 14, 2014 at 4:30 PM, Duy Nguyen wrote: > > On Fri, Mar 14, 2014 at 11:45 PM, Shawn Pearce wrote: > >> > >> You missed the SSH case. It doesn't have this slot to hide the data into. > > > > Right now we run this for ssh c

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

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 10:33 PM, Quint Guvernator wrote: > 2014-03-17 21:59 GMT-04:00 Eric Sunshine : >> 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 repeat

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

2014-03-17 Thread Jeff King
On Mon, Mar 17, 2014 at 04:07:00PM -0700, Junio C Hamano wrote: > >> > -if (!memcmp(used_atom[at], "color:", 6)) > >> > +if (starts_with(used_atom[at], "color:")) > >> > need_color_reset_at_eol = > >> > !!strcmp(used_atom[at], color_reset);

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 : > 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 states more concise

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 wrote: > 2014-03-17 18:52 GMT-04:00 Junio C Hamano : >> 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

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 wrote: > shawn wilson 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 (no

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

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

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

2014-03-17 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" 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

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

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 : > 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" rather than "s

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 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 tested it during

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

2014-03-17 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Mar 18, 2014 at 5:12 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy 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

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

2014-03-17 Thread Junio C Hamano
Jeff King 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 verify

[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 --- 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 a6b1c17..b9f6e12 10064

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

2014-03-17 Thread Junio C Hamano
Andrew Wong 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 > releases, we'

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 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 wrote: > Nguyễn Thái Ngọc Duy 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 -s --scissors" did not

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

2014-03-17 Thread Junio C Hamano
Quint Guvernator 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 Guvernator > ---

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

2014-03-17 Thread Philip Oakley
From: "Ramkumar Ramachandra" 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 a bit stale. It

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

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

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

2014-03-17 Thread Junio C Hamano
Hiroyuki Sano 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 > --- > diff-no-index.c | 6 +++--- > 1

Re: [PATCH] Add grep.fullName config variable

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

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

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

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

2014-03-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy 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 majord...@vger.kern

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 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 > --- > One of these moments I will make git log and friends optionally

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 > wrote: > > On 03/17/2014 07:33 AM, Junio C Hamano wrote: > >> Junio C Hamano writes: > >> > >>> Would it make sense to go one step further to introduce two macros > >>> to make

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

2014-03-17 Thread Junio C Hamano
Andrew Wong 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 like: do

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 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 future releas

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

[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 --- builtin/apply.c| 6 +++--- buil

[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

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

2014-03-17 Thread Junio C Hamano
Andrew Wong 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 "git foo --b

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre 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. Your using when-fin

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre writes: > On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano wrote: >> Benoit Pierre 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 w

[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 --- 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 +6,7 @@ #include "

[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 --- diff-no-index.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletio

[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 --- 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 --- a/diff-no-index.c +++ b/diff-no-

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

2014-03-17 Thread Junio C Hamano
David Tran 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 && > - test_mu

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

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 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 && > test_must_fa

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 : > 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 fetch-pack.c:filter_re

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 : > 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 elimination of

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 writes: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > 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 more easily understood than the

Re: [PATCH] subtree: initialize "prefix" variable

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 3:59 PM, Jeff King 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 it ju

[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 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 wrote: > On Mon, Mar 17, 2014 at 3:46 PM, Benoit Pierre > wrote: >> On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano wrote: >>> Benoit Pierre writes: >>> [...] diff --git a/t/t7513-commit-patch.sh b/t/t7513-commit-patch.sh >>> >>> Ag

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 wrote: > Benoit Pierre 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. Late

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 wrote: > On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano wrote: >> Benoit Pierre 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

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 wrote: > Benoit Pierre 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

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 wrote: > On 03/17/2014 08:31 AM, Junio C Hamano wrote: >> Eric Sunshine 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. > >

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

2014-03-17 Thread Junio C Hamano
Jonathan Nieder 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 Storbeck

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

2014-03-17 Thread Junio C Hamano
Uwe Storbeck 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, perhaps.

[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 --- Documentation/git-grep.txt | 3 +++ grep.c | 5 + 2 files changed, 8 insertions(+) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index f83733

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

2014-03-17 Thread Junio C Hamano
Michael Haggerty 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 attempting >> the s

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 wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > 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 ++ >

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 wrote: > On 03/17/2014 07:33 AM, Junio C Hamano wrote: >> Junio C Hamano writes: >> >>> Would it make sense to go one step further to introduce two macros >>> to make this kind of screw-up less likely? > potential callers that I noticed, ALLOC_GR

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre 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 piece and affect

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

2014-03-17 Thread Junio C Hamano
Benoit Pierre 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). > > Signed-off-by: Benoit Pier

[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 --- Changed $@ to $* in printf. Thanks to Johannes Sixt to point that out. t/test-lib.sh | 4 ++-- 1 file chang

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 unsu

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 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 strbuf_git_path()

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

2014-03-17 Thread Junio C Hamano
Duy Nguyen 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] http://article.gmane.org/gmane

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

2014-03-17 Thread Junio C Hamano
Ramkumar Ramachandra 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 rebases of multi

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

2014-03-17 Thread Junio C Hamano
"Philip Oakley" 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 any _be

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

2014-03-17 Thread Junio C Hamano
Torsten Bögershausen 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. > The

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

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

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

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

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 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 death. I haven't

Re: push fail

2014-03-17 Thread Matthieu Moy
shawn wilson 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 that disables

Re: push fail

2014-03-17 Thread Dragos Foianu
shawn wilson 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

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

[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 2>&1

[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 --- 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 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_() used in other code but

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

2014-03-17 Thread Dragos Foianu
Eric Sunshine 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* the co

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" wrote: >Thanks for the resubmission. Comments below... > >On Sun, Mar 16, 2014 at 8:44 AM, wrote: >> From: 沈承恩 >> Subject: [PATCH] Rewrite the diff-no-index.c > >This is your second version of the patch, so you should say [PATCH

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 wrote: > Subject: [GSOC] Selection of the verbose message is replaced with generated > message in install_branch_config() Mentioning [GSoC] in the subje

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 i

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" wrote: >Thanks for the resubmission. Comments below... > >On Sun, Ma

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 wrote: > Subject: Removed subshell invocations in many of the tests when possible Use imperative mode: "remove" rather than "removed" "many of the tests" says li

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

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 >

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 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 generated by selectin

[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] 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, <$fd> line 45. After apply this patch, blame view of gbk source file will ba

  1   2   >