[BUG] git describe returns wrong tag as closest tag

2015-06-25 Thread Mikael Knutsson
Hi! I've discovered that if you have two non-rewinding branches that you merge between you can get the wrong tag as closest tag if the COMMITTER_DATE of any of the commits after the branch split is before the date of the branch split. You can end up in this state simply by having a committer

[PATCH] commit: add commit.signoff config option

2015-06-25 Thread cmarcelo
From: Caio Marcelo de Oliveira Filho cmarc...@gmail.com In projects that use Signed-off-by, it's convenient to include that line in the commit by default. The commit.signoff config option allows to add that line in all commits automatically. Document that this config option can be overriden by

[PATCH] commit: add commit.signoff config option

2015-06-25 Thread Caio Marcelo de Oliveira Filho
In projects that use Signed-off-by, it's convenient to include that line in the commit by default. The commit.signoff config option allows to add that line in all commits automatically. Document that this config option can be overriden by using --no-signoff. Signed-off-by: Caio Marcelo de

Re: [PATCH 01/17] .gitignore: improve MSVC ignore patterns

2015-06-25 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Philip Oakley philipoak...@iee.org writes: Add the Microsoft .manifest pattern, and correct the generic 'Debug' and 'Release' directory patterns which were mechanically adjusted way back in c591d5f (gitignore: root most patterns at the top-level

Re: git error in tag ...: unterminated header

2015-06-25 Thread Wolfgang Denk
Dear Junio, thanks for the fast replies. In message xmqqegkzzoaz@gitster.dls.corp.google.com you wrote: Question is: how can we fix that? It could be that 4d0d8975 is buggy and barking at a non breakage. If there is no message in the tag, i.e. -- 8 -- object

Re: [PATCH 5/6] git-reflog: add create and exists functions

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 11:35 -0700, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Now, going back to 4/6, I think create_reflog() function as an external API has a few problems. * Its name does not tell us what should happen when a reflog already exists for the

[PATCH v2 3/6] bisect: use refs infrastructure for BISECT_START

2015-06-25 Thread David Turner
This ref needs to go through the refs backend, since some code assumes that it can be written and read as a ref. Signed-off-by: David Turner dtur...@twopensource.com --- contrib/completion/git-completion.bash | 2 +- git-bisect.sh | 4 ++-- 2 files changed, 3

[PATCH v2 1/6] refs.c: add err arguments to reflog functions

2015-06-25 Thread David Turner
Add an err argument to log_ref_setup that can explain the reason for a failure. This then eliminates the need to manage errno through this function since we can just add strerror(errno) to the err string when meaningful. No callers relied on errno from this function for anything else than the

[PATCH v2 4/6] refs: add safe_create_reflog function

2015-06-25 Thread David Turner
Make log_ref_setup private, and add public safe_create_reflog which calls log_ref_setup. In a moment, we will use safe_create_reflog to add reflog creation commands to git-reflog. Signed-off-by: David Turner dtur...@twopensource.com --- builtin/checkout.c | 4 +--- refs.c | 11

[PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-06-25 Thread David Turner
Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: David Turner dtur...@twopensource.com --- branch.c | 4 ++-- builtin/commit.c | 6 +++--- builtin/merge.c

[PATCH v2 6/6] git-stash: use git-reflog instead of creating files

2015-06-25 Thread David Turner
This is in support of alternate ref backends which don't necessarily store reflogs as files. Signed-off-by: David Turner dtur...@twopensource.com --- git-stash.sh | 4 ++-- refs.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index

[PATCH v2 5/6] git-reflog: add create and exists functions

2015-06-25 Thread David Turner
These are necessary because ref backends manage reflogs. In a moment, we will use these functions to make git stash work with alternate ref backends. Signed-off-by: David Turner dtur...@twopensource.com --- builtin/reflog.c | 79 +++- 1 file

Re: [PATCH 01/17] .gitignore: improve MSVC ignore patterns

2015-06-25 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: Debug/ Release/ suffice? Probably. I was thinking of the 'at any level' aspect... Yeah, that is exactly the difference between rooted /Debug/ and Debug/ ;-). -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH v2 3/6] bisect: use refs infrastructure for BISECT_START

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: This ref needs to go through the refs backend, since some code assumes that it can be written and read as a ref. And the reason why BISECT_HEAD cannot be treated as a ref, but must be treated as a file under $GIT_DIR, is...? Signed-off-by: David

several date related issues

2015-06-25 Thread H.Merijn Brand
Running 2.4.4 *** Dates do not respect LC_TIME $ date Thu 25 Jun 2015 13:02:48 CEST $ git log --pretty=fuller --date=local | head -6 | grep -i date AuthorDate: Mon Feb 16 16:47:08 2015 CommitDate: Mon Feb 16 16:47:08 2015 $ locale -ck LC_TIME | grep fmt d_t_fmt=%a %d %b %Y %r %Z d_fmt=%d-%m-%Y

Re: [PATCH/WIP v3 06/31] am: detect mbox patches

2015-06-25 Thread Paul Tan
On Wed, Jun 24, 2015 at 11:10 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Paul, On 2015-06-18 13:25, Paul Tan wrote: diff --git a/builtin/am.c b/builtin/am.c index e9a3687..7b97ea8 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -121,6 +121,96 @@ static void

[PATCH] blame: remove obsolete comment

2015-06-25 Thread Nguyễn Thái Ngọc Duy
That someday in the comment happened two years later in b65982b (Optimize diff-index --cached using cache-tree - 2009-05-20) Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/blame.c | 5 - 1 file changed, 5 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index

[RFC/PATCH 5/9] ref-filter: add option to match literal pattern

2015-06-25 Thread Karthik Nayak
Since 'ref-filter' only has an option to match path names. Add an option for regular pattern matching. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com --- builtin/for-each-ref.c |

[RFC/PATCH 7/9] tag.c: use 'ref-filter' APIs

2015-06-25 Thread Karthik Nayak
Make 'tag.c' use 'ref-filter' APIs for iterating through refs sorting and printing of refs. This removes most of the code used in 'tag.c' replacing it with calls to the 'ref-filter' library. Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter' to filter out tags based on the

[RFC/PATCH 8/9] tag.c: implement '--format' option

2015-06-25 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy

[RFC/PATCH 6/9] tag.c: use 'ref-filter' data structures

2015-06-25 Thread Karthik Nayak
Make 'tag.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'tag.c' to use 'ref-filter' APIs. This is a temporary step before porting 'tag.c' to use 'ref-filter' completely. As this is a temporary step, most of the

[RFC/PATCH 2/9] ref-filter: add option to filter only tags

2015-06-25 Thread Karthik Nayak
Add an option in 'filter_refs()' to use 'for_each_tag_ref()' and filter refs. This type checking is done by adding a 'FILTER_REFS_TAGS' in 'ref-filter.h' Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

[RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-25 Thread Karthik Nayak
Add support for %(refname:lalignX) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X characters. If X is less than the shortened refname size, the entire shortened refname is printed. Mentored-by: Christian Couder

[RFC/PATCH 3/9] ref-filter: support printing N lines from tag annotation

2015-06-25 Thread Karthik Nayak
In 'tag.c' we can print N lines from the annotation of the tag using the '-nnum' option. Copy code from 'tag.c' to 'ref-filter' and modify 'ref-filter' to support printing of N lines from the annotation of tags. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy

Re: What's cooking in git.git (Jun 2015, #06; Wed, 24)

2015-06-25 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: - I *think* that the current `recreate_opt()` is fine, but if it is used more, we will have to quote the arguments to guard against spaces and quotes and whatnot I admit that that was the reaction I had when I saw it for the first time,

Re: [PATCH/WIP v3 07/31] am: extract patch, message and authorship with git-mailinfo

2015-06-25 Thread Paul Tan
On Wed, Jun 24, 2015 at 11:59 PM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: 3. I'm over-thinking this and you just want the struct strbufs in the struct am_state to be switched to char*s? Yes, everybody interacts with am_state, and these fields are

Re: [PATCH] apply: fix adding new files on i-t-a entries

2015-06-25 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: I think it's clear that you need to revert that commit. I didn't see this at all when I made the commit. I didn't either, and no other reviewers did. But now we know it was not sufficient, so let's see... Perhaps a good and safe way forward to resurrect

Re: several date related issues

2015-06-25 Thread Jeff King
On Thu, Jun 25, 2015 at 01:19:01PM +0200, H.Merijn Brand wrote: *** Dates do not respect LC_TIME Right, we use our own routines for formatting the dates, and not strftime. And it probably should stay that way in general, as git's output is often meant to be parsed. That being said, I do not

Re: [PATCH] apply: fix adding new files on i-t-a entries

2015-06-25 Thread Duy Nguyen
On Thu, Jun 25, 2015 at 12:05 AM, Junio C Hamano gits...@pobox.com wrote: Internal diff-index --cached is used for another reason you did not mention (and scripted Porcelains literally use that externally for the same reason). When we start a mergy operation, we say it is OK if the working

Re: [PATCH 0/6] refs backend preamble

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: This set of patches is a preamble to pluggable ref backends. The intent is to use the ref infrastructure for special refs like CHERRY_PICK_HEAD where possible, and to use git plumbing commands to access refs and reflogs instead of directly

[RFC/PATCH 8/9] tag.c: implement '--format' option

2015-06-25 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy

Re: What's cooking in git.git (Jun 2015, #06; Wed, 24)

2015-06-25 Thread Johannes Schindelin
Hi, On 2015-06-25 03:01, Stefan Beller wrote: * pt/pull-builtin (2015-06-18) 19 commits - pull: remove redirection to git-pull.sh - pull --rebase: error on no merge candidate cases - pull --rebase: exit early when the working directory is dirty - pull: configure --rebase via

[RFC/PATCH 4/9] ref-filter: add support to sort by version

2015-06-25 Thread Karthik Nayak
Add support to sort by version using the v:refname and version:refname option. This is achieved by using the 'version_cmp()' function as the comparing function for qsort. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by:

Re: several date related issues

2015-06-25 Thread H.Merijn Brand
On Thu, 25 Jun 2015 08:44:45 -0400, Jeff King p...@peff.net wrote: On Thu, Jun 25, 2015 at 01:19:01PM +0200, H.Merijn Brand wrote: *** Dates do not respect LC_TIME Right, we use our own routines for formatting the dates, and not strftime. And it probably should stay that way in general,

Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue

2015-06-25 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: From: Junio C Hamano gits...@pobox.com I am not sure what this patch is trying to achieve. It was probably a bit of 'don't mess with working code', given that I'd used the NO_PERL solution, rather 'document the issue' Then this part applies, I

Re: git error in tag ...: unterminated header

2015-06-25 Thread Junio C Hamano
Wolfgang Denk w...@denx.de writes: Hm... it seems I cannot even easily delte these tags: - git tag -d LABEL_2006_03_12_0025 Deleted tag 'LABEL_2006_03_12_0025' (was eb394f5) - git fsck --full Checking object directories: 100% (256/256), done. Checking object directories: 100% (256/256),

[RFC/PATCH 0/9] port tag.c to use ref-filter library

2015-06-25 Thread Karthik Nayak
This is part of the GSoC project to unify the commands `git tag -l`, `git branch -l` and `git for-each-ref`. This is a follow up to http://article.gmane.org/gmane.comp.version-control.git/272641 which is still in the 6th iteration. This ports over tag.c to use ref-filter APIs and adds --format,

Re: [PATCH 2/2] introduce preciousObjects repository extension

2015-06-25 Thread Jeff King
On Wed, Jun 24, 2015 at 10:15:08AM -0700, Junio C Hamano wrote: I agree that would be better. I originally just blocked all use of git-repack, but at the last minute softened it to just repack -d. I'm not sure if that would actually help anyone in practice. Sure, doing git repack without

[ANNOUNCE] Git v2.5.0-rc0

2015-06-25 Thread Junio C Hamano
An early preview release Git v2.5.0-rc0 is now available for testing at the usual places. It is comprised of 492 non-merge commits since v2.4.0, contributed by 54 people, 17 of which are new faces. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/testing/ The

[ANNOUNCE] Git v2.4.5

2015-06-25 Thread Junio C Hamano
The latest maintenance release Git v2.4.5 is now available at the usual places. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories all have a copy of the 'v2.4.5' tag and the 'maint' branch that the tag points at: url =

Re: [PATCH 00/17] Make the msvc-build scripts work again

2015-06-25 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Philip Oakley philipoak...@iee.org writes: Hopefully it's not too late in the cycle for a review of this contrib/compat item. Has this been discussed in the Windows land and folks are all happy with this change? If so the only thing we would need

Re: git error in tag ...: unterminated header

2015-06-25 Thread Junio C Hamano
Wolfgang Denk w...@denx.de writes: Dear Junio, thanks for the fast replies. In message xmqqegkzzoaz@gitster.dls.corp.google.com you wrote: Question is: how can we fix that? It could be that 4d0d8975 is buggy and barking at a non breakage. If there is no message in the tag, i.e.

Re: [PATCH 3/6] bisect: use refs infrastructure for BISECT_START

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 09:52 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: This ref needs to go through the refs backend, since some code assumes that it can be written and read as a ref. And BISECT_HEAD should no longer be a ref because...? I can't remember

Re: [PATCH v2 4/6] refs: add safe_create_reflog function

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Make log_ref_setup private, and add public safe_create_reflog which calls log_ref_setup. In a moment, we will use safe_create_reflog to add reflog creation commands to git-reflog. Signed-off-by: David Turner dtur...@twopensource.com ---

Re: [PATCH v2 5/6] git-reflog: add create and exists functions

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Because...??? These are necessary because ref backends manage reflogs. Because ref backends manage reflogs may be a good explanation to implement something as part of ref API, but it does not explain why that something needs to be implemented in

Re: git error in tag ...: unterminated header

2015-06-25 Thread Johannes Schindelin
Hi Junio Wolfgang, On 2015-06-25 22:24, Junio C Hamano wrote: Wolfgang Denk w...@denx.de writes: In message xmqqegkzzoaz@gitster.dls.corp.google.com you wrote: Question is: how can we fix that? It could be that 4d0d8975 is buggy and barking at a non breakage. Well, I would like to

Re: [PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: David Turner dtur...@twopensource.com --- I may have said this already in the last round, but I

Re: git error in tag ...: unterminated header

2015-06-25 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Hi Junio Wolfgang, On 2015-06-25 22:24, Junio C Hamano wrote: Wolfgang Denk w...@denx.de writes: In message xmqqegkzzoaz@gitster.dls.corp.google.com you wrote: Question is: how can we fix that? It could be that 4d0d8975 is

[PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Caio Marcelo de Oliveira Filho
In projects that use Signed-off-by, it's convenient to include that line in the commit message by default. The commit.signoff config option allows to add that line in all commits automatically. Document that this config option can be overriden by using --no-signoff. Signed-off-by: Caio Marcelo

Re: [PATCH] commit: add commit.signoff config option

2015-06-25 Thread Caio Marcelo de Oliveira Filho
In both tests, you should probably use 'test_config' instead of 'git config [...] git config --unset', it takes care of it for you (also should prevent the case where the config is not unset when your test fails in the middle). Posted a v2 with this improvement and the bash completion. Thanks

Re: [PATCH] commit: add commit.signoff config option

2015-06-25 Thread Caio Marcelo de Oliveira Filho
On Thu, Jun 25, 2015 at 5:43 AM, Christian Couder christian.cou...@gmail.com wrote: You can use a commit template. Or you can use the commit-msg hook. For example with commands like: grep ^Signed-off-by: $1 || echo Signed-off-by: $(git config user.name) $(git config user.email) $1 If you

Re: [PATCH/WIP v3 04/31] am: implement patch queue mechanism

2015-06-25 Thread Paul Tan
On Wed, Jun 24, 2015 at 10:59 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: diff --git a/builtin/am.c b/builtin/am.c index dbc8836..af68c51 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -6,6 +6,158 @@ #include cache.h #include builtin.h #include exec_cmd.h +#include

git error in tag ...: unterminated header

2015-06-25 Thread Wolfgang Denk
Hi all, it turns out that recent versions of git (i. e. git version 2.2.0 or later, resp. anything which includes commit 4d0d8975 Make sure fsck_commit_buffer() does not run out of the buffer) throws errors on our git repository git://git.denx.de/u-boot: - git fsck --full Checking object

Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue

2015-06-25 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: A 'make -n' dry-run is used as part of the /compat/vcbuild and /contrib/buildsystems code. The commit ee9be06 (perl: detect new files in MakeMaker builds, 2012-07-27) was not aware of that dry-run usage and thus would not execute the target. Add a

Re: [PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Johannes Löthberg
On 25/06, Junio C Hamano wrote: Caio Marcelo de Oliveira Filho cmarc...@gmail.com writes: Hmm, I do not recall seeing v1 but that is OK. The following immediately comes to mind. http://thread.gmane.org/gmane.comp.version-control.git/51754/focus=51780 To be honest I'm not sure I buy that

Re: [PATCH 00/17] Make the msvc-build scripts work again

2015-06-25 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: Hopefully it's not too late in the cycle for a review of this contrib/compat item. Has this been discussed in the Windows land and folks are all happy with this change? If so the only thing we would need review on the main list is the top-level

Re: 'eol' documentation confusion

2015-06-25 Thread Torsten Bögershausen
On 2015-06-22 18.11, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: eol=lf or eol=crlf are the only useful settings. Everything else is ignored because it does not make sense. See convert.c: static enum eol git_path_check_eol() That makes me wonder... The original

Linked workdirs break typo-correction.

2015-06-25 Thread Bjørnar Snoksrud
This is a weird one.. When standing in a folder inside a linked working copy, the typo-correction breaks all commands. Repro: ~/git $ git --version git version 2.4.4.600.g6397abd ~/git $ git init bar Initialized empty Git repository in ~/git/bar/.git/ ~/git $ cd bar ~/git/bar (master #) $ git

Re: [PATCH 01/17] .gitignore: improve MSVC ignore patterns

2015-06-25 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: Add the Microsoft .manifest pattern, and correct the generic 'Debug' and 'Release' directory patterns which were mechanically adjusted way back in c591d5f (gitignore: root most patterns at the top-level directory, 2009-10-26) to allow multi-level

Re: [PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Caio Marcelo de Oliveira Filho
Hi, Hmm, I do not recall seeing v1 but that is OK. http://thread.gmane.org/gmane.comp.version-control.git/272635 http://thread.gmane.org/gmane.comp.version-control.git/272636 The following immediately comes to mind. http://thread.gmane.org/gmane.comp.version-control.git/51754/focus=51780

Re: [PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Junio C Hamano
Caio Marcelo de Oliveira Filho cmarc...@gmail.com writes: In projects that use Signed-off-by, it's convenient to include that line in the commit message by default. The commit.signoff config option Hmm, I do not recall seeing v1 but that is OK. The following immediately comes to mind.

Re: [PATCH 2/3] convert enum date_mode into a struct

2015-06-25 Thread John Keeping
On Thu, Jun 25, 2015 at 12:55:02PM -0400, Jeff King wrote: In preparation for adding date modes that may carry extra information beyond the mode itself, this patch converts the date_mode enum into a struct. Most of the conversion is fairly straightforward; we pass the struct as a pointer

Re: [PATCH 5/6] git-reflog: add create and exists functions

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: These are necessary because ref backends manage reflogs. Because? Because with core.logAllRefUpdates set to false, creating or updating a ref would not log what is done to it, unless a reflog already exists for the ref.

Re: [PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Junio C Hamano
Caio Marcelo de Oliveira Filho cmarc...@gmail.com writes: A similar concern probably applies to format.signOff option. Would be sufficient to add a note about conscious act (like format.signOff has) to the config description? I am generally in negative on automating this. This is not just

[PATCH 2/3] convert enum date_mode into a struct

2015-06-25 Thread Jeff King
In preparation for adding date modes that may carry extra information beyond the mode itself, this patch converts the date_mode enum into a struct. Most of the conversion is fairly straightforward; we pass the struct as a pointer and dereference the type field where necessary. Locations that

[PATCH 3/3] introduce format date-mode

2015-06-25 Thread Jeff King
This feeds the format directly to strftime. Besides being a little more flexible, the main advantage is that your system strftime may know more about your locale's preferred format (e.g., how to spell the days of the week). Signed-off-by: Jeff King p...@peff.net ---

Re: [PATCH 2/3] convert enum date_mode into a struct

2015-06-25 Thread Jeff King
On Thu, Jun 25, 2015 at 06:03:28PM +0100, John Keeping wrote: Ideally we could say: show_date(t, tz, { DATE_NORMAL }); but of course C does not allow that. Yes it does, e.g. in 6.5.2.5 of C11, example 3 shows: Well, yes. But we generally restrict ourselves to C89 here, so we are

Re: git error in tag ...: unterminated header

2015-06-25 Thread Junio C Hamano
Wolfgang Denk w...@denx.de writes: Apparently for some reason the tags LABEL_2006_03_12_0025, LABEL_2006_04_18_1106, and LABEL_2006_05_19_1133 are missing newlines, which was undetected so far, but now is raised as an error. Question is: how can we fix that? Is there a tool to auto-repair

Re: [PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Torsten Bögershausen
On 2015-06-25 16.50, Caio Marcelo de Oliveira Filho wrote: +test_expect_success 'commit.signoff config option' ' + test_config commit.signoff true + echo yet another content *narf* foo Minor nit: The or should be written without a space, like this: foo -- To unsubscribe from

[PATCH 1/3] show-branch: use DATE_RELATIVE instead of magic number

2015-06-25 Thread Jeff King
This is more readable, and won't break if we ever change the order of the date_mode enum. Signed-off-by: Jeff King p...@peff.net --- builtin/show-branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index 323f857..d784613

Re: [PATCH 4/6] refs: replace log_ref_write with create_reflog

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: In a moment, we will use this to add reflog creation commands to git-reflog. Signed-off-by: David Turner dtur...@twopensource.com --- The title is misleading, if this is merely renaming. I first thought with this change the current callers of

Re: git error in tag ...: unterminated header

2015-06-25 Thread Junio C Hamano
Wolfgang Denk w...@denx.de writes: it turns out that recent versions of git (i. e. git version 2.2.0 or later, resp. anything which includes commit 4d0d8975 Make sure fsck_commit_buffer() does not run out of the buffer) throws errors on our git repository git://git.denx.de/u-boot: - git

Re: [PATCH 1/6] refs.c: add an err argument to log_ref_setup

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Add err argument to log_ref_setup that can explain the reason for a failure. This then eliminates the need to manage errno through this function since we can just add strerror(errno) to the err string when meaningful. No callers relied on errno

Re: [PATCH 2/6] cherry-pick: Use refs infrastructure for CHERRY_PICK_HEAD

2015-06-25 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Subject: Re: [PATCH 2/6] cherry-pick: Use refs infrastructure for CHERRY_PICK_HEAD Also use refs infrastructure for REVERT_HEAD. These refs need to go through the refs backend, since some code assumes that they can be read as refs.

Re: What's cooking in git.git (Jun 2015, #06; Wed, 24)

2015-06-25 Thread Johannes Schindelin
Hi Junio, On 2015-06-25 15:14, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: - I *think* that the current `recreate_opt()` is fine, but if it is used more, we will have to quote the arguments to guard against spaces and quotes and whatnot I admit that that

[PATCH v9 0/5] bisect terms

2015-06-25 Thread Matthieu Moy
This version takes into account Junio's remark on the previous series, and I did a much more thourough review of the whole, which led to a few fixes (one forgotten strcmp(..., bad) in addition to the other noted by Junio), some style fixes, and some simplifications (the file TERMS_DEFINED of PATCH

[PATCH v9 1/5] bisect: correction of typo

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Matthieu Moy matthieu@imag.fr --- bisect.c| 2 +- t/t6030-bisect-porcelain.sh | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v9 4/5] bisect: add the terms old/new

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr When not looking for a regression during a bisect but for a fix or a change in another given property, it can be confusing to use 'good' and 'bad'. This patch introduce `git bisect new` and `git bisect old` as an alternative to 'bad'

[PATCH v9 2/5] bisect: replace hardcoded bad|good by variables

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr To add new tags like old/new and have keywords less confusing, the first step is to avoid hardcoding the keywords. The default mode is still bad/good. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr

[PATCH v9 3/5] bisect: simplify the addition of new bisect terms

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr We create a file BISECT_TERMS in the repository .git to be read during a bisection. The fonctions to be changed if we add new terms are quite few. In git-bisect.sh : check_and_set_terms bisect_voc Co-authored-by: Louis

[PATCH v9 5/5] bisect: allow any terms set by user

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Introduction of the git bisect terms command. The user can set his own terms. It will work exactly like before. The terms must be set before the start. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr

Re: [PATCH v2] commit: add commit.signoff config option

2015-06-25 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: [commit] signoff = I certify that all my work is licenseable under DCO I like this one. The paranoid version would be signoff = I certify that all my work in /home/my/projects/foo are ... to avoid mistakenly have the config option applied to

Re: [PATCH 5/6] git-reflog: add create and exists functions

2015-06-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Now, going back to 4/6, I think create_reflog() function as an external API has a few problems. * Its name does not tell us what should happen when a reflog already exists for the refname the caller asked to create reflog for. I understand

Re: [PATCH v9 5/5] bisect: allow any terms set by user

2015-06-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: +Only the first bisection following the `git bisect terms` will use the +terms. If you mistyped one of the terms you can do again `git bisect +terms term-old term-new`. This paragraph may need further polishing. The first sentence makes it sound as if

Re: [PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 14:11 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: David Turner dtur...@twopensource.com

Re: git error in tag ...: unterminated header

2015-06-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Johannes Schindelin johannes.schinde...@gmx.de writes: ... If the buffer does *not* contain an empty line, the fsck code runs the danger of looking beyond the allocated memory because it uses functions that assume NUL-terminated strings, while the

Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue

2015-06-25 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Philip Oakley philipoak...@iee.org writes: From: Junio C Hamano gits...@pobox.com I am not sure what this patch is trying to achieve. It was probably a bit of 'don't mess with working code', given that I'd used the NO_PERL solution, rather 'document

Re: [PATCH v2 3/6] bisect: use refs infrastructure for BISECT_START

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 13:52 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: This ref needs to go through the refs backend, since some code assumes that it can be written and read as a ref. And the reason why BISECT_HEAD cannot be treated as a ref, but must be

Re: [PATCH] Revert stash: require a clean index to apply

2015-06-25 Thread Jonathan Kamens
Is this revert going to be applied and released? Sent from my Android device -Original Message- From: Junio C Hamano gits...@pobox.com To: Jeff King p...@peff.net Cc: bär crashcoo...@gmail.com, Jonathan Kamens jkam...@quantopian.com, Git List git@vger.kernel.org Sent: Mon, 15 Jun 2015

Re: [PATCH v2 5/6] git-reflog: add create and exists functions

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 16:45 -0400, David Turner wrote: +static int cmd_reflog_create(int argc, const char **argv, const char *prefix) +{ While revising this patch, I noticed that safe_create_reflog (and this cmd_reflog_create) only creates reflogs for refs of the form that git itself would

Re: [PATCH v9 5/5] bisect: allow any terms set by user

2015-06-25 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: + +git bisect terms term-new term-old + The mnemonic for git bisect start bad good is Bad comes before Good (B = 0x42, G = 0x47) and this is same for

Re: [PATCH v9 4/5] bisect: add the terms old/new

2015-06-25 Thread Christian Couder
On Thu, Jun 25, 2015 at 8:50 PM, Matthieu Moy matthieu@imag.fr wrote: [...] @@ -178,7 +183,7 @@ bisect_start() { } git rev-parse --sq-quote $@ $GIT_DIR/BISECT_NAMES eval $eval true - if test $revision_seen -eq 1 test ! -s $GIT_DIR/BISECT_TERMS +

Re: [PATCH] Revert stash: require a clean index to apply

2015-06-25 Thread Jeff King
On Thu, Jun 25, 2015 at 09:12:55PM -0400, Jonathan Kamens wrote: I encountered this issue in git 2.4.3 on Fedora 22. Ah, sorry, you're right. I must have fed the wrong sha1 to git tag --contains earlier. I agree it can probably go onto the v2.4.x maintenance track. It is already in v2.5.0-rc0.

Re: [PATCH] Revert stash: require a clean index to apply

2015-06-25 Thread Junio C Hamano
On Thu, Jun 25, 2015 at 9:03 PM, Jeff King p...@peff.net wrote: On Thu, Jun 25, 2015 at 09:12:55PM -0400, Jonathan Kamens wrote: I encountered this issue in git 2.4.3 on Fedora 22. Ah, sorry, you're right. I must have fed the wrong sha1 to git tag --contains earlier. I agree it can

Re: [PATCH v2 3/6] bisect: use refs infrastructure for BISECT_START

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 19:21 -0400, David Turner wrote: On Thu, 2015-06-25 at 13:52 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: This ref needs to go through the refs backend, since some code assumes that it can be written and read as a ref. And the

Re: [PATCH] Revert stash: require a clean index to apply

2015-06-25 Thread Jeff King
On Thu, Jun 25, 2015 at 05:49:11PM -0400, Jonathan Kamens wrote: Is this revert going to be applied and released? It is on master, and part of v2.5.0-rc0 (it is not part of v2.4.x, because the original problem was not there, either). -Peff -- To unsubscribe from this list: send the line

[PATCH v3 1/7] refs.c: add err arguments to reflog functions

2015-06-25 Thread David Turner
Add an err argument to log_ref_setup that can explain the reason for a failure. This then eliminates the need to manage errno through this function since we can just add strerror(errno) to the err string when meaningful. No callers relied on errno from this function for anything else than the

[PATCH v3 5/7] refs: add safe_create_reflog function

2015-06-25 Thread David Turner
Make log_ref_setup private, and add public safe_create_reflog which calls log_ref_setup. In a moment, we will use safe_create_reflog to add reflog creation commands to git-reflog. Signed-off-by: David Turner dtur...@twopensource.com --- builtin/checkout.c | 4 +--- refs.c | 19

[PATCH v3 2/7] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-06-25 Thread David Turner
Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: David Turner dtur...@twopensource.com --- branch.c | 4 ++-- builtin/commit.c | 6 +++--- builtin/merge.c

[PATCH v3 6/7] git-reflog: add create and exists functions

2015-06-25 Thread David Turner
These are necessary because alternate ref backends might store reflogs somewhere other than .git/logs. Code that now directly manipulates .git/logs should instead go through git-reflog. In a moment, we will use these functions to make git stash work with alternate ref backends. Signed-off-by:

  1   2   >