Re: [PATCH v4 11/32] delete_ref_loose(): don't muck around in the lock_file's filename

2014-09-14 Thread Michael Haggerty
On 09/13/2014 09:41 AM, Johannes Sixt wrote: Am 06.09.2014 um 09:50 schrieb Michael Haggerty: It's bad manners. Especially since, if unlink_or_warn() failed, the memory wasn't restored to its original contents. I do not see how the old code did not restore the file name. Except for this

Re: [PATCH v4 11/32] delete_ref_loose(): don't muck around in the lock_file's filename

2014-09-14 Thread Michael Haggerty
On 09/14/2014 08:27 AM, Michael Haggerty wrote: On 09/13/2014 09:41 AM, Johannes Sixt wrote: Am 06.09.2014 um 09:50 schrieb Michael Haggerty: It's bad manners. Especially since, if unlink_or_warn() failed, the memory wasn't restored to its original contents. I do not see how the old code

Re: [PATCH] help: ensure that common-cmds.h is only included by help.c

2014-09-14 Thread David Aguilar
On Sat, Sep 13, 2014 at 10:23:03PM -0700, Junio C Hamano wrote: On Sat, Sep 13, 2014 at 7:00 PM, Perry Hutchison per...@pluto.rain.com wrote: David Aguilar dav...@gmail.com wrote: Add a #ifndef guard to ensure that common-cmds.h can only be included by help.c. This strikes me as a

[PATCH] credential-cache: close stderr in daemon process

2014-09-14 Thread Jeff King
If the stderr of git credential-cache is redirected to a pipe, the reader on the other end of a pipe may be surprised that the pipe remains open long after the process exits. This happens because we may auto-spawn a daemon which is long-lived, and which keeps stderr open. We can solve this by

[PATCH 1/2] check-headers: add header usage checks for .c files

2014-09-14 Thread David Aguilar
Teach check-header.sh to ensure that the first included header in .c files is either git-compat-util.h, builtin.h, or cache.h. Ensure that common-cmds.h is only included by help.c. Move the logic into functions so that we can skip parts of the check. Signed-off-by: David Aguilar

[PATCH 2/2] cleanups: ensure that git-compat-util.h is included first

2014-09-14 Thread David Aguilar
CodingGuidelines states that the first #include in C files should be git-compat-util.h or another header file that includes it, such as cache.h or builtin.h. Tweak the tiny minority of files that do not follow this advice. This makes make check-headers SKIP_HEADER_CHECK=1 happy. Signed-off-by:

[PATCH] git-svn: delay term initialization

2014-09-14 Thread Eric Wong
On my Debian 7 system, this gives annoying warnings when the output of git svn commands are redirected: Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS and LINES environment variables didn't work. The resize program didn't work. Signed-off-by: Eric Wong

Re: [PATCH] git-svn: delay term initialization

2014-09-14 Thread Eric Wong
Eric Wong normalper...@yhbt.net wrote: On my Debian 7 system, this gives annoying warnings when the output s/gives/fixes/ -- 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] help: ensure that common-cmds.h is only included by help.c

2014-09-14 Thread Perry Hutchison
Junio C Hamano gits...@pobox.com wrote: On Sat, Sep 13, 2014 at 7:00 PM, Perry Hutchison per...@pluto.rain.com wrote: David Aguilar dav...@gmail.com wrote: Add a #ifndef guard to ensure that common-cmds.h can only be included by help.c. ... If these definitions are intended to be

Re: [PATCH 1/2] describe: support the syntax --abbrev=+

2014-09-14 Thread Jeff King
On Fri, Sep 12, 2014 at 11:26:43AM -0300, Jonh Wendell wrote: It will print just a + sign appended to the found tag, if there are commits between the tag and the supplied commit. It's useful when you just need a simple output to know if the supplied commit is an exact match or not. Seems

[PULL] git svn updates for master

2014-09-14 Thread Eric Wong
Hi Junio, a couple of small changes and fixes. Most of these should be suitable for maint, too. The following changes since commit ce1d3a93a6405b8a0313491df3099919ed3d150f: Update draft release notes to 2.2 (2014-09-11 11:19:47 -0700) are available in the git repository at:

Re: [PATCH 2/2] describe: Add documentation for --abbrev=+

2014-09-14 Thread Jeff King
On Fri, Sep 12, 2014 at 11:26:44AM -0300, Jonh Wendell wrote: --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -54,6 +54,12 @@ OPTIONS abbreviated object name, use n digits, or as many digits as needed to form a unique object name. An n of 0

git branch --merged and git branch --verbose do not combine

2014-09-14 Thread David Kastrup
dak@lola:/usr/local/tmp/lilypond$ ../git/git branch --merged --verbose fatal: malformed object name --verbose dak@lola:/usr/local/tmp/lilypond$ ../git/git branch --verbose --merged * (detached from 5b2267a) 1c23f39 Merge branch 'issue4097' into HEAD issue3468cf033e Issue 346:

[PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-14 Thread David Aguilar
Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Signed-off-by: David Aguilar dav...@gmail.com --- This verifies and depends on refs: make rev-parse --quiet actually quiet. t/t1503-rev-parse-verify.sh | 9 + 1 file changed, 9 insertions(+) diff

Re: [PATCH] help: ensure that common-cmds.h is only included by help.c

2014-09-14 Thread David Aguilar
On Sun, Sep 14, 2014 at 12:55:41AM -0700, Perry Hutchison wrote: Junio C Hamano gits...@pobox.com wrote: On Sat, Sep 13, 2014 at 7:00 PM, Perry Hutchison per...@pluto.rain.com wrote: David Aguilar dav...@gmail.com wrote: Add a #ifndef guard to ensure that common-cmds.h can only be

Re: [boinc_dev] (local ?) BOINC repo broken again -or- how to act on the CR/LF changes made upstream

2014-09-14 Thread Torsten Bögershausen
On 12.09.14 20:19, Rom Walton wrote: Try: git checkout -f master git pull origin I committed fixes for that stuff this morning. - Rom It seems as if we added CRLF's to the repo: od -c html/languages/translations/hu.po | grep \\\r 0577300# # \r \n # P r i v

Re: [PATCH 1/2] describe: support the syntax --abbrev=+

2014-09-14 Thread Eric Sunshine
On Sun, Sep 14, 2014 at 4:18 AM, Jeff King p...@peff.net wrote: On Fri, Sep 12, 2014 at 11:26:43AM -0300, Jonh Wendell wrote: It will print just a + sign appended to the found tag, if there are commits between the tag and the supplied commit. It's useful when you just need a simple output to

Re: [boinc_dev] (local ?) BOINC repo broken again -or- how to act on the CR/LF changes made upstream

2014-09-14 Thread Toralf Förster
On 09/14/2014 10:51 AM, Torsten Bögershausen wrote: It may be that there is a bug in the tools you are using. I use git 2.1.0 -- Toralf pgp key: 0076 E94E -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info

[PATCH/RFC 2/2] submodule: modify clone command to recursively shallow clone submodules

2014-09-14 Thread Cole Minnaar
When cloning a repository that contains submodules and specifying the `--depth` option to the 'git clone' command, the top level repository will be cloned with the specified depth, but all submodules within the repository will be cloned in their entirety. Modified 'git clone' to pass the

[PATCH/RFC 1/2] submodule: add ability to shallowly clone any branch in a repo as a submodule

2014-09-14 Thread Cole Minnaar
Currently when specifying the `--depth` option to the 'submodule add' command, it can only create a shallow submodule clone of the currently active branch from the cloned repository. If a branch is specified using the `--branch` option, and the `--depth` option is also specified, the 'submodule

Re: [boinc_dev] (local ?) BOINC repo broken again -or- how to act on the CR/LF changes made upstream

2014-09-14 Thread Torsten Bögershausen
On 09/14/2014 10:51 AM, Torsten Bögershausen wrote: It may be that there is a bug in the tools you are using. I use git 2.1.0 The question was how the commit had been produced: Rom, what are you using ? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH v4 11/32] delete_ref_loose(): don't muck around in the lock_file's filename

2014-09-14 Thread Johannes Sixt
Am 14.09.2014 um 08:38 schrieb Michael Haggerty: On 09/14/2014 08:27 AM, Michael Haggerty wrote: On 09/13/2014 09:41 AM, Johannes Sixt wrote: Am 06.09.2014 um 09:50 schrieb Michael Haggerty: It's bad manners. Especially since, if unlink_or_warn() failed, the memory wasn't restored to its

Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-14 Thread Fabian Ruch
Hi David, On 09/14/2014 10:30 AM, David Aguilar wrote: Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Signed-off-by: David Aguilar dav...@gmail.com --- This verifies and depends on refs: make rev-parse --quiet actually quiet.

[PATCH 1/2] add macro REALLOCARRAY

2014-09-14 Thread René Scharfe
The macro ALLOC_GROW manages several aspects of dynamic memory allocations for arrays: It performs overprovisioning in order to avoid reallocations in future calls, updates the allocation size variable, multiplies the item size and thus allows users to simply specify the item count, performs the

[PATCH 2/2] use REALLOCARRAY for changing the allocation size of arrays

2014-09-14 Thread René Scharfe
Signed-off-by: Rene Scharfe l@web.de --- attr.c | 3 +-- builtin/apply.c| 2 +- builtin/for-each-ref.c | 9 +++-- builtin/index-pack.c | 4 +--- builtin/log.c | 2 +- builtin/merge.c| 2 +- builtin/mv.c | 8

Re: [PATCH 2/3] make update-server-info more robust

2014-09-14 Thread René Scharfe
Am 13.09.2014 um 22:19 schrieb Jeff King: Since git update-server-info may be called automatically as part of a push or a gc --auto, we should be robust against two processes trying to update it simultaneously. However, we currently use a fixed tempfile, which means that two simultaneous

Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-14 Thread David Aguilar
On Sun, Sep 14, 2014 at 06:20:57PM +0200, Fabian Ruch wrote: Hi David, On 09/14/2014 10:30 AM, David Aguilar wrote: Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Signed-off-by: David Aguilar dav...@gmail.com --- This verifies and depends

[PATCH v2 1/2] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-14 Thread David Aguilar
Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Helped-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- Changes since last time: Use git branch test instead of low-level plumbing commands. Capture both stdout and stderr

[PATCH v2 2/2] t1503: use test_must_be_empty

2014-09-14 Thread David Aguilar
Use `test_must_be_be_empty file` instead of `test -z $(cat file)`. Suggested-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- t/t1503-rev-parse-verify.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t1503-rev-parse-verify.sh

[PATCH] builtin/log.c: proper use of usage description array

2014-09-14 Thread Matthias Ruester
Signed-off-by: Matthias Ruester matthias.rues...@gmail.com --- builtin/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index e4d8122..e713618 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -38,8 +38,8 @@ static const char

[PATCH v2 2/3] gitk: write only changed configuration variables

2014-09-14 Thread Max Kirillov
When gitk contains some changed parameter, and there is existing instance of gitk where the parameter is still old, it is reverted to that old value when the instance exits. Instead, store a parameter in config only it is has been modified in the exiting instance. Otherwise, preserve the value

[PATCH v2 1/3] gitk refactor: remove boilerplate for configuration variables

2014-09-14 Thread Max Kirillov
Signed-off-by: Max Kirillov m...@max630.net --- gitk | 88 1 file changed, 20 insertions(+), 68 deletions(-) diff --git a/gitk b/gitk index c8df35d..bc57c11 100755 --- a/gitk +++ b/gitk @@ -2772,23 +2772,11 @@ proc doprogupdate

[PATCH v2 0/3] gitk: save only changed configuration on exit

2014-09-14 Thread Max Kirillov
Changes since v1: * Add value check to config_variable_change_cb * Squash 2/3 and 3/3 and the value check into one commit. There is no really reasons to divide them except following the real coding history * Describle the previous undesirable behavior in commit message * Synchronize writing of

[PATCH v2 3/3] gitk: synchronize config write

2014-09-14 Thread Max Kirillov
If several gitk instances are closed simultaneously, safestuff procedure can run at the same time, resulting in a conflict which may cause losing of some of the instance's changes, failing the saving operation or even corrupting the configuration file. This can happen, for example, at user session

[PATCH] builtin/log.c: mark strings for translation

2014-09-14 Thread Matthias Ruester
Signed-off-by: Matthias Ruester matthias.rues...@gmail.com --- builtin/log.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index e713618..5621475 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -78,7 +78,7 @@ static int

[PATCH] rerere.h: mark string for translation

2014-09-14 Thread Matthias Ruester
Signed-off-by: Matthias Ruester matthias.rues...@gmail.com --- rerere.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rerere.h b/rerere.h index 4aa06c9..2956c2e 100644 --- a/rerere.h +++ b/rerere.h @@ -24,6 +24,6 @@ extern void rerere_clear(struct string_list *); extern

Re: [PATCH/RFC 1/2] submodule: add ability to shallowly clone any branch in a repo as a submodule

2014-09-14 Thread Eric Sunshine
On Sun, Sep 14, 2014 at 6:38 AM, Cole Minnaar cole.minn...@gmail.com wrote: Currently when specifying the `--depth` option to the 'submodule add' command, it can only create a shallow submodule clone of the currently active branch from the cloned repository. If a branch is specified using the

[PATCH v14 08/11] trailer: add tests for git interpret-trailers

2014-09-14 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t7513-interpret-trailers.sh | 726 ++ 1 file changed, 726 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git

[PATCH v14 10/11] trailer: add tests for commands in config file

2014-09-14 Thread Christian Couder
And add a few other tests for some special cases. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t7513-interpret-trailers.sh | 125 ++ 1 file changed, 125 insertions(+) diff --git

[PATCH v14 07/11] trailer: add interpret-trailers command

2014-09-14 Thread Christian Couder
This patch adds the git interpret-trailers command. This command uses the previously added process_trailers() function in trailer.c. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- .gitignore | 1 + Makefile

[PATCH v14 00/11] Add interpret-trailers builtin

2014-09-14 Thread Christian Couder
This patch series implements a new command: git interpret-trailers and an infrastructure to process trailers that can be reused, for example in commit.c. 1) Rationale This command should help with RFC 822 style headers, called trailers, that are found at the end of commit messages.

[PATCH v14 05/11] trailer: parse trailers from file or stdin

2014-09-14 Thread Christian Couder
Read trailers from a file or from stdin, parse the trailers and then put the result into a doubly linked list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 123

[PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-14 Thread Christian Couder
We will use a doubly linked list to store all information about trailers and their configuration. This way we can easily remove or add trailers to or from trailer lists while traversing the lists in either direction. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C

[PATCH v14 04/11] trailer: process command line trailer arguments

2014-09-14 Thread Christian Couder
Parse the trailer command line arguments and put the result into an arg_tok doubly linked list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 125 ++ 1 file

[PATCH v14 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-09-14 Thread Christian Couder
While at it add git-interpret-trailers to command-list.txt. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-interpret-trailers.txt | 313 +++ command-list.txt | 1 +

[PATCH v14 06/11] trailer: put all the processing together and print

2014-09-14 Thread Christian Couder
This patch adds the process_trailers() function that calls all the previously added processing functions and then prints the results on the standard output. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 81

[PATCH v14 02/11] trailer: process trailers from input message and arguments

2014-09-14 Thread Christian Couder
Implement the logic to process trailers from the input message and from arguments. At the beginning trailers from the input message are in their own in_tok doubly linked list, and trailers from arguments are in their own arg_tok doubly linked list. The lists are traversed and when an arg_tok

[PATCH v14 09/11] trailer: execute command from 'trailer.name.command'

2014-09-14 Thread Christian Couder
Let the user specify a command that will give on its standard output the value to use for the specified trailer. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 85

[PATCH v14 03/11] trailer: read and process config information

2014-09-14 Thread Christian Couder
Read the configuration to get trailer information, and then process it and store it in a doubly linked list. The config information is stored in the list whose first item is pointed to by: static struct trailer_item *first_conf_item; Signed-off-by: Christian Couder chrisc...@tuxfamily.org