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

[PATCH] commit: add commit.signoff config option

2015-06-25 Thread cmarcelo
From: 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.

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

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

2015-06-25 Thread Alexander Kuleshov
On 06/25, cmarc...@gmail.com wrote: > From: 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 conf

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

2015-06-25 Thread Remi Galan Alfonso
Caio Marcelo de Oliveira Filho writes: > +test_expect_success 'commit.signoff config option' ' > +git config commit.signoff true && > +echo "yet another content *narf*" >> foo && > +echo "zort" | git commit -F - foo && > +git cat-file commit HEAD | sed "1,/^\$/d" >

Re: [PATCH v5 01/11] t6301: for-each-ref tests for ref-filter APIs

2015-06-25 Thread Karthik Nayak
On Thu, Jun 25, 2015 at 5:46 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> t/t6301-for-each-ref-filter.sh | 19 +++ > > t6301 is already used in mh/reporting-broken-refs-from-for-each-ref > topic. Please renumber. > Will do :) Thanks -- Regards, Karthik Nayak -- To un

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

2015-06-25 Thread Christian Couder
On Thu, Jun 25, 2015 at 9:32 AM, Caio Marcelo de Oliveira Filho wrote: > 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. You can use a commit template. Or

[PATCH v6 00/11] add options to for-each-ref

2015-06-25 Thread Karthik Nayak
v5 of this patch series can be found here : http://article.gmane.org/gmane.comp.version-control.git/272590 This is a continuation of my GSoC project to unify git tag -l, git branch -l and for-each-ref. Continued from this patch series : http://thread.gmane.org/gmane.comp.version-control.git/271563

[PATCH v6 05/11] ref-filter: add parse_opt_merge_filter()

2015-06-25 Thread Karthik Nayak
Add 'parse_opt_merge_filter()' to parse '--merged' and '--no-merged' options and write macros for the same. This is copied from 'builtin/branch.c' which will eventually be removed when we port 'branch.c' to use ref-filter APIs. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored

[PATCH v6 04/11] for-each-ref: add '--points-at' option

2015-06-25 Thread Karthik Nayak
Add the '--points-at' option provided by 'ref-filter'. The option lets the user to pick only refs which point to a particular commit. Add documentation and tests for the same. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

[PATCH v6 06/11] ref-filter: implement '--merged' and '--no-merged' options

2015-06-25 Thread Karthik Nayak
In 'branch -l' we have '--merged' option which only lists refs (branches) merged into the named commit and '--no-merged' option which only lists refs (branches) not merged into the named commit. Implement these two options in ref-filter.{c,h} so that other commands can benefit from this. Based-on-

[PATCH v6 02/11] tag: libify parse_opt_points_at()

2015-06-25 Thread Karthik Nayak
Rename 'parse_opt_points_at()' to 'parse_opt_object_name()' and move it from 'tag.c' to 'parse-options'. This now acts as a common parse_opt function which accepts an objectname and stores it into a sha1_array. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored-by: Matthieu Moy

[PATCH v6 03/11] ref-filter: implement '--points-at' option

2015-06-25 Thread Karthik Nayak
In 'tag -l' we have '--points-at' option which lets users list only tags which point to a particular commit. Implement this option in 'ref-filter.{c,h}' so that other commands can benefit from this. This is duplicated from tag.c, we will eventually remove that when we port tag.c to use ref-filter

[PATCH v6 01/11] t6302: for-each-ref tests for ref-filter APIs

2015-06-25 Thread Karthik Nayak
Add a test suite for testing the ref-filter APIs used by for-each-ref. We just intialize the test suite for now. More tests will be added in the following patches as more options are added to for-each-ref. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored-by: Matthieu Moy Sign

[PATCH v6 07/11] for-each-ref: add '--merged' and '--no-merged' options

2015-06-25 Thread Karthik Nayak
Add the '--merged' and '--no-merged' options provided by 'ref-filter'. The '--merged' option lets the user to only list refs merged into the named commit. The '--no-merged' option lets the user to only list refs not merged into the named commit. Add documentation and tests for the same. Based-on-

[PATCH v6 09/11] parse-options.h: add macros for '--contains' option

2015-06-25 Thread Karthik Nayak
Add a macro for using the '--contains' option in parse-options.h also include an optional '--with' option macro which performs the same action as '--contains'. Make tag.c and branch.c use this new macro. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

[PATCH v6 10/11] ref-filter: implement '--contains' option

2015-06-25 Thread Karthik Nayak
'tag -l' and 'branch -l' have two different ways of finding out if a certain ref contains a commit. Implement both these methods in ref-filter and give the caller of ref-filter API the option to pick which implementation to be used. 'branch -l' uses 'is_descendant_of()' from commit.c which is left

[PATCH v6 11/11] for-each-ref: add '--contains' option

2015-06-25 Thread Karthik Nayak
Add the '--contains' option provided by 'ref-filter'. The '--contains' option lists only refs which contain the mentioned commit (HEAD if no commit is explicitly given). Add documentation and tests for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Naya

[PATCH v6 08/11] parse-option: rename parse_opt_with_commit()

2015-06-25 Thread Karthik Nayak
Rename parse_opt_with_commit() to parse_opt_commits() to show that it can be used to obtain a list of commits and is not constricted to usage of '--contains' option. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/branch.c | 4 ++-- builtin/ta

Re: Dependency Management

2015-06-25 Thread Luke Diamand
On 23/06/15 19:49, Josh Hagins wrote: If neither git-submodule nor git-subtree is palatable to you, here are a couple of alternatives you might try: * https://github.com/ingydotnet/git-subrepo * https://github.com/tdd/git-stree You could also use Android's "repo" tool: https://code.goog

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

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 bra

[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 --- builtin/blame.c | 5 - 1 file changed, 5 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index b3e948e..b077bb

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

[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 Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- ref-filter.c | 20

[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 '-n' 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 Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak -

[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 Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- ref-filter.c | 2 ++ ref-filter.h | 1 + 2 files ch

[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 Mentored-by:

[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 Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/for-each-ref.c | 1 + ref-filter.c | 30 -- ref-filter.

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

[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 Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

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

[RFC/PATCH 9/9] tag.c: implement '--merged' and '--no-merged' options

2015-06-25 Thread Karthik Nayak
Using 'ref-filter' APIs implement the '--merged' and '--no-merged' options into 'tag.c'. The '--merged' option lets the user to only list tags merged into the named commit. The '--no-merged' option lets the user to only list tags not merged into the named commit. If no object is provided it assumes

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 wrote: > Paul Tan 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 > supposed to be constant duri

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 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 tree has local

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 th

Re: several date related issues

2015-06-25 Thread H.Merijn Brand
On Thu, 25 Jun 2015 08:44:45 -0400, Jeff King 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, as git'

[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 Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak ---

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

2015-06-25 Thread Junio C Hamano
Duy Nguyen 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 what d95d728a >

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

2015-06-25 Thread Junio C Hamano
Johannes Schindelin 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, until I realized how it i

Re: [PATCH 0/6] refs backend preamble

2015-06-25 Thread Junio C Hamano
David Turner 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 writing files to the .git >

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 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 am_destroy(const struct am

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 com

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

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

2015-06-25 Thread Junio C Hamano
Caio Marcelo de Oliveira Filho 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. http://thread.gmane.org

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

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

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 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 since we have `git comm

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

2015-06-25 Thread Junio C Hamano
Philip Oakley 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 change outside compat/ a

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

2015-06-25 Thread Junio C Hamano
Philip Oakley 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 projects within the

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 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 "parse-o

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

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 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 comment to the

Re: 'eol' documentation confusion

2015-06-25 Thread Torsten Bögershausen
On 2015-06-22 18.11, Junio C Hamano wrote: > Torsten Bögershausen 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

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 dire

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

2015-06-25 Thread Junio C Hamano
Caio Marcelo de Oliveira Filho 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 you but makes ever

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

2015-06-25 Thread Junio C Hamano
David Turner 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 from this function for

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

2015-06-25 Thread Junio C Hamano
David Turner 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. cherry-pick: treat CHER

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 unsub

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

2015-06-25 Thread Junio C Hamano
David Turner 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...? > > Signed-off-by: David Turner > --- > contrib/completion/git-completion.bash | 2 +- > git-bisect.s

[PATCH 0/3] localized date format

2015-06-25 Thread Jeff King
On Thu, Jun 25, 2015 at 02:56:59PM +0200, H.Merijn Brand wrote: > > That being said, I do not think it would be wrong to have a date-mode > > that just showed strftime("%c"), or some other arbitrary strftime > > string. You could then set log.date as appropriate for human > > consumption. > > Ye

[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 --- 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 100644 --- a/built

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

2015-06-25 Thread Junio C Hamano
David Turner writes: > In a moment, we will use this to add reflog creation commands to > git-reflog. > > Signed-off-by: David Turner > --- The title is misleading, if this is merely renaming. I first thought with this change the current callers of log_ref_setup() would get a different/updated

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

[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 --- Documentation/rev-list-options.txt | 5 +++

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 point

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

2015-06-25 Thread Junio C Hamano
David Turner 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. There are cases where

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 her

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

2015-06-25 Thread Junio C Hamano
Wolfgang Denk 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" suc

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

2015-06-25 Thread Junio C Hamano
Wolfgang Denk 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 fsck -

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

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

2015-06-25 Thread Junio C Hamano
Junio C Hamano 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 that this on

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

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

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite 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 Stuber Tweaked-by: Matthieu Moy Signe

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

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite Signed-off-by: Antoine Delaite Signed-off-by: Matthieu Moy --- bisect.c| 2 +- t/t6030-bisect-porcelain.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bisect.c b/bisect.c index 03d5cd9..5b8357d 100644 --- a/bisect.c +++ b/bis

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

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite 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' and good': the commits which have a cert

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

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite 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 Signed-off-by: Louis Stuber Signed-off-by: Valentin Duperray Signed-off-by: Franck Jonas

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

2015-06-25 Thread Matthieu Moy
From: Antoine Delaite 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 Signed-off-by: Louis Stuber Signed-off-by: Matthieu Moy --- Documentation/git-bisect.tx

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

2015-06-25 Thread Matthieu Moy
Junio C Hamano 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 the wrong re

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

2015-06-25 Thread Philip Oakley
From: "Junio C Hamano" Philip Oakley 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: [PATCH 01/17] .gitignore: improve MSVC ignore patterns

2015-06-25 Thread Philip Oakley
From: "Junio C Hamano" Philip Oakley 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 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" Philip Oakley 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

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

2015-06-25 Thread Wolfgang Denk
Dear Junio, thanks for the fast replies. In message 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 84ef51a632063e8cb57b2e9a4252497512831ffe >

[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 = https://kernel

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

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" writes: > From: "Junio C Hamano" >> >> 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 think. >> If you are not

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

2015-06-25 Thread Junio C Hamano
"Philip Oakley" 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 to

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

2015-06-25 Thread Junio C Hamano
Wolfgang Denk writes: > Dear Junio, > > thanks for the fast replies. > > In message 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 84ef

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 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 now why I did thi

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

[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 --- contrib/completion/git-completion.bash | 2 +- git-bisect.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff

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

[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 --- builtin/checkout.c | 4 +--- refs.c | 11 +++ refs.h

[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 --- branch.c | 4 ++-- builtin/commit.c | 6 +++--- builtin/merge.c | 2 +- co

[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 --- 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 8e9e2cd..27155bc 100755 --- a/g

[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 --- builtin/reflog.c | 79 +++- 1 file changed, 78 insertions(+),

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

2015-06-25 Thread Junio C Hamano
Wolfgang Denk 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), done.

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

2015-06-25 Thread Junio C Hamano
David Turner 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 Turner > --- > con

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

2015-06-25 Thread Junio C Hamano
David Turner 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 > --- > builtin/checkout.c | 4 +--- > refs.c

  1   2   >