Re: [PATCH 1/3] t5004: test ZIP archives with many entries

2015-08-22 Thread Eric Sunshine
On Sat, Aug 22, 2015 at 3:06 PM, René Scharfe wrote: > A ZIP file directory has a 16-bit field for the number of entries it > contains. There are 64-bit extensions to deal with that. Demonstrate > that git archive --format=zip currently doesn't use them and instead > overflows the field. > > Inf

[PATCH] am: terminate state files with a newline

2015-08-22 Thread Paul Tan
On Thu, Aug 20, 2015 at 11:40:20AM -0700, Junio C Hamano wrote: > SZEDER Gábor writes: > > > The format of the files '.git/rebase-apply/{next,last}' changed slightly > > with the recent builtin 'git am' conversion: while these files were > > newline-terminated when written by the scripted version

Re: [PATCH v4] git-p4: fix faulty paths for case insensitive systems

2015-08-22 Thread Luke Diamand
Lars - thanks for persisting with this! I'm still trying to fully understand what's going on here - can you point out where I've got it wrong below please! The server is on Linux, and is case-sensitive. For whatever reason (probably people committing changes on Windows in the first place) we've e

[PATCH v5 1/2] worktree: add 'for_each_worktree' function

2015-08-22 Thread Michael Rappazzo
for_each_worktree iterates through each worktree and invokes a callback function. The main worktree (if not bare) is always encountered first, followed by worktrees created by `git worktree add`. If the callback function returns a non-zero value, iteration stops, and the callback's return value i

[PATCH v5 0/2] Worktree: for-each function and list command

2015-08-22 Thread Michael Rappazzo
Changes since v4: - reduced memory usage by reusing string buffer variables - re-scoped variables in the for-each function - added tests for 'worktree list' with bare repos Notes from previous discussion: - The following snippet: > + /* If the common_dir DOES NOT end with '/.git', then it

[PATCH v5 2/2] worktree: add 'list' command

2015-08-22 Thread Michael Rappazzo
'git worktree list' uses the for_each_worktree function to iterate, and outputs in the format: ' ()' Signed-off-by: Michael Rappazzo --- Documentation/git-worktree.txt | 11 +- builtin/worktree.c | 55 t/t2027-worktree-list.sh | 81

[PATCH 1/3] t5004: test ZIP archives with many entries

2015-08-22 Thread René Scharfe
A ZIP file directory has a 16-bit field for the number of entries it contains. There are 64-bit extensions to deal with that. Demonstrate that git archive --format=zip currently doesn't use them and instead overflows the field. InfoZIP's unzip doesn't care about this field and extracts all files

[PATCH 3/3] archive-zip: support more than 65535 entries

2015-08-22 Thread René Scharfe
Support more than 65535 entries cleanly by writing a "zip64 end of central directory record" (with a 64-bit field for the number of entries) before the usual "end of central directory record" (which contains only a 16-bit field). InfoZIP's zip does the same. Archives with 65535 or less entries are

[PATCH 2/3] archive-zip: use a local variable to store the creator version

2015-08-22 Thread René Scharfe
Use a simpler conditional right next to the code which makes a higher creator version necessary -- namely symlink handling and support for executable files -- instead of a long line with a ternary operator. The resulting code has more lines but is simpler and allows reuse of the value easily. Sign

Re: [PATCH v3 7/8] branch.c: use 'ref-filter' APIs

2015-08-22 Thread Karthik Nayak
On Sat, Aug 22, 2015 at 9:21 PM, Christian Couder wrote: > On Sat, Aug 22, 2015 at 8:51 AM, Karthik Nayak wrote: >> >> The test t1430 'git branch shows badly named ref' has been changed to >> check the stderr for the warning regarding the broken ref. This is >> done as ref-filter throws a warning

Re: [PATCH] Fix `git rev-list --show-notes HEAD` when there are no notes

2015-08-22 Thread Johan Herland
On Sat, Aug 22, 2015 at 5:14 PM, Johannes Schindelin wrote: > The `format_display_notes()` function clearly assumes that the data > structure holding the notes has been initialized already, i.e. that the > `display_notes_trees` variable is no longer `NULL`. > > However, when there are no notes wha

Re: [PATCH v3 7/8] branch.c: use 'ref-filter' APIs

2015-08-22 Thread Christian Couder
On Sat, Aug 22, 2015 at 8:51 AM, Karthik Nayak wrote: > > The test t1430 'git branch shows badly named ref' has been changed to > check the stderr for the warning regarding the broken ref. This is > done as ref-filter throws a warning for broken refs rather than > directly printing them. [...] >

[PATCH] Fix `git rev-list --show-notes HEAD` when there are no notes

2015-08-22 Thread Johannes Schindelin
The `format_display_notes()` function clearly assumes that the data structure holding the notes has been initialized already, i.e. that the `display_notes_trees` variable is no longer `NULL`. However, when there are no notes whatsoever, this variable is still `NULL`, even after initialization. So

Re: Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-22 Thread Karthik Nayak
On Sat, Aug 22, 2015 at 2:49 PM, Ivan Chernyavsky wrote > >> Note that "branch --list", "tag --list" and "for-each-ref" are being >> revamped to share more internal code. If you want to pursue this, >> you probably would want to build on top of that effort once it is >> done. That way, you may

Re: Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-22 Thread Ivan Chernyavsky
22.08.2015, 12:19, "Ivan Chernyavsky" : >   One thing I'm worried about is that git-branch already has option --all. So > we'll get a semantics conflict with setup_revisions() ("all branches" vs "all > refs"). This will have to be treated carefully, e.g. retrace and fix effects > of --all afte

Re: Which branch(es) contain certain commits? (was Re: (unknown))

2015-08-22 Thread Ivan Chernyavsky
22.08.2015, 01:39, "Junio C Hamano" : >  Ivan Chernyavsky writes: > >>   Another problem is that builtin/branch.c currently does not use >>   setup_revisions(), so I'll have to hook it there as well. > >  Heh, you say "problem" above, but I do not think it is a "problem" >  per-se. If you want t

GSOC: Unify the commands `git tag -l`, `git brach -l` and `git for-each-ref`

2015-08-22 Thread Karthik Nayak
Hello All, As part of GSoC I'm working on the Unification of 'for-each-ref', 'tag -l' and 'branch -l'. Current Progress: 1. Building ref-filter.{c,h} from for-each-ref. This is the process of creating an initial library for the unification by moving most of the code from for-each-ref to ref-filt