Re: [PATCH 00/21] replacement for dt/refs-backend-lmdb v7 patch 04/33

2016-03-30 Thread David Turner
On Wed, 2016-03-30 at 08:37 +0200, Michael Haggerty wrote: > On 03/29/2016 10:12 PM, David Turner wrote: > > On Sun, 2016-03-27 at 07:22 +0200, Michael Haggerty wrote: > > > On 03/24/2016 07:47 AM, David Turner wrote: > > > > [...] > > > > I incorporated your changes into the lmdb backend. To

Re: [PATCHv2 1/4] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Junio C Hamano
Jeff King writes: > On Wed, Mar 30, 2016 at 02:07:14PM -0700, Junio C Hamano wrote: > >> This is a tangent, but am I the only one who finds that the naming >> of functions in config-get API is confusing? Just wondering if we >> should rename the ones that keeps the memory

[PATCH v3 1/4] patch-ids: make commit_patch_id() a public helper function

2016-03-30 Thread Xiaolong Ye
Make commit_patch_id() available to other builtins. Helped-by: Junio C Hamano Signed-off-by: Xiaolong Ye --- patch-ids.c | 2 +- patch-ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patch-ids.c b/patch-ids.c index

[PATCH v3 4/4] format-patch: introduce format.base configuration

2016-03-30 Thread Xiaolong Ye
We can set format.base=auto to record the base commit info automatically, it is equivalent to set --base=auto in cmdline. The format.base has lower priority than command line option, so if user set format.base=auto and pass the command line option in the meantime, base_commit will be the one

[PATCH v3 3/4] format-patch: introduce --base=auto option

2016-03-30 Thread Xiaolong Ye
Introduce --base=auto to record the base commit info automatically, the base_commit will be the merge base of tip commit of the upstream branch and revision-range specified in cmdline. Helped-by: Junio C Hamano Helped-by: Wu Fengguang Signed-off-by:

[PATCH v3 0/4] Add an option to git-format-patch to record base tree info

2016-03-30 Thread Xiaolong Ye
V3 mainly improves the implementation according to Junio's comments, Changes vs v2 include: - Remove the unnecessary output line "** base-commit-info **". - Improve the traverse logic to handle not only linear topology, but more general cases, it will start revision walk by setting the

[PATCH v3 2/4] format-patch: add '--base' option to record base tree info

2016-03-30 Thread Xiaolong Ye
Maintainers or third party testers may want to know the exact base tree the patch series applies to. Teach git format-patch a '--base' option to record the base tree info and append this information at the end of the _first_ message (either the cover letter or the first patch in the series).

Re: [PATCHv2 1/4] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Jeff King
On Wed, Mar 30, 2016 at 02:07:14PM -0700, Junio C Hamano wrote: > This is a tangent, but am I the only one who finds that the naming > of functions in config-get API is confusing? Just wondering if we > should rename the ones that keeps the memory ownership to the config > subsystem with

Re: [PATCH 2/4] submodule--helper clone: simplify path check

2016-03-30 Thread Jacob Keller
On Wed, Mar 30, 2016 at 5:17 PM, Stefan Beller wrote: > The calling shell code makes sure that `path` is non null and non empty. > (side note: it cannot be null as just three lines before it is passed > to safe_create_leading_directories_const which would crash as you feed >

[PATCH 4/4] submodule--helper: use relative path if possible

2016-03-30 Thread Stefan Beller
As submodules have working directory and their git directory far apart relative_path(gitdir, work_dir) will not produce a relative path when git_dir is absolute. When the gitdir is absolute, we need to convert the workdir to an absolute path as well to compute the relative path. (e.g.

[PATCH 3/4] submodule--helper clone: remove double path checking

2016-03-30 Thread Stefan Beller
Just a few lines after the deleted code we call safe_create_leading_directories_const(path + "/.git") so the check is done twice without action in between. Remove the first check. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 4 1 file changed, 4

[PATCH 2/4] submodule--helper clone: simplify path check

2016-03-30 Thread Stefan Beller
The calling shell code makes sure that `path` is non null and non empty. (side note: it cannot be null as just three lines before it is passed to safe_create_leading_directories_const which would crash as you feed it null). Signed-off-by: Stefan Beller ---

[PATCH 1/4] recursive submodules: test for relative paths

2016-03-30 Thread Stefan Beller
This was reported as a regression at $gmane/290280. The root cause for that bug is in using recursive submodules as their relative path handling seems to be broken in ee8838d (2015-09-08, submodule: rewrite `module_clone` shell function in C). Signed-off-by: Stefan Beller ---

[PATCH 0/4] Fix relative path issues in recursive submodules.

2016-03-30 Thread Stefan Beller
It took me longer than expected to fix this bug. It comes with a test and minor refactoring and applies on top of origin/sb/submodule-helper, such that it can be merged into 2.7, 2.8 as well as master. Patch 1 is a test which fails; it has a similar layout as the real failing repository Norio

Problem with Integrated Vim Editor on Win 10

2016-03-30 Thread Zachary Turner
Hi, just recently I installed the latest build of Windows 10 of my machine. This is my second Win10 machine. On the other I am using git 2.7.0.windows.1 and everything is working just fine. On the second machine I am using git 2.8.0.windows.1 and vim does not work. I sent a bug report to

Re: [PATCH 2/2] ident: make the useConfigOnly error messages more informative

2016-03-30 Thread Marios Titas
On Wed, Mar 30, 2016 at 03:27:05PM -0700, Junio C Hamano wrote: Marios Titas writes: - && !(ident_config_given & IDENT_NAME_GIVEN)) - die("user.useConfigOnly set but no name given"); + &&

Re: [PATCH 2/2] ident: make the useConfigOnly error messages more informative

2016-03-30 Thread Junio C Hamano
Marios Titas writes: > - && !(ident_config_given & IDENT_NAME_GIVEN)) > - die("user.useConfigOnly set but no name given"); > + && !(ident_config_given & IDENT_NAME_GIVEN)) { > +

Re: [PATCH v3 00/16] port branch.c to use ref-filter's printing options

2016-03-30 Thread Junio C Hamano
Karthik Nayak writes: > I kinda waited before sending this, since there was lot of discussions > happening regarding to GSOC16, didn't want to clutter the mailing list. > > This is part of unification of the commands 'git tag -l, git branch -l > and git for-each-ref'. This

Re: [PATCH v3 09/16] ref-filter: make "%(symref)" atom work with the ':short' modifier

2016-03-30 Thread Junio C Hamano
Karthik Nayak writes: > The "%(symref)" atom doesn't work when used with the ':short' modifier > because we strictly match only 'symref' for setting the 'need_symref' > indicator. Fix this by using comparing with valid_atom rather than used_atom. > > Add tests for

Re: [PATCH v3 05/16] ref-filter: move get_head_description() from branch.c

2016-03-30 Thread Junio C Hamano
Karthik Nayak writes: > -static char *get_head_description(void) > -{ > - struct strbuf desc = STRBUF_INIT; > - struct wt_status_state state; > - memset(, 0, sizeof(state)); > - wt_status_get_state(, 1); > - if (state.rebase_in_progress || > -

Re: [PATCH v3 02/16] ref-filter: include reference to 'used_atom' within 'atom_value'

2016-03-30 Thread Junio C Hamano
Karthik Nayak writes: > Ensure that each 'atom_value' has a reference to its corresponding > 'used_atom'. This let's us use values within 'used_atom' in the > 'handler' function. > > Hence we can get the %(align) atom's parameters directly from the > 'used_atom' therefore

Re: [PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-03-30 Thread Junio C Hamano
Karthik Nayak writes: > +static struct ref_msg { > + const char *gone; > + const char *ahead; > + const char *behind; > + const char *ahead_behind; > +} msgs = { > + "gone", > + "ahead %d", > + "behind %d", > + "ahead %d, behind %d" > +}; >

Re: [PATCHv2 1/4] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Stefan Beller
On Wed, Mar 30, 2016 at 2:07 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >>> diff --git a/builtin/notes.c b/builtin/notes.c >>> @@ -744,13 +744,14 @@ static int merge_commit(struct notes_merge_options *o) >>> static int

Re: [PATCHv2 1/4] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Junio C Hamano
Eric Sunshine writes: >> diff --git a/builtin/notes.c b/builtin/notes.c >> @@ -744,13 +744,14 @@ static int merge_commit(struct notes_merge_options *o) >> static int git_config_get_notes_strategy(const char *key, >> enum

Re: [PATCH] for-each-ref: fix description of '--contains' in manpage

2016-03-30 Thread Junio C Hamano
SZEDER Gábor writes: > 'git for-each-ref's manpage says that '--contains' only lists tags, > but it lists all kinds of refs. > > Signed-off-by: SZEDER Gábor > --- Thanks; will apply on top of 4a71109a (for-each-ref: add '--contains' option, 2015-07-07) so

Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules

2016-03-30 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Mar 30, 2016 at 9:05 AM, Stefan Beller wrote: >> On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura wrote: >>> Hi, >>> >>> `git submodule update --init --recursive` stores `gitdir` in full path into >>>

Re: [PATCH] diffcore: fix iteration order of identical files during rename detection

2016-03-30 Thread Junio C Hamano
SZEDER Gábor writes: > Fill the hashmap with source entries in reverse order to restore the > original exact rename detection behavior. Thanks for digging out and fixing this unintended regression that happened long time ago. Will queue. > > Reported-by: Bill Okara

Re: [PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-03-30 Thread Eric Sunshine
On Wed, Mar 30, 2016 at 3:00 PM, Mehul Jain wrote: > On Wed, Mar 30, 2016 at 2:46 AM, Eric Sunshine > wrote: >> With the exception of the missing --rebase argument, this is exactly >> the same code as in test_rebase_autostash(), right? Rather

Re: [PATCHv4 1/6] submodule foreach: correct path display in recursive submodules

2016-03-30 Thread Junio C Hamano
Stefan Beller writes: > The `prefix` was put in front of the display path unconditionally. > This is wrong as any relative path computation would need to be at > the front, so include the prefix into the display path. > > The new test replicates the previous test with the

Re: weird diff output?

2016-03-30 Thread Stefan Beller
On Wed, Mar 30, 2016 at 12:31 PM, Jacob Keller wrote: > > If unsure, say Y. > + > +config RMI4_I2C > + tristate "RMI4 I2C Support" > + depends on RMI4_CORE && I2C > + help > + Say Y here if you want to support RMI4 devices connected to

Re: weird diff output?

2016-03-30 Thread Jacob Keller
On Wed, Mar 30, 2016 at 12:14 PM, Jacob Keller wrote: > I ran this on a few of my local projects and it doesn't seem to > produce any false positives so far. Everything looks good. Of course > this is with just traditional C code. I am currently trying to run > this

[PATCH 2/2] ident: make the useConfigOnly error messages more informative

2016-03-30 Thread Marios Titas
The env_hint message applies perfectly to the case when user.useConfigOnly is set and at least one of the user.name and the user.email are not provided. Additionally, use a more descriptive error message when that happens. Signed-off-by: Marios Titas --- ident.c | 12

[PATCH 1/2] ident: check for useConfigOnly before auto-detection of name/email

2016-03-30 Thread Marios Titas
If user.useConfigOnly is set, it does not make sense to try to auto-detect the name and/or the email. So it's better to do the useConfigOnly checks first. Signed-off-by: Marios Titas --- ident.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [PATCH v4 2/3] pretty: enable --expand-tabs by default for selected pretty formats

2016-03-30 Thread Junio C Hamano
Jeff King writes: > On Tue, Mar 29, 2016 at 04:15:08PM -0700, Junio C Hamano wrote: > >> diff --git a/Documentation/pretty-options.txt >> b/Documentation/pretty-options.txt >> index 4fb5c76..23967b6 100644 >> --- a/Documentation/pretty-options.txt >> +++

Re: weird diff output?

2016-03-30 Thread Jacob Keller
On Tue, Mar 29, 2016 at 11:05 PM, Jacob Keller wrote: > On Tue, Mar 29, 2016 at 9:55 PM, Jeff King wrote: >> One thing I like to do when playing with new diff ideas is to pipe all >> of "log -p" for a real project through it and see what differences it >>

Re: [PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-03-30 Thread Mehul Jain
Hi Eric, Thanks for the reviews on this series. On Wed, Mar 30, 2016 at 2:46 AM, Eric Sunshine wrote: > With the exception of the missing --rebase argument, this is exactly > the same code as in test_rebase_autostash(), right? Rather than > repeating this code yet

Re: [PATCH v4 1/3] pretty: expand tabs in indented logs to make things line up properly

2016-03-30 Thread Junio C Hamano
Eric Sunshine writes: > On Tue, Mar 29, 2016 at 7:15 PM, Junio C Hamano wrote: >> From: Linus Torvalds >> >> A commit log message sometimes tries to line things up using tabs, >> assuming fixed-width font with the

Re: [PATCH 2/2 V3] MSVC: Use shipped headers instead of fallback definitions

2016-03-30 Thread Junio C Hamano
Sven Strickroth writes: > diff --git a/compat/mingw.h b/compat/mingw.h > index 6b6d695..137f42e 100644 > --- a/compat/mingw.h > +++ b/compat/mingw.h > @@ -415,7 +415,7 @@ int mingw_offset_1st_component(const char *path); > extern void build_libgit_environment(void); > extern

Re: [PATCH v5] worktree: add: introduce --checkout option

2016-03-30 Thread Eric Sunshine
[please don't top-post] On Tue, Mar 29, 2016 at 11:11 PM, Zhang Lei wrote: > Thanks for the review. > Sorry for the patch churn, I wasn't quite familiar with working with > mailing list. No need to apologize. Reviewers understand what it is like being a newcomer and

Re: [PATCH v1 6/7] correct blame for files commited with CRLF

2016-03-30 Thread Torsten Bögershausen
7/7 needs to be amended with something like this, and the documentation needs an update. In any case, the user can normalize the repo like this: $ echo "* text=auto" >>.gitattributes $ rm .git/index # Remove the index to force Git to $ git reset # re-scan the working directory $ git

Re: [PATCHv2 3/4] bundle: don't leak an fd in case of early return

2016-03-30 Thread Eric Sunshine
On Wed, Mar 30, 2016 at 1:05 PM, Stefan Beller wrote: > In successful operation `write_pack_data` will close the `bundle_fd`, > but when we exit early, we need to take care of the file descriptor > as well as the lock file ourselves. The lock file may be deleted at the > end

Re: [PATCHv2 0/4] Some cleanups

2016-03-30 Thread Jeff King
On Wed, Mar 30, 2016 at 10:32:40AM -0700, Stefan Beller wrote: > > I'm OK with all of these as-is, though I did mention a nit in the third > > one. I also like Junio's rewrite instead of using strbuf_list_free. > > I'm fine using the rewritten version instead of using strbuf_list_free. :) > On

Re: [PATCHv2 2/4] abbrev_sha1_in_line: don't leak memory

2016-03-30 Thread Eric Sunshine
On Wed, Mar 30, 2016 at 1:05 PM, Stefan Beller wrote: > `split` is of type `struct strbuf **`, which we have a dedicated free > function for, which takes care of freeing all related memory. I think it's important to explain that 'split' and each split[] element were being

Re: [PATCHv2 1/4] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Eric Sunshine
On Wed, Mar 30, 2016 at 1:05 PM, Stefan Beller wrote: > `value` is just a temporary scratchpad, so we need to make sure it doesn't > leak. It is xstrdup'd in `git_config_get_string` and > `parse_notes_merge_strategy` just compares the string against predefined > values, so no

Re: [PATCHv2 0/4] Some cleanups

2016-03-30 Thread Stefan Beller
On Wed, Mar 30, 2016 at 10:25 AM, Jeff King wrote: > On Wed, Mar 30, 2016 at 10:05:14AM -0700, Stefan Beller wrote: > >> v2: >> Thanks Eric, Jeff, Junio for discussion, I picked up all hints and here >> is a v2. >> >> * drop the overallocation patches (1&2) >> * use

Re: [PATCHv2 0/4] Some cleanups

2016-03-30 Thread Jeff King
On Wed, Mar 30, 2016 at 10:05:14AM -0700, Stefan Beller wrote: > v2: > Thanks Eric, Jeff, Junio for discussion, I picked up all hints and here > is a v2. > > * drop the overallocation patches (1&2) > * use git_config_get_string instead of its _const equivalent, such that > we don't need a cast

Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules

2016-03-30 Thread Stefan Beller
On Wed, Mar 30, 2016 at 9:05 AM, Stefan Beller wrote: > On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura wrote: >> Hi, >> >> `git submodule update --init --recursive` stores `gitdir` in full path into >> `.git` of nested submodules. >> So, working

Re: [PATCHv2 3/4] bundle: don't leak an fd in case of early return

2016-03-30 Thread Jeff King
On Wed, Mar 30, 2016 at 10:05:17AM -0700, Stefan Beller wrote: > diff --git a/bundle.c b/bundle.c > index 506ac49..fbc8593 100644 > --- a/bundle.c > +++ b/bundle.c > @@ -407,6 +407,7 @@ int create_bundle(struct bundle_header *header, const > char *path, > int bundle_to_stdout; > int

Re: [PATCH 4/6] abbrev_sha1_in_line: don't leak memory

2016-03-30 Thread Jeff King
On Wed, Mar 30, 2016 at 10:06:41AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Tue, Mar 29, 2016 at 09:30:38PM -0400, Eric Sunshine wrote: > > > >> The implementation of strbuf_list_free() is this: > >> > >> struct strbuf **s = sbs; > >> while (*s) { > >>

Re: [PATCH 5/6] bundle: don't leak an fd in case of early return

2016-03-30 Thread Junio C Hamano
Jeff King writes: >> +if (compute_and_write_prerequisites(bundle_fd, , argc, argv)) { >> +if (!bundle_to_stdout) >> +close(bundle_fd); >> return -1; >> +} > > Makes sense. Should we also be rolling back the lock file? It happens

Re: [PATCH 3/6] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Junio C Hamano
Jeff King writes: > I don't think this is wrong, but would it perhaps be simpler to call > git_config_get_value() in the first place, which does not make a copy of > the string? Yup, I agree. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

Re: [PATCH 1/6] path.c: allocate enough memory for string

2016-03-30 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Mar 29, 2016 at 5:57 PM, Eric Sunshine > wrote: >> On Tue, Mar 29, 2016 at 8:38 PM, Stefan Beller wrote: >>> `strlen` returns the length of a string without the terminating null byte. >>> To make

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-30 Thread Junio C Hamano
Duy Nguyen writes: > But your suggestion is good and I can't think of any better. We could > introduce pathspec as ftiler after "--", but it does not look elegant, > and it overlaps with --include/--exclude. I was imagining that we would allow the magic pathspec syntax used

[PATCHv2 1/4] notes: don't leak memory in git_config_get_notes_strategy

2016-03-30 Thread Stefan Beller
`value` is just a temporary scratchpad, so we need to make sure it doesn't leak. It is xstrdup'd in `git_config_get_string` and `parse_notes_merge_strategy` just compares the string against predefined values, so no need to keep it around longer. Make `value` non-const to avoid the cast in the

[PATCHv2 2/4] abbrev_sha1_in_line: don't leak memory

2016-03-30 Thread Stefan Beller
`split` is of type `struct strbuf **`, which we have a dedicated free function for, which takes care of freeing all related memory. Helped-by: Eric Sunshine Signed-off-by: Stefan Beller --- wt-status.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCHv2 3/4] bundle: don't leak an fd in case of early return

2016-03-30 Thread Stefan Beller
In successful operation `write_pack_data` will close the `bundle_fd`, but when we exit early, we need to take care of the file descriptor as well as the lock file ourselves. The lock file may be deleted at the end of running the program, but we are in library code, so we should not rely on that.

[PATCHv2 4/4] credential-cache, send_request: close fd when done

2016-03-30 Thread Stefan Beller
No need to keep it open any further. Signed-off-by: Stefan Beller --- credential-cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/credential-cache.c b/credential-cache.c index f4afdc6..86e21de 100644 --- a/credential-cache.c +++ b/credential-cache.c @@ -32,6 +32,7

[PATCHv2 0/4] Some cleanups

2016-03-30 Thread Stefan Beller
v2: Thanks Eric, Jeff, Junio for discussion, I picked up all hints and here is a v2. * drop the overallocation patches (1&2) * use git_config_get_string instead of its _const equivalent, such that we don't need a cast when freeing in git_config_get_notes_strategy * Use strbuf_list_free instead

Re: [PATCH 4/6] abbrev_sha1_in_line: don't leak memory

2016-03-30 Thread Junio C Hamano
Jeff King writes: > On Tue, Mar 29, 2016 at 09:30:38PM -0400, Eric Sunshine wrote: > >> The implementation of strbuf_list_free() is this: >> >> struct strbuf **s = sbs; >> while (*s) { >> strbuf_release(*s); >> free(*s++); >> } >> free(sbs); >> >>

Re: git show -m with a parent number

2016-03-30 Thread Andreas Schwab
Anatoly Borodin writes: > It's not like `git diff X^2 X` is a big problem, but too much of a > copypaste. Brace expansion helps a bit: git diff X{^2,} Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B

Re: [PATCH 1/6] path.c: allocate enough memory for string

2016-03-30 Thread Stefan Beller
On Tue, Mar 29, 2016 at 5:57 PM, Eric Sunshine wrote: > On Tue, Mar 29, 2016 at 8:38 PM, Stefan Beller wrote: >> `strlen` returns the length of a string without the terminating null byte. >> To make sure enough memory is allocated we need to pass

Re: [BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules

2016-03-30 Thread Stefan Beller
On Wed, Mar 30, 2016 at 2:03 AM, Norio Nomura wrote: > Hi, > > `git submodule update --init --recursive` stores `gitdir` in full path into > `.git` of nested submodules. > So, working directory is not portable to another directory. Are you reporting a regression bug? (Is

[RFC/GSOC] Git Beginner | Warnings for potentially destructive commands (v2)

2016-03-30 Thread Sidhant Sharma
Updated the warning messages, and added warnings for two more commands (`checkout --` and `stash clear`). The list is now: $ git rebase $ git reset --hard $ git clean -f $ git gc --prune=now --aggressive $ git push -f $ git push remote [+/:] $ git branch -D $ git checkout [-p] [] -- $ git stash

Re: [PATCH v3] t7012: Implement test for git-checkout

2016-03-30 Thread Eric Sunshine
On Wed, Mar 30, 2016 at 9:29 AM, Chhatoi Pritam Baral wrote: > Forgot to mention in the previous message, this is a microproject > for my GSoC '16 application. > > (Is that redundant to mention after v1 and v2? ) Readers of v1 knew this since you mentioned with that

[PATCH v2] clone: respect configured fetch respecs during initial fetch

2016-03-30 Thread SZEDER Gábor
Conceptually 'git clone' should behave as if the following commands were run: git init git config ... # set default configuration and origin remote git fetch git checkout # unless '--bare' is given However, that initial 'git fetch' behaves differently from any subsequent fetches,

[PATCH] for-each-ref: fix description of '--contains' in manpage

2016-03-30 Thread SZEDER Gábor
'git for-each-ref's manpage says that '--contains' only lists tags, but it lists all kinds of refs. Signed-off-by: SZEDER Gábor --- Documentation/git-for-each-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-for-each-ref.txt

Re: [PATCH v3] t7012: Implement test for git-checkout

2016-03-30 Thread Chhatoi Pritam Baral
Forgot to mention in the previous message, this is a microproject for my GSoC '16 application. (Is that redundant to mention after v1 and v2? ) On 03/26/2016 10:07 PM, Chhatoi Pritam Baral wrote: > Previously a TODO; add a test for git-checkout skipping a > file with the skip-worktree bit set. >

Re: git show -m with a parent number

2016-03-30 Thread Anatoly Borodin
Hi! Jeff King wrote: > For the first one, showing all diffs is what I want. For the second, it > only makes sense to for the first parent case, as following other > parents would zig-zag through history. Lucky you! :) You probably don't need to inspect 9 month old ex-svn branches

Re: [GSoC] A late proposal: a modern send-email

2016-03-30 Thread Johannes Schindelin
Hi, On Wed, 30 Mar 2016, Ævar Arnfjörð Bjarmason wrote: > Correct me if I'm wrong but don't we basically have 4 kinds of users > using git-send-email: > > 1) Those who get it from a binary Windows package (is it even packaged there?) It is. And reportedly working fine. But in the pre-MSYS2

Re: [PATCH 2/2 V3] MSVC: Use shipped headers instead of fallback definitions

2016-03-30 Thread Johannes Schindelin
Hi Sven, On Wed, 30 Mar 2016, Sven Strickroth wrote: > VS2010 comes with stdint.h [1] > VS2013 comes with inttypes.h [2] > > [1] https://stackoverflow.com/a/2628014/3906760 > [2] > https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/ > > Signed-off-by:

Re: [PATCH 2/2 V3] MSVC: Use shipped headers instead of fallback definitions

2016-03-30 Thread Sebastian Schuberth
On 3/30/2016 13:37, Sven Strickroth wrote: VS2010 comes with stdint.h [1] VS2013 comes with inttypes.h [2] [1] https://stackoverflow.com/a/2628014/3906760 [2] https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/ Signed-off-by: Sven Strickroth

Re: [PATCH 2/2 V3] MSVC: Use shipped headers instead of fallback definitions

2016-03-30 Thread Sven Strickroth
VS2010 comes with stdint.h [1] VS2013 comes with inttypes.h [2] [1] https://stackoverflow.com/a/2628014/3906760 [2] https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/ Signed-off-by: Sven Strickroth --- compat/mingw.h

[PATCH v3 06/16] ref-filter: introduce format_ref_array_item()

2016-03-30 Thread Karthik Nayak
To allow column display, we will need to first render the output in a string list to allow print_columns() to compute the proper size of each column before starting the actual output. Introduce the function format_ref_array_item() that does the formatting of a ref_array_item to an strbuf.

[PATCH v3 13/16] ref-filter: allow porcelain to translate messages in the output

2016-03-30 Thread Karthik Nayak
Introduce setup_ref_filter_porcelain_msg() so that the messages used in the atom %(upstream:track) can be translated if needed. This is needed as we port branch.c to use ref-filter's printing API's. Written-by: Matthieu Moy Mentored-by: Christian Couder

[PATCH v3 09/16] ref-filter: make "%(symref)" atom work with the ':short' modifier

2016-03-30 Thread Karthik Nayak
The "%(symref)" atom doesn't work when used with the ':short' modifier because we strictly match only 'symref' for setting the 'need_symref' indicator. Fix this by using comparing with valid_atom rather than used_atom. Add tests for %(symref) and %(symref:short) while we're here. Helped-by:

[PATCH v3 11/16] ref-filter: introduce refname_atom_parser()

2016-03-30 Thread Karthik Nayak
Introduce refname_atom_parser() which will parse the '%(refname)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Signed-off-by: Karthik Nayak --- ref-filter.c | 70

[PATCH v3 14/16] branch, tag: use porcelain output

2016-03-30 Thread Karthik Nayak
Call ref-filter's setup_ref_filter_porcelain_msg() to enable translated messages for the %(upstream:tack) atom. Although branch.c doesn't currently use ref-filter's printing API's, this will ensure that when it does in the future patches, we do not need to worry about translation. Written-by:

[PATCH v3 16/16] branch: implement '--format' option

2016-03-30 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list branches 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

[PATCH v3 15/16] branch: use ref-filter printing APIs

2016-03-30 Thread Karthik Nayak
Port branch.c to use ref-filter APIs for printing. This clears out most of the code used in branch.c for printing and replaces them with calls made to the ref-filter library. Introduce build_format() which gets the format required for printing of refs. Make amendments to print_ref_list() to

[PATCH v3 00/16] port branch.c to use ref-filter's printing options

2016-03-30 Thread Karthik Nayak
I kinda waited before sending this, since there was lot of discussions happening regarding to GSOC16, didn't want to clutter the mailing list. This is part of unification of the commands 'git tag -l, git branch -l and git for-each-ref'. This ports over branch.c to use ref-filter's printing

[PATCH v3 12/16] ref-filter: add support for %(refname:dir) and %(refname:base)

2016-03-30 Thread Karthik Nayak
Add the options `:dir` and `:base` to the %(refname) atom. The `:dir` option gives the directory (the part after $GIT_DIR/) of the ref without the refname. The `:base` option gives the base directory of the given ref (i.e. the directory following $GIT_DIR/refs/). Add tests and documentation for

[PATCH v3 07/16] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams

2016-03-30 Thread Karthik Nayak
Borrowing from branch.c's implementation print "[gone]" whenever an unknown upstream ref is encountered instead of just ignoring it. This makes sure that when branch.c is ported over to using ref-filter APIs for printing, this feature is not lost. Make changes to t/t6300-for-each-ref.sh and

[PATCH v3 05/16] ref-filter: move get_head_description() from branch.c

2016-03-30 Thread Karthik Nayak
Move the implementation of get_head_description() from branch.c to ref-filter. This gives a description of the HEAD ref if called. This is used as the refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option is used. Make it public because we need it to calculate the length of the

[PATCH v3 03/16] ref-filter: implement %(if:equals=) and %(if:notequals=)

2016-03-30 Thread Karthik Nayak
Implement %(if:equals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom is the same as the given ''. Similarly, implement (if:notequals=) wherein the if condition is only satisfied if the value obtained between the %(if:...) and %(then) atom

[PATCH v3 10/16] ref-filter: introduce symref_atom_parser()

2016-03-30 Thread Karthik Nayak
Introduce symref_atom_parser() which will parse the '%(symref)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Signed-off-by: Karthik Nayak --- ref-filter.c | 25 +++-- 1 file changed, 23

[PATCH v3 08/16] ref-filter: add support for %(upstream:track,nobracket)

2016-03-30 Thread Karthik Nayak
Add support for %(upstream:track,nobracket) which will print the tracking information without the brackets (i.e. "ahead N, behind M"). This is needed when we port branch.c to use ref-filter's printing APIs. Add test and documentation for the same. Mentored-by: Christian Couder

[PATCH v3 04/16] ref-filter: modify "%(objectname:short)" to take length

2016-03-30 Thread Karthik Nayak
Add support for %(objectname:short=) which would print the abbreviated unique objectname of given length. When no length is specified, the length is 'DEFAULT_ABBREV'. The minimum length is 'MINIMUM_ABBREV'. The length may be exceeded to ensure that the provided object name is unique. Add tests

[PATCH v3 01/16] ref-filter: implement %(if), %(then), and %(else) atoms

2016-03-30 Thread Karthik Nayak
Implement %(if), %(then) and %(else) atoms. Used as %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the format string between %(if) and %(then) expands to an empty string, or to only whitespaces, then the whole %(if)...%(end) expands to the string following %(then). Otherwise,

[PATCH v3 02/16] ref-filter: include reference to 'used_atom' within 'atom_value'

2016-03-30 Thread Karthik Nayak
Ensure that each 'atom_value' has a reference to its corresponding 'used_atom'. This let's us use values within 'used_atom' in the 'handler' function. Hence we can get the %(align) atom's parameters directly from the 'used_atom' therefore removing the necessity of passing %(align) atom's

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-30 Thread Duy Nguyen
On Thu, Mar 24, 2016 at 11:50 PM, Junio C Hamano wrote: > So a better alternative may be to conditionally disable the "Paths > outside are not touched regardless of --include" logic, i.e. we > exclude paths outside by default just as before, but if there is at > least one

AW: [PATCH] Fix http-backend reading till EOF, ignoring CONTENT_LENGTH, violating rfc3875 -- WAS: Problem with git-http-backend.exe as iis cgi

2016-03-30 Thread Florian Manschwetus
> -Ursprüngliche Nachricht- > Von: Jeff King [mailto:p...@peff.net] > Gesendet: Dienstag, 29. März 2016 22:14 > An: Florian Manschwetus > Cc: Chris Packham; Konstantin Khomoutov; git@vger.kernel.org > Betreff: Re: [PATCH] Fix http-backend reading till EOF, ignoring > CONTENT_LENGTH,

[BUG] `git submodule update --init --recursive` stores gitdir in full path into `.git` of nested submodules

2016-03-30 Thread Norio Nomura
Hi, `git submodule update --init --recursive` stores `gitdir` in full path into `.git` of nested submodules. So, working directory is not portable to another directory. On following example, `Carthage/Checkouts/Quick/Externals/Nimble/` is nested submodule and

Re: [PATCH 2/2 V2] MSVC: VS2013 comes with inttypes.h

2016-03-30 Thread Sebastian Schuberth
On 3/29/2016 19:23, Sven Strickroth wrote: > --- a/compat/mingw.h > +++ b/compat/mingw.h > @@ -415,7 +415,7 @@ int mingw_offset_1st_component(const char *path); > extern void build_libgit_environment(void); > extern const char *program_data_config(void); > #define git_program_data_config

[PATCH] diffcore: fix iteration order of identical files during rename detection

2016-03-30 Thread SZEDER Gábor
If the two paths 'dir/A/file' and 'dir/B/file' have identical content and the parent directory is renamed, e.g. 'git mv dir other-dir', then diffcore reports the following exact renames: renamed:dir/B/file -> other-dir/A/file renamed:dir/A/file -> other-dir/B/file While

Re: [Outreachy] Git remote whitelist/blacklist

2016-03-30 Thread Lars Schneider
Hi Elena, I thought a bit more about your proposal. The Outreachy internship is scheduled for 3 months and I think you would be able to come up with a "Git remote whitelist/blacklist" implementation that the Git list considers to accept within a month. In that case it would be good if you

Re: [PATCH 1/2] MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

2016-03-30 Thread Sebastian Schuberth
On Wed, Mar 30, 2016 at 9:49 AM, Johannes Schindelin wrote: >> > #ifndef SNPRINTF_SIZE_CORR >> > -#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4) >> > +#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4) && >> > (!defined(_MSC_VER) || _MSC_VER <

Re: [PATCH 1/2] MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

2016-03-30 Thread Johannes Schindelin
Hi Sven & Sebastian, On Tue, 29 Mar 2016, Sebastian Schuberth wrote: > On Tue, Mar 29, 2016 at 9:13 PM, Sven Strickroth wrote: ACK on the patch. > > diff --git a/compat/snprintf.c b/compat/snprintf.c > > index 42ea1ac..0b11688 100644 > > --- a/compat/snprintf.c > > +++

Re: [PATCH 00/21] replacement for dt/refs-backend-lmdb v7 patch 04/33

2016-03-30 Thread Michael Haggerty
On 03/29/2016 10:12 PM, David Turner wrote: > On Sun, 2016-03-27 at 07:22 +0200, Michael Haggerty wrote: >> On 03/24/2016 07:47 AM, David Turner wrote: >>> [...] >>> I incorporated your changes into the lmdb backend. To make merging >>> later more convenient, I rebased on top of pu -- I think

Re: weird diff output?

2016-03-30 Thread Jacob Keller
On Tue, Mar 29, 2016 at 9:55 PM, Jeff King wrote: > One thing I like to do when playing with new diff ideas is to pipe all > of "log -p" for a real project through it and see what differences it > produces. > Great idea! > Below is a perl script that implements Stefan's

Re: weird diff output?

2016-03-30 Thread Stefan Beller
On Tue, Mar 29, 2016 at 9:55 PM, Jeff King wrote: > On Tue, Mar 29, 2016 at 04:05:57PM -0700, Jacob Keller wrote: > >> > This is what we want in both cases. >> > And I would argue it would appease many other kinds of text as well, >> > because >> > an empty line is usually a

  1   2   >