Re: [PATCH v2 02/10] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: The message part of test_commit() may not be appropriate for a tag name. So let's allow test_commit to accept a fourth argument to specify the tag name. Yes! [...] --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -135,12 +135,13 @@ test_pause () {

Re: [RFC] Instruct git-completion.bash that we are in test mode

2013-01-22 Thread Jean-Noël Avila
Le 22/01/2013 05:31, Junio C Hamano a écrit : Jeff King p...@peff.net writes: I really hate to suggest this, but should it be more like: if test -z $FAKE_COMMAND_LIST; then __git_cmdlist() { git help -a | egrep '^ [a-zA-Z0-9]' } else __git_cmdlist() { printf '%s' $FAKE_COMMAND_LIST } fi

Re: [PATCH v2 03/10] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: --- /dev/null +++ b/t/t3511-cherry-pick-x.sh @@ -0,0 +1,111 @@ [...] + test_commit $mesg_one_line foo b mesg-one-line + git reset --hard initial + test_commit $mesg_no_footer foo b mesg-no-footer + git reset --hard initial + test_commit

Re: [PATCHv2] l10n: de.po: fix some minor issues

2013-01-22 Thread Joachim Schmitz
Ralf Thielow wrote: This fixes some minor issues and improves the German translation a bit. The following things were changed: - use complete sentences in option related messages - translate use consistently as verwendet - don't translate make sense as macht Sinn While your translations for

Re: [PATCH v3] Enable minimal stat checking

2013-01-22 Thread Johannes Sixt
Am 1/22/2013 8:49, schrieb Robin Rosenberg: Specifically the fields uid, gid, ctime, ino and dev are set to zero by JGit. Other implementations, eg. Git in cygwin are allegedly also somewhat incompatible with Git For Windows and on *nix platforms the resolution of the timestamps may differ.

Re: [PATCH v2 04/10] sequencer.c: recognize (cherry picked from ... as part of s-o-b footer

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: Let's detect (cherry picked from...) as part of the footer so that we will produce this: Signed-off-by: A U Thor aut...@example.com (cherry picked from da39a3ee5e6b4b0d3255bfef95601890afd80709) Signed-off-by: C O Mmitter commit...@example.com instead of this:

Re: [PATCH v2 05/10] sequencer.c: always separate (cherry picked from from commit body

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: Start treating the (cherry picked from line added by cherry-pick -x the same way that the s-o-b lines are treated. Namely, separate them from the main commit message body with an empty line. Heh, you read my mind. -- To unsubscribe from this list: send the line

Re: [PATCH 3/7] contrib/subtree: Add --unannotate

2013-01-22 Thread greened
Junio C Hamano gits...@pobox.com writes: gree...@obbligato.org writes: gree...@obbligato.org writes: I think this paragraph inherits existing breakage from the beginning of time, but I do not think the above will format the second and subsequent paragraphs correctly. Ok, I'll take a

Re: [PATCH v2 06/10] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This is in preparation to unify the append_signoff implementations in log-tree.c and sequencer.c. [...] --- a/sequencer.c +++ b/sequencer.c @@ -1082,9 +1101,10 @@ int

Re: [PATCH 2/7] contrib/subtree: Use %B for Split Subject/Body

2013-01-22 Thread greened
Junio C Hamano gits...@pobox.com writes: gree...@obbligato.org writes: Are you incorporating the other patches? Should I drop them from my list? I actually was planning to accept patches to this subdirectory only through you, hopefully as messages that forward others' changes with your

Re: [PATCH 2/8] Add --unannotate

2013-01-22 Thread greened
James Nylen jny...@gmail.com writes: I just now saw these emails. I'm having a hard time thinking of any good use case other than: - add fancylib as a subtree of myprog - commit to myprog repo: fancylib: don't crash as much - split these commits back out to fancylib's main repo, and

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Brandon Casey
On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder jrnie...@gmail.com wrote: Hi, Brandon Casey wrote: --- a/sequencer.c +++ b/sequencer.c [...] @@ -1042,13 +1041,8 @@ static int ends_rfc2822_footer(struct strbuf *sb, int ignore_footer) Git is checking if (sb-buf) ends with a

Re: [PATCH v2 02/10] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2013-01-22 Thread Brandon Casey
On Tue, Jan 22, 2013 at 12:02 AM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -135,12 +135,13 @@ test_pause () { fi } -# Call test_commit with the arguments message [file [contents]] +# Call

Aw: Re: [PATCH v3 1/6] Change old system name 'GIT' to 'Git'

2013-01-22 Thread Thomas Ackermann
I think it misses GIT - the stupid content tracker in README, but probably it is OK (it is not an end-user facing documentation). I only checked ./Documentation; but this should be changed also. I noticed that these two places still use poor-man's small caps after this patch. Thanks.

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder jrnie...@gmail.com wrote: First (snipped), it seeks back two newlines from the end and then forward to the next non-newline character, so (buf + i) is at the start of the last line of (the interesting part of) sb. Did

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Jonathan Nieder
Jonathan Nieder wrote: Here is the loop in master: int hit = 0; [...] for (i = len - 1; i 0; i--) { if (hit buf[i] == '\n') break; hit = (buf[i] == '\n'); } I don't see any adjacency check. Of course that's

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Jonathan Nieder
Brandon Casey wrote: On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder jrnie...@gmail.com wrote: - if ((buf[k] == ' ' || buf[k] == '\t') !first) - continue; This is always the first line examined, so this continue never triggers. This is just totally

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Jonathan Nieder
Jonathan Nieder wrote: line) instead of buf[i] is a whitespace character. So for example, it confuses the following for a well-formed RFC2822 footer: Luckily it doesn't, since the final continuation line is not followed by whitespace. I should have said: ... is a

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Brandon Casey
On Tue, Jan 22, 2013 at 1:49 AM, Jonathan Nieder jrnie...@gmail.com wrote: Jonathan Nieder wrote: Here is the loop in master: int hit = 0; [...] for (i = len - 1; i 0; i--) { if (hit buf[i] == '\n') break; hit = (buf[i] ==

branch name in remote.remote.push is not updated after git branch -m

2013-01-22 Thread Andrey Borzenkov
I renamed branches and noticed that branch name was not changed in remote push config. I.e. after bor@opensuse:~/src/bootinfoscript git branch -m github master I still have [remote github] push = github:master url = git://github.com/arvidjaar/bootinfoscript.git pushurl =

gitk show branch in commit overview

2013-01-22 Thread Teun Grinwis
Hello, We recently changed from using CVS to GIT, previous company I worked we used clearcase. We do feature development / bug fixing (complex) on branches, trivial changes commit direct on Develop branch. What I am missing in all the gui tools is the relation on what specific branch did

Re: [PATCH 2/8] Add --unannotate

2013-01-22 Thread Junio C Hamano
gree...@obbligato.org writes: Junio, is there a policy for backward-compatability in contrib? I hope that since that directory is for stuff not yet in mainline, there is some room to massage the user interface. I do not think there is anything more than we wish there were fewer such end-user

Re: [RFC] Instruct git-completion.bash that we are in test mode

2013-01-22 Thread Junio C Hamano
Jean-Noël Avila avila...@gmail.com writes: Le 22/01/2013 05:31, Junio C Hamano a écrit : Jeff King p...@peff.net writes: I really hate to suggest this, but should it be more like: if test -z $FAKE_COMMAND_LIST; then __git_cmdlist() { git help -a | egrep '^ [a-zA-Z0-9]' } else

Re: Aw: Re: [PATCH v3 1/6] Change old system name 'GIT' to 'Git'

2013-01-22 Thread Junio C Hamano
Thomas Ackermann th.ac...@arcor.de writes: * Documentation/git-credential.txt: TYPICAL USE OF GIT CREDENTIAL This is to be debated because here all caps is used as poor man's bold face and it would look odd if we write 'TYPICAL USE OF Git CREDENTIAL'? I left this as-is in my fixup commit,

Re: branch name in remote.remote.push is not updated after git branch -m

2013-01-22 Thread Junio C Hamano
Andrey Borzenkov arvidj...@gmail.com writes: I renamed branches and noticed that branch name was not changed in remote push config. I.e. after bor@opensuse:~/src/bootinfoscript git branch -m github master I still have [remote github] push = github:master url =

Re: [PATCH v3] Enable minimal stat checking

2013-01-22 Thread Torsten Bögershausen
+core.checkstat:: + Determines which stat fields to match between the index + and work tree. The user can set this to 'default' or + 'minimal'. Default (or explicitly 'default'), is to check + all fields, including the sub-second part of mtime and ctime. + Setting

Re: [PATCH v3] Enable minimal stat checking

2013-01-22 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: Specifically the fields uid, gid, ctime, ino and dev are set to zero by JGit. Other implementations, eg. Git in cygwin are allegedly also somewhat incompatible with Git For Windows and on *nix platforms the resolution of the timestamps may

Re: Bug in latest gitk - can't click lines connecting commits

2013-01-22 Thread Junio C Hamano
Paul Mackerras pau...@samba.org writes: On Tue, Jan 01, 2013 at 06:54:23PM +0100, Stefan Haller wrote: Jason Holden jason.k.holden.sw...@gmail.com wrote: I was testing some patches against the latest gitk, and noticed that when I click the mouse on the lines that connect the commits in

Aw: Re: Aw: Re: [PATCH v3 1/6] Change old system name 'GIT' to 'Git'

2013-01-22 Thread Thomas Ackermann
I left this as-is in my fixup commit, as the html and manpage backends seem to typeset the section titles differently. I however have to wonder what the result will look like if we replaced it with Typical use of Git credential Can you try and see how well it works? The html

[PATCH] Makefile: Replace merge-file.h with merge-blobs.h in LIB_H

2013-01-22 Thread Ramsay Jones
Commit fa2364ec (Which merge_file() function do you mean?, 06-12-2012) renamed the files merge-file.[ch] to merge-blobs.[ch], but forgot to rename the header file in the definition of the LIB_H macro. Signed-off-by: Ramsay Jones ram...@ramsay1.demon.co.uk --- Makefile | 2 +- 1 file changed, 1

Re: Version 1.8.1 does not compile on Cygwin 1.7.14

2013-01-22 Thread Ramsay Jones
Jonathan Nieder wrote: Ramsay Jones wrote: --- a/git-compat-util.h +++ b/git-compat-util.h @@ -85,12 +85,6 @@ #define _NETBSD_SOURCE 1 #define _SGI_SOURCE 1 -#ifdef WIN32 /* Both MinGW and MSVC */ -#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ -#include

Re: [msysGit] Re: Version 1.8.1 does not compile on Cygwin 1.7.14

2013-01-22 Thread Ramsay Jones
Torsten Bögershausen wrote: On 20.01.13 12:06, Jonathan Nieder wrote: Torsten Bögershausen wrote: I wonder, if if we can go one step further: Replace #ifdef WIN32 /* Both MinGW and MSVC */ [...] with #if defined(_MSC_VER) I thought Git for Windows was built using mingw, which doesn't

Re: [PATCH] Makefile: Replace merge-file.h with merge-blobs.h in LIB_H

2013-01-22 Thread Junio C Hamano
Thanks. -- 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: Build broken for contrib/remote-helpers...

2013-01-22 Thread Jeff King
On Tue, Jan 22, 2013 at 12:49:31AM -0500, John Szakmeister wrote: I tried running make in contrib/remote-helpers and it died with: :: make make -e -C ../../t test rm -f -r test-results duplicate test numbers: /Users/jszakmeister/sources/git make[1]: ***

Re: [PATCH v2] unpack-trees: do not abort when overwriting an existing file with the same content

2013-01-22 Thread Jeff King
On Mon, Jan 21, 2013 at 05:45:05PM -0800, Junio C Hamano wrote: Duy Nguyen pclo...@gmail.com writes: On Tue, Jan 22, 2013 at 6:15 AM, Jeff King p...@peff.net wrote: Can you elaborate on when this code is triggered? In the general case, shouldn't we already know the sha1 of what's on

Re: [PATCH v3] Enable minimal stat checking

2013-01-22 Thread Robin Rosenberg
- Ursprungligt meddelande - Also, even though we settled on default/minimal, we may regret in the future if old implementations died on an unrecognized value, as that will forbid users from using an old Git and a new Git on the same repository at the same time, so I'd suggest

Re: Build broken for contrib/remote-helpers...

2013-01-22 Thread Torsten Bögershausen
On 22.01.13 20:41, Jeff King wrote: On Tue, Jan 22, 2013 at 12:49:31AM -0500, John Szakmeister wrote: I tried running make in contrib/remote-helpers and it died with: :: make make -e -C ../../t test rm -f -r test-results duplicate test numbers:

[PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Lars Hjemli
When working with multiple, unrelated (or loosly related) git repos, there is often a need to locate all repos with uncommitted work and perform some action on them (say, commit and push). Before this patch, such tasks would require manually visiting all repositories, running `git status` within

Re: GIT get corrupted on lustre

2013-01-22 Thread Eric Chamberland
So, hum, do we have some sort of conclusion? Shall it be a fix for git to get around that lustre behavior? If something can be done in git it would be great: it is a *lot* easier to change git than the lustre filesystem software for a cluster in running in production mode... (words from

Re: [PATCH v3 01/10] wildmatch: fix ** special case

2013-01-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: ** is adjusted to only be effective when surrounded by slashes, in 40bbee0 (wildmatch: adjust ** behavior - 2012-10-15). Except that the commit did it wrong: 1. when it checks for the preceding slash unless ** is at the beginning, it

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Junio C Hamano
Lars Hjemli hje...@gmail.com writes: diff --git a/builtin/all.c b/builtin/all.c new file mode 100644 index 000..ee9270d --- /dev/null +++ b/builtin/all.c @@ -0,0 +1,105 @@ +/* + * git all builtin command. + * + * Copyright (c) 2013 Lars Hjemli hje...@gmail.com + */ +#include

Re: GIT get corrupted on lustre

2013-01-22 Thread Junio C Hamano
Eric Chamberland eric.chamberl...@giref.ulaval.ca writes: So, hum, do we have some sort of conclusion? Shall it be a fix for git to get around that lustre behavior? If something can be done in git it would be great: it is a *lot* easier to change git than the lustre filesystem software for

Re: GIT get corrupted on lustre

2013-01-22 Thread Thomas Rast
Eric Chamberland eric.chamberl...@giref.ulaval.ca writes: So, hum, do we have some sort of conclusion? Shall it be a fix for git to get around that lustre behavior? If something can be done in git it would be great: it is a *lot* easier to change git than the lustre filesystem software for

Re: Build broken for contrib/remote-helpers...

2013-01-22 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: So it finds whatever is before the first -, which would be the test number in t-basic.sh or similar, and then looks for duplicates. would it help to filter for numbered tests before sorting like this: sed 's/-.*//' | grep [0-9][0-9][0-9][0-9]|

What's cooking in git.git (Jan 2013, #08; Tue, 22)

2013-01-22 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. As usual, this cycle is expected to last for 8 to 10 weeks, with a preview -rc0 sometime in the middle of next month. You can find the changes

Re: GIT get corrupted on lustre

2013-01-22 Thread Eric Chamberland
On 01/22/2013 05:14 PM, Thomas Rast wrote: Eric Chamberland eric.chamberl...@giref.ulaval.ca writes: So, hum, do we have some sort of conclusion? Shall it be a fix for git to get around that lustre behavior? If something can be done in git it would be great: it is a *lot* easier to change

Re: [PATCH v3 01/10] wildmatch: fix ** special case

2013-01-22 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: We obviously do not want to set FNM_PATHNAME when we are not substituting fnmatch() with wildmatch(), but I wonder if it may make sense to unconditionally use WM_PATHNAME semantics when we build the system with USE_WILDMATCH and calling wildmatch() in

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Lars Hjemli
On Tue, Jan 22, 2013 at 11:01 PM, Junio C Hamano gits...@pobox.com wrote: Lars Hjemli hje...@gmail.com writes: +static struct option builtin_all_options[] = { + OPT_BOOLEAN('c', clean, only_clean, N_(only show clean repositories)), + OPT_BOOLEAN('d', dirty, only_dirty, N_(only show

Re: What's cooking in git.git (Jan 2013, #08; Tue, 22)

2013-01-22 Thread John Keeping
On Tue, Jan 22, 2013 at 02:44:48PM -0800, Junio C Hamano wrote: * jc/cvsimport-upgrade (2013-01-14) 8 commits - t9600: adjust for new cvsimport - t9600: further prepare for sharing - cvsimport-3: add a sample test - cvsimport: make tests reusable for cvsimport-3 - cvsimport: start

Re: [PATCH v3 2/6] Change 'git' to 'Git' whenever the whole system is referred to #1

2013-01-22 Thread Junio C Hamano
Thomas Ackermann th.ac...@arcor.de writes: Signed-off-by: Thomas Ackermann th.ac...@arcor.de --- diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index 9f42c0d..14bdbbb 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -33,7 +33,7 @@

Re: What's cooking in git.git (Jan 2013, #08; Tue, 22)

2013-01-22 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Tue, Jan 22, 2013 at 02:44:48PM -0800, Junio C Hamano wrote: * jc/cvsimport-upgrade (2013-01-14) 8 commits - t9600: adjust for new cvsimport - t9600: further prepare for sharing - cvsimport-3: add a sample test - cvsimport: make tests reusable

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Junio C Hamano
Lars Hjemli hje...@gmail.com writes: In principle I agree with your reasoning on this, but in practice I fail to see what other kind of things `git all` could naturally refer to. For example, the designers of 'for-each-ref' could have called it git all, as it is to iterate over all refs. --

Re: [PATCH v3 2/6] Change 'git' to 'Git' whenever the whole system is referred to #1

2013-01-22 Thread Junio C Hamano
This is the summary of the review comments in a patch form. Subject: [PATCH] fixup! Change 'git' to 'Git' whenever the whole system is referred to #1 --- Documentation/Makefile | 4 ++-- Documentation/git-clean.txt | 2 +- Documentation/git-clone.txt | 2 +-

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread David Aguilar
On Tue, Jan 22, 2013 at 1:10 PM, Lars Hjemli hje...@gmail.com wrote: When working with multiple, unrelated (or loosly related) git repos, there is often a need to locate all repos with uncommitted work and perform some action on them (say, commit and push). Before this patch, such tasks would

Re: [PATCH v3 3/6] Change 'git' to 'Git' whenever the whole system is referred to #2

2013-01-22 Thread Junio C Hamano
Thomas Ackermann th.ac...@arcor.de writes: diff --git a/Documentation/config.txt b/Documentation/config.txt index b87f744..5a831ad2 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1,14 +1,14 @@ CONFIGURATION FILE -- -The git configuration file

Re: [PATCH v3 01/10] wildmatch: fix ** special case

2013-01-22 Thread Duy Nguyen
On Wed, Jan 23, 2013 at 5:51 AM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: We obviously do not want to set FNM_PATHNAME when we are not substituting fnmatch() with wildmatch(), but I wonder if it may make sense to unconditionally use WM_PATHNAME

Re: [PATCH v3 2/6] Change 'git' to 'Git' whenever the whole system is referred to #1

2013-01-22 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: This is the summary of the review comments in a patch form. And then there still are the ones in the file that was touched by Thomas's 2/6 that need fixing. Documentation/git-apply.txt | 2 +- Documentation/git-archimport.txt | 2 +-

Re: [PATCH v3 0/2] Make git-svn work with gitdir links

2013-01-22 Thread Eric Wong
Barry Wardell barry.ward...@gmail.com wrote: These patches fix a bug which prevented git-svn from working with repositories which use gitdir links. Changes since v2: - Rebased onto latest master. - Added test case which verifies that the problem has been fixed. - Fixed problems with git

Re: [PATCH v3 2/6] Change 'git' to 'Git' whenever the whole system is referred to #1

2013-01-22 Thread Junio C Hamano
In Documentation/git-rev-parse.txt, there is this bit: --resolve-git-dir path:: Check if path is a valid git-dir or a git-file pointing to a valid git-dir. If path is a valid git-dir the resolved path to git-dir will be printed. I think the author invented the word

Re: [PATCH v3 3/6] Change 'git' to 'Git' whenever the whole system is referred to #2

2013-01-22 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: As before, I'll locally create a fixup commit based on the above. After I am done with these patches, somebody (not Thomas or I, as our eyes are too used to staring at git and Git to notice mistakes) has to run git grep -C3 -e '\Git\' Documentation/

Re: [PATCH v3 4/6] Change 'git' to 'Git' whenever the whole system is referred to #3

2013-01-22 Thread Junio C Hamano
Documentation/gitcore-tutorial.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt index 5d957c2..59c1c17 100644 --- a/Documentation/gitcore-tutorial.txt +++ b/Documentation/gitcore-tutorial.txt @@

Re: [PATCH v3 0/2] Make git-svn work with gitdir links

2013-01-22 Thread Junio C Hamano
Eric Wong normalper...@yhbt.net writes: `git rev-parse --show-cdup` outputs nothing if GIT_DIR is set, so I unset GIT_DIR temporarily. I'm not sure why --show-cdup behaves like this, though.. Setting GIT_DIR is to say That is the directory that has the repository objects and refs; I am

Re: [PATCH v3 5/6] Change 'git' to 'Git' whenever the whole system is referred to #4

2013-01-22 Thread Junio C Hamano
Leftover in paths touched by [5/6]. Documentation/gitcvs-migration.txt | 2 +- Documentation/technical/api-builtin.txt | 2 +- Documentation/technical/api-credentials.txt | 4 ++-- Documentation/technical/api-remote.txt | 2 +- Documentation/urls.txt | 2 +-

Re: [PATCH v3 3/6] Change 'git' to 'Git' whenever the whole system is referred to #2

2013-01-22 Thread David Aguilar
On Mon, Jan 21, 2013 at 11:19 AM, Thomas Ackermann th.ac...@arcor.de wrote: diff --git a/Documentation/config.txt b/Documentation/config.txt index b87f744..5a831ad2 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt push.default:: - Defines the action git push should

Re: [PATCH v3 3/6] Change 'git' to 'Git' whenever the whole system is referred to #2

2013-01-22 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: On Mon, Jan 21, 2013 at 11:19 AM, Thomas Ackermann th.ac...@arcor.de wrote: diff --git a/Documentation/config.txt b/Documentation/config.txt index b87f744..5a831ad2 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt push.default:: -

[PATCHv2 0/8] config key-parsing cleanups

2013-01-22 Thread Jeff King
On Fri, Jan 18, 2013 at 12:53:32PM -0800, Junio C Hamano wrote: ... did you have any comment on the struct config_key alternative I sent as a follow-up? I did read it but I cannot say I did so very carefully. My gut reaction was that the take the variable name and section name,

[PATCHv2 1/8] config: add helper function for parsing key names

2013-01-22 Thread Jeff King
The config callback functions get keys of the general form: section.subsection.key (where the subsection may be contain arbitrary data, or may be missing). For matching keys without subsections, it is simple enough to call strcmp. Matching keys with subsections is a little more complicated,

[PATCHv2 2/8] archive-tar: use parse_config_key when parsing config

2013-01-22 Thread Jeff King
This is fewer lines of code, but more importantly, fixes a bogus pointer offset. We are looking for tar. in the section, but later assume that the dot we found is at offset 9, not 3. This is a holdover from an earlier iteration of 767cf45 which called the section tarfilter. As a result, we could

[PATCHv2 3/8] convert some config callbacks to parse_config_key

2013-01-22 Thread Jeff King
These callers can drop some inline pointer arithmetic and magic offset constants, making them more readable and less error-prone (those constants had to match the lengths of strings, but there is no automatic verification of that fact). The ep pointer (presumably for end pointer), which points to

[PATCHv2 4/8] userdiff: drop parse_driver function

2013-01-22 Thread Jeff King
When we parse userdiff config, we generally assume that diff.name.key will affect the key value of the name driver. However, without confirming that the key is a valid userdiff key, we may accidentally conflict with the ancient diff.color.* namespace. The current code is careful not to even

[PATCHv2 5/8] submodule: use parse_config_key when parsing config

2013-01-22 Thread Jeff King
This makes the code a lot simpler to read by dropping a whole bunch of constant offsets. As a bonus, it means we also feed the whole config variable name to our error functions: [before] $ git -c submodule.foo.fetchrecursesubmodules=bogus checkout fatal: bad foo.fetchrecursesubmodules

[PATCHv2 6/8] submodule: simplify memory handling in config parsing

2013-01-22 Thread Jeff King
We keep a strbuf for the name of the submodule, even though we only ever add one string to it. Let's just use xmemdupz instead, which is slightly more efficient and makes it easier to follow what is going on. Unfortunately, we still end up having to deal with some memory ownership issues in some

[PATCHv2 7/8] help: use parse_config_key for man config

2013-01-22 Thread Jeff King
The resulting code ends up about the same length, but it is a little more self-explanatory. It now explicitly documents and checks the pre-condition that the incoming var starts with man., and drops the magic offset 4. Signed-off-by: Jeff King p...@peff.net --- builtin/help.c | 14 +++---

[PATCHv2 8/8] reflog: use parse_config_key in config callback

2013-01-22 Thread Jeff King
This doesn't save any lines, but does keep us from doing error-prone pointer arithmetic with constants. Signed-off-by: Jeff King p...@peff.net --- builtin/reflog.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index

Re: [PATCH v2 1/3] push: further clean up fields of struct ref

2013-01-22 Thread Jeff King
On Mon, Jan 21, 2013 at 10:30:28PM -0800, Junio C Hamano wrote: The nonfastforward and update fields are only used while deciding what value to assign to the status locally in a single function. Remove them from the struct ref. The requires_force field is not used to decide if the proposed

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: +static int walk(struct strbuf *path, int argc, const char **argv) +{ + DIR *dir; + struct dirent *ent; + size_t len; + + dir = opendir(path-buf); + if (!dir) + return errno; + strbuf_addstr(path,

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Junio C Hamano
Lars Hjemli hje...@gmail.com writes: +static struct option builtin_all_options[] = { + OPT_BOOLEAN('c', clean, only_clean, N_(only show clean repositories)), + OPT_BOOLEAN('d', dirty, only_dirty, N_(only show dirty repositories)), + OPT_END(), +}; If you were to go in the

Re: [PATCH v2 2/3] push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE

2013-01-22 Thread Jeff King
On Mon, Jan 21, 2013 at 10:30:29PM -0800, Junio C Hamano wrote: When we push to update an existing ref, if: * we do not have the object at the tip of the remote; or * the object at the tip of the remote is not a commit; or * the object we are pushing is not a commit, there is no point

Re: [PATCHv2 8/8] reflog: use parse_config_key in config callback

2013-01-22 Thread Junio C Hamano
Jeff King p...@peff.net writes: This doesn't save any lines, but does keep us from doing error-prone pointer arithmetic with constants. Yeah, this and 7/8 shows that the true value of the new parse function is not line number reduction but clarity of the calling code. There is really no point

Re: [PATCHv2 0/8] config key-parsing cleanups

2013-01-22 Thread Jonathan Nieder
Jeff King wrote: So I've re-rolled the original version Lovely. :) Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- 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

Re: [PATCH] all: new command used for multi-repo operations

2013-01-22 Thread Lars Hjemli
On Wed, Jan 23, 2013 at 7:44 AM, Junio C Hamano gits...@pobox.com wrote: But I do not think the loop structure of this function is right. If $D has .git in it, should it even try to feed other subdirectories of $D (say $D/a) to itself in recursion to see if $D/a/.git exists? Yes, this is