Re: [PATCH v3 2/3] mergetool: don't require a work tree for --tool-help

2014-10-15 Thread David Aguilar
On Mon, Oct 13, 2014 at 12:16:55PM -0700, Junio C Hamano wrote: David Aguilar dav...@gmail.com writes: From: Charles Bailey cbaile...@bloomberg.net Signed-off-by: Charles Bailey cbaile...@bloomberg.net Signed-off-by: David Aguilar dav...@gmail.com --- Changes since v2: This now

Re: [PATCH] mergetool: add an option for writing to a temporary directory

2014-10-15 Thread David Aguilar
On Mon, Oct 13, 2014 at 12:24:41PM -0700, Junio C Hamano wrote: David Aguilar dav...@gmail.com writes: Teach mergetool to write files in a temporary directory when 'mergetool.writeToTemp' is true. This is helpful for tools such as Eclipse which cannot cope with multiple copies of the

Re: [PATCH v3 2/3] mergetool: don't require a work tree for --tool-help

2014-10-15 Thread David Aguilar
On Tue, Oct 14, 2014 at 11:35:11PM -0700, David Aguilar wrote: On Mon, Oct 13, 2014 at 12:16:55PM -0700, Junio C Hamano wrote: David Aguilar dav...@gmail.com writes: From: Charles Bailey cbaile...@bloomberg.net Signed-off-by: Charles Bailey cbaile...@bloomberg.net Signed-off-by:

[PATCH] mergetools/meld: do not rely on the output of `meld --help`

2014-10-15 Thread David Aguilar
We cannot rely on the output of `meld --help` when determining whether or not meld understands the --output option. Newer versions of meld print a generic help message that does not mention --output even though it is supported. Add a mergetool.meld.compat variable to enable the historical

[PATCH 4/5] t7610-mergetool: prefer test_config over git config

2014-10-15 Thread David Aguilar
Signed-off-by: David Aguilar dav...@gmail.com --- t/t7610-mergetool.sh | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 1a15e06..7eeb207 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -14,7

[PATCH 5/5] test-lib-functions: adjust style to match CodingGuidelines

2014-10-15 Thread David Aguilar
Prefer test over [ ] for conditionals. Prefer $() over backticks for command substitutions. Avoid control structures on a single line with semicolons. Signed-off-by: David Aguilar dav...@gmail.com --- t/test-lib-functions.sh | 30 ++ 1 file changed, 18 insertions(+),

[PATCH 3/5] t7610-mergetool: add test cases for mergetool.writeToTemp

2014-10-15 Thread David Aguilar
Add tests to ensure that filenames start with ./ when mergetool.writeToTemp is false and do not start with ./ when mergetool.writeToTemp is true. Signed-off-by: David Aguilar dav...@gmail.com --- t/t7610-mergetool.sh | 23 +++ 1 file changed, 23 insertions(+) diff --git

[PATCH 1/5] t7610-mergetool: use tabs instead of a mix of tabs and spaces

2014-10-15 Thread David Aguilar
Signed-off-by: David Aguilar dav...@gmail.com --- t/t7610-mergetool.sh | 918 +-- 1 file changed, 459 insertions(+), 459 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 05d9db0..875c8af 100755 --- a/t/t7610-mergetool.sh

[PATCH 2/5] t7610-mergetool: add missing and remove commented-out code

2014-10-15 Thread David Aguilar
Signed-off-by: David Aguilar dav...@gmail.com --- t/t7610-mergetool.sh | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 875c8af..214edfb 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -192,7 +192,7 @@

Re: [PATCH 0/4] Allow building Git with Asciidoctor

2014-10-15 Thread Thomas Braun
Am 14.10.2014 um 11:51 schrieb Jeff King: What's the status on AsciiDoc versus AsciiDoctor? The latter seems more actively developed these days, but perhaps that is just my perception. The incompatibilities seem fairly minimal (if those first two patches are the extent of it, I have no problem

[PATCH] git-svn: merge: fix rooturl/branchurl match check

2014-10-15 Thread Tommaso Colombo
When populating svn:mergeinfo, git-svn merge checks if the merge parent of the merged branch is under the same root as the git-svn repository. This was implemented comparing $gs-repos_root with the return value of of cmt_metadata for the merge parent. However, the first may contain a username,

Custom hunk-header with ignore case setting

2014-10-15 Thread Thomas Braun
Hi, I'm working with a proprietary programming language which ignores case. I now started to write a custom version of diff.*.xfuncname and it is kind of ugly to always spell out all cases like [Ff][Uu][Nn][cC][Tt][Ii][oO][Nn]. I've seen that the builtin diff patterns in userdiff.c can be

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Duy Nguyen
On Wed, Oct 15, 2014 at 3:31 AM, Max Kirillov m...@max630.net wrote: On Tue, Oct 14, 2014 at 07:09:45PM +0200, Jens Lehmann wrote: Until that problem is solved it looks wrong to pass GIT_COMMON_DIR into submodule recursion, I believe GIT_COMMON_DIR should be added to the local_repo_env array

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Duy Nguyen
On Wed, Oct 15, 2014 at 5:15 AM, Max Kirillov m...@max630.net wrote: Hmm, so I tend towards adding GIT_COMMON_DIR to local_repo_env until we figured out how to handle this. Without that I fear bad things will happen, at least for a superproject with multiple checkout-to work trees where the

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Marc Branchaud
On 14-10-14 03:57 PM, Junio C Hamano wrote: While use of the --reference option to borrow objects from an existing local repository of the same project is an effective way to reduce traffic when cloning a project over the network, it makes the resulting borrowing repository dependent on the

[PATCH v2 05/11] refs.c: refactor resolve_ref_unsafe() to use strbuf internally

2014-10-15 Thread Michael Haggerty
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com In the beginning, we had resolve_ref() that returns a buffer owned by this function. Then we started to move away from that direction because the buffer could be overwritten by the next resolve_ref() call and introduced two new functions:

[PATCH v2 08/11] resolve_gitlink_ref_recursive(): drop arbitrary refname length limit

2014-10-15 Thread Michael Haggerty
This limit was added in 0ebde32 (Add 'resolve_gitlink_ref()' helper function - 2007-04-09) Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Theoretically, somebody else might be relying on resolve_gitlink_ref_recursive() to fail for too-long reference names to prevent path.c's

[PATCH v2 09/11] refs.c: rewrite resolve_gitlink_ref() to use parse_ref()

2014-10-15 Thread Michael Haggerty
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com resolve_gitlink_ref_recursive() did about the same thing as parse_ref(), but didn't know as many tricks. It also had another random limit of 128 bytes for symrefs. So base resolve_gitlink_ref() on parse_ref() instead. Signed-off-by: Nguyễn Thái Ngọc

[PATCH v2 01/11] strbuf_read_file(): preserve errno on failure

2014-10-15 Thread Michael Haggerty
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com This will allow the function to be used in a later patch. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- strbuf.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v2 03/11] resolve_ref_unsafe(): reverse the logic of the symref conditional

2014-10-15 Thread Michael Haggerty
It is clearer if the check whether a loose reference file is a symref is followed immediately by the code to handle the symref, rather than the current code, which has the if statement the other way around. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 36

[PATCH v2 02/11] handle_missing_loose_ref(): return an int

2014-10-15 Thread Michael Haggerty
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com The return value of handle_missing_loose_ref() was either NULL to signify an error or the input parameter refname on success. So instead of returning a string, just return a 0 on success or -1 on error, so the reader doesn't have to wonder what string

[PATCH v2 11/11] resolve_gitlink_ref(): remove redundant test

2014-10-15 Thread Michael Haggerty
At this point we know that refs-name is a non-empty string, so we know we don't have to look up the reference in the main repository. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/refs.c b/refs.c index

[PATCH v2 07/11] handle_missing_loose_ref(): inline function

2014-10-15 Thread Michael Haggerty
It only had one remaining caller. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 70 -- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/refs.c b/refs.c index 3acd83e..9f2a0f8 100644 --- a/refs.c

[PATCH v2 06/11] refs.c: move ref parsing code out of resolve_ref()

2014-10-15 Thread Michael Haggerty
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com This function will soon have a second caller. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- I leave parse_ref() a public function for the reason explained by Duy [1]. [1]

[PATCH v2 10/11] resove_gitlink_packed_ref(): inline function

2014-10-15 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/refs.c b/refs.c index a7c8abd..8edcc3b 100644 --- a/refs.c +++ b/refs.c @@ -1280,25 +1280,6 @@ static struct ref_dir

[PATCH v2 00/11] Consolidate ref parsing code

2014-10-15 Thread Michael Haggerty
This is a rif on Duy's oldish patch series [1]. I started reviewing his patch series, but found that some of his patches did multiple things, making it harder to review. I started pulling it apart into smaller changes to aid my review, and I guess I got carried away :-/ As far as I know, Duy

[PATCH v2 04/11] resolve_ref_unsafe(): use skip_prefix() to skip over ref:

2014-10-15 Thread Michael Haggerty
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com This requires buf to be declared (const char *), which is how it is used anyway. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index

İngilizce artık daha kolay .

2014-10-15 Thread KANADA KÜLTÜR MERKEZİ
Merhaba ! Ekim Kampanyasından faydalanmak ve özel ders ingilizce,toefl,ielts , fransızca eğitimlerimiz için bizimle iletişime geçebilirsiniz. . Not: Yerlerimiz SINIRLI sayıdadır. Saygılarımızla KANADA KÜLTÜR MERKEZİ 0212 252 90 35-36 -- To unsubscribe from this list: send the line

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Wed, Oct 15, 2014 at 3:31 AM, Max Kirillov m...@max630.net wrote: On Tue, Oct 14, 2014 at 07:09:45PM +0200, Jens Lehmann wrote: Until that problem is solved it looks wrong to pass GIT_COMMON_DIR into submodule recursion, I believe GIT_COMMON_DIR should

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: I think things would be more understandable if the option was --dissociate repository and was an explicit alternative to --reference: [[--reference | --dissociate] repository] I'm still not liking the name --dissociate though. The original

Re: [PATCH 0/4] Allow building Git with Asciidoctor

2014-10-15 Thread Junio C Hamano
brian m. carlson sand...@crustytoothpaste.net writes: On Tue, Oct 14, 2014 at 10:08:19AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: On Sat, Oct 11, 2014 at 11:37:32PM +, brian m. carlson wrote: Specifically I'm not excited about getting into a state where we have

[PATCH 1/2] subtree: Add an install-html target

2014-10-15 Thread Sebastian Schuberth
Also adjust ignore rules accordingly. Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- contrib/subtree/.gitignore | 3 ++- contrib/subtree/Makefile | 9 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/contrib/subtree/.gitignore b/contrib/subtree/.gitignore

[PATCH 2/2] contacts: Add a Makefile to generate docs and install

2014-10-15 Thread Sebastian Schuberth
Also add a gitignore file for generated files. Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- contrib/contacts/.gitignore | 3 ++ contrib/contacts/Makefile | 71 + 2 files changed, 74 insertions(+) create mode 100644

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Jens Lehmann
Am 15.10.2014 um 00:15 schrieb Max Kirillov: On Tue, Oct 14, 2014 at 09:51:22PM +0200, Jens Lehmann wrote: Am 14.10.2014 um 20:34 schrieb Max Kirillov: But here are a lot of nuances. For example, it makes sense to have a superproject checkout without submodules being initialized (so that they

Re: [PATCH] mergetools/meld: do not rely on the output of `meld --help`

2014-10-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: We cannot rely on the output of `meld --help` when determining whether or not meld understands the --output option. Newer versions of meld print a generic help message that does not mention --output even though it is supported. This obviously breaks

Re: [PATCH] mergetools/meld: do not rely on the output of `meld --help`

2014-10-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: This obviously breaks those who have happily been using their installed version of meld that understands and shows --output in the help text. Is that a minority that is rapidly diminishing? I would understand it if the change were - a

Re: [PATCH] mergetool: add an option for writing to a temporary directory

2014-10-15 Thread Robin Rosenberg
- Ursprungligt meddelande - Från: David Aguilar dav...@gmail.com Till: Junio C Hamano gits...@pobox.com Kopia: Robin Rosenberg robin.rosenb...@dewire.com, git@vger.kernel.org, Charles Bailey char...@hashpling.org Skickat: onsdag, 15 okt 2014 8:38:49 Ämne: Re: [PATCH] mergetool:

Re: Custom hunk-header with ignore case setting

2014-10-15 Thread Junio C Hamano
Thomas Braun thomas.br...@virtuell-zuhause.de writes: I've seen that the builtin diff patterns in userdiff.c can be specified ignoring case using the IPATTERN macro. One of the possible solutions would be to patch userdiff.c (patch courtesy of Johannes Schindelin): -- snip -- diff --git

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Johannes Sixt
Am 14.10.2014 um 21:57 schrieb Junio C Hamano: +static void dissociate_from_references(void) +{ + struct child_process cmd; + + memset(cmd, 0, sizeof(cmd)); We have CHILD_PROCESS_INIT these days. + argv_array_pushl(cmd.args, repack, -a, -d, NULL); + cmd.git_cmd = 1; +

Re: [PATCH] git-prompt.sh: Option to hide prompt for ignored pwd

2014-10-15 Thread Richard Hansen
On 2014-10-15 00:06, Jess Austin wrote: @@ -501,6 +506,13 @@ __git_ps1 () local f=$w$i$s$u local gitstring=$c$b${f:+$z$f}$r$p + if [ -n ${GIT_PS1_HIDE_IF_PWD_IGNORED} ] +[ $(git config --bool bash.hideIfPwdIgnored) != false ] +git check-ignore -q . +

Re: [PATCH 3/4] Documentation: move some AsciiDoc parameters into variables

2014-10-15 Thread Junio C Hamano
brian m. carlson sand...@crustytoothpaste.net writes: Asciidoctor takes slightly different arguments from AsciiDoc in some cases. It has a different name for the HTML backend and the docbook backend produces DocBook 5, not DocBook 4.5. Also, Asciidoctor does not accept the -f option. Move

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Marc Branchaud
On 14-10-15 01:29 PM, Junio C Hamano wrote: Marc Branchaud marcn...@xiplink.com writes: I think things would be more understandable if the option was --dissociate repository and was an explicit alternative to --reference: [[--reference | --dissociate] repository] I'm still not liking

Re: [PATCH 4/5] t7610-mergetool: prefer test_config over git config

2014-10-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Signed-off-by: David Aguilar dav...@gmail.com --- The reason why this change favours test_config over git config is not described here, but if we think about that, some of the changes in this may become questionable. diff --git a/t/t7610-mergetool.sh

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: On 14-10-15 01:29 PM, Junio C Hamano wrote: $ git clone \ --reference=/local/pool/linux.git \ --borrow=../my/neighbour/linux-hack.git \ git://git.kernel.org/./linux.git With do the usual --reference thing, but

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: Unless you have a secret plan, you can do it even shorter with our helpers: Thanks. No there isn't a secret plan. It was just me being rusty. diff --git a/builtin/clone.c b/builtin/clone.c index 8649090..81efb07 100644 --- a/builtin/clone.c +++

Re: [PATCH v23 0/25] rs/ref-transaction (Use ref transactions, part 3)

2014-10-15 Thread Junio C Hamano
Thanks; queued. Hopefully we can merge to 'next' and go incremental. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Marc Branchaud
On 14-10-15 05:33 PM, Junio C Hamano wrote: Marc Branchaud marcn...@xiplink.com writes: On 14-10-15 01:29 PM, Junio C Hamano wrote: $ git clone \ --reference=/local/pool/linux.git \ --borrow=../my/neighbour/linux-hack.git \ git://git.kernel.org/./linux.git

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

2014-10-15 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: Yes, but we're cloning gko, not the neighbour. Doesn't that mean that the clone operation won't know about any of the neighbour's refs? No. --reference (and a natural implementation of --borrow, I would imagine) peeks the refs of the repository we

[PATCH v2 0/25] prune-safety

2014-10-15 Thread Jeff King
Here's a re-roll of the patch series I posted earlier to make git prune keep more contiguous chunks of the object graph. The cleanups to t5304 were spun off into their own series, and are dropped here. However, the other patches seem to have multiplied in number (I must have fed them after

[PATCH v2 01/25] foreach_alt_odb: propagate return value from callback

2014-10-15 Thread Jeff King
We check the return value of the callback and stop iterating if it is non-zero. However, we do not make the non-zero return value available to the caller, so they have no way of knowing whether the operation succeeded or not (technically they can keep their own error flag in the callback data, but

[PATCH v2 02/25] isxdigit: cast input to unsigned char

2014-10-15 Thread Jeff King
Otherwise, callers must do so or risk triggering warnings -Wchar-subscript (and rightfully so; a signed char might cause us to use a bogus negative index into the hexval_table). While we are dropping the now-unnecessary casts from the caller in urlmatch.c, we can get rid of similar casts in

[PATCH v2 03/25] object_array: factor out slopbuf-freeing logic

2014-10-15 Thread Jeff King
This is not a lot of code, but it's a logical construct that should not need to be repeated (and we are about to add a third repetition). Signed-off-by: Jeff King p...@peff.net --- object.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/object.c b/object.c

[PATCH v2 04/25] object_array: add a clear function

2014-10-15 Thread Jeff King
There's currently no easy way to free the memory associated with an object_array (and in most cases, we simply leak the memory in a rev_info's pending array). Let's provide a helper to make this easier to handle. We can make use of it in list-objects.c, which does the same thing by hand (but

[PATCH v2 05/25] clean up name allocation in prepare_revision_walk

2014-10-15 Thread Jeff King
When we enter prepare_revision_walk, we have zero or more entries in our pending array. We disconnect that array from the rev_info, and then process each entry: 1. If the entry is a commit and the --source option is in effect, we keep a pointer to the object name. 2. Otherwise, we

[PATCH v2 06/25] reachable: use traverse_commit_list instead of custom walk

2014-10-15 Thread Jeff King
To find the set of reachable objects, we add a bunch of possible sources to our rev_info, call prepare_revision_walk, and then launch into a custom walker that handles each object top. This is a subset of what traverse_commit_list does, so we can just reuse that code (it can also handle more

[PATCH v2 07/25] reachable: reuse revision.c add all reflogs code

2014-10-15 Thread Jeff King
We want to add all reflog entries as tips for finding reachable objects. The revision machinery can already do this (to support rev-list --reflog); we can reuse that code. Signed-off-by: Jeff King p...@peff.net --- This one is not strictly necessary, but it seems like a nice cleanup. Note that

[PATCH v2 08/25] prune: factor out loose-object directory traversal

2014-10-15 Thread Jeff King
Prune has to walk $GIT_DIR/objects/?? in order to find the set of loose objects to prune. Other parts of the code (e.g., count-objects) want to do the same. Let's factor it out into a reusable for_each-style function. Note that this is not quite a straight code movement. The original code had

[PATCH v2 11/25] count-objects: do not use xsize_t when counting object size

2014-10-15 Thread Jeff King
The point of xsize_t is to safely cast an off_t into a size_t (because we are about to mmap). But in count-objects, we are summing the sizes in an off_t. Using xsize_t means that count-objects could fail on a 32-bit system with a 4G object (not likely, as other parts of git would fail, but we

[PATCH v2 10/25] prune-packed: use for_each_loose_file_in_objdir

2014-10-15 Thread Jeff King
This saves us from manually traversing the directory structure ourselves. Signed-off-by: Jeff King p...@peff.net --- builtin/prune-packed.c | 69 +- 1 file changed, 23 insertions(+), 46 deletions(-) diff --git a/builtin/prune-packed.c

[PATCH v2 09/25] reachable: mark index blobs as SEEN

2014-10-15 Thread Jeff King
When we mark all reachable objects for pruning, that includes blobs mentioned by the index. However, we do not mark these with the SEEN flag, as we do for objects that we find by traversing (we also do not add them to the pending list, but that is because there is nothing further to traverse with

[PATCH v2 13/25] sha1_file: add for_each iterators for loose and packed objects

2014-10-15 Thread Jeff King
We typically iterate over the reachable objects in a repository by starting at the tips and walking the graph. There's no easy way to iterate over all of the objects, including unreachable ones. Let's provide a way of doing so. Signed-off-by: Jeff King p...@peff.net --- cache.h | 11

[PATCH v2 12/25] count-objects: use for_each_loose_file_in_objdir

2014-10-15 Thread Jeff King
This drops our line count considerably, and should make things more readable by keeping the counting logic separate from the traversal. Signed-off-by: Jeff King p...@peff.net --- builtin/count-objects.c | 101 ++-- 1 file changed, 30 insertions(+), 71

[PATCH v2 14/25] prune: keep objects reachable from recent objects

2014-10-15 Thread Jeff King
Our current strategy with prune is that an object falls into one of three categories: 1. Reachable (from ref tips, reflogs, index, etc). 2. Not reachable, but recent (based on the --expire time). 3. Not reachable and not recent. We keep objects from (1) and (2), but prune objects in (3).

[PATCH v2 16/25] pack-objects: match prune logic for discarding objects

2014-10-15 Thread Jeff King
A recent commit taught git-prune to keep non-recent objects that are reachable from recent ones. However, pack-objects, when loosening unreachable objects, tries to optimize out the write in the case that the object will be immediately pruned. It now gets this wrong, since its rule does not

[PATCH v2 17/25] write_sha1_file: freshen existing objects

2014-10-15 Thread Jeff King
When we try to write a loose object file, we first check whether that object already exists. If so, we skip the write as an optimization. However, this can interfere with prune's strategy of using mtimes to mark files in progress. For example, if a branch contains a particular tree object and is

[PATCH v2 15/25] pack-objects: refactor unpack-unreachable expiration check

2014-10-15 Thread Jeff King
When we are loosening unreachable packed objects, we do not bother to process objects that would simply be pruned immediately anyway. The would be pruned check is a simple comparison, but is about to get more complicated. Let's pull it out into a separate function. Note that this is slightly less

[PATCH v2 18/25] make add_object_array_with_context interface more sane

2014-10-15 Thread Jeff King
When you resolve a sha1, you can optionally keep any context found during the resolution, including the path and mode of a tree entry (e.g., when looking up HEAD:subdir/file.c). The add_object_array_with_context function lets you then attach that context to an entry in a list. Unfortunately, the

[PATCH v2 19/25] traverse_commit_list: support pending blobs/trees with paths

2014-10-15 Thread Jeff King
When we call traverse_commit_list, we may have trees and blobs in the pending array. As we process these, we pass the name field from the pending entry as the path of the object within the tree (which then becomes the root path if we recurse into subtrees). When we set up the traversal in

[PATCH v2 20/25] rev-list: document --reflog option

2014-10-15 Thread Jeff King
This is mostly used internally, but it does not hurt to explain it. Signed-off-by: Jeff King p...@peff.net --- Documentation/rev-list-options.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index

[PATCH v2 21/25] rev-list: add --index-objects option

2014-10-15 Thread Jeff King
There is currently no easy way to ask the revision traversal machinery to include objects reachable from the index (e.g., blobs and trees that have not yet been committed). This patch adds an option to do so. Signed-off-by: Jeff King p...@peff.net --- I was tempted to call this just --index,

[PATCH v2 22/25] reachable: use revision machinery's --index-objects code

2014-10-15 Thread Jeff King
This does the same thing as our custom code, so let's not repeat ourselves. Signed-off-by: Jeff King p...@peff.net --- reachable.c | 52 +--- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/reachable.c b/reachable.c index

[PATCH v2 23/25] pack-objects: use argv_array

2014-10-15 Thread Jeff King
This saves us from having to bump the rp_av count when we add new traversal options. Signed-off-by: Jeff King p...@peff.net --- builtin/pack-objects.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index

[PATCH v2 24/25] repack: pack objects mentioned by the index

2014-10-15 Thread Jeff King
When we pack all objects, we use only the objects reachable from references and reflogs. This misses any objects which are reachable from the index, but not yet referenced. By itself this isn't a big deal; the objects can remain loose until they are actually used in a commit. However, it does

[PATCH v2 25/25] pack-objects: double-check options before discarding objects

2014-10-15 Thread Jeff King
When we are given an expiration time like --unpack-unreachable=2.weeks.ago, we avoid writing out old, unreachable loose objects entirely, under the assumption that running prune would simply delete them immediately anyway. However, this is only valid if we computed the same set of reachable

Re: [PATCH 0/4] Allow building Git with Asciidoctor

2014-10-15 Thread brian m. carlson
On Wed, Oct 15, 2014 at 01:24:22PM +0200, Thomas Braun wrote: Am 14.10.2014 um 11:51 schrieb Jeff King: What's the status on AsciiDoc versus AsciiDoctor? The latter seems more actively developed these days, but perhaps that is just my perception. The incompatibilities seem fairly minimal

fsck option to remove corrupt objects - why/why not?

2014-10-15 Thread Ben Aveling
On 14/10/2014 19:21, Jeff King wrote: On Mon, Oct 13, 2014 at 09:37:27AM +1100, Ben Aveling wrote: A question about fsck - is there a reason it doesn't have an option to delete bad objects? If the objects are reachable, then deleting them would create other big problems (i.e., we would be

Re: [RFC/PATCH] fsck: do not canonicalize modes in trees we are checking

2014-10-15 Thread Jeff King
On Thu, Oct 16, 2014 at 10:46:19AM +1100, Ben Aveling wrote: On 14/10/2014 19:21, Jeff King wrote: On Mon, Oct 13, 2014 at 09:37:27AM +1100, Ben Aveling wrote: A question about fsck - is there a reason it doesn't have an option to delete bad objects? If the objects are reachable, then

Re: [PATCH 3/4] Documentation: move some AsciiDoc parameters into variables

2014-10-15 Thread brian m. carlson
On Wed, Oct 15, 2014 at 01:43:49PM -0700, Junio C Hamano wrote: I think it makes sense to make these customizable, but I wonder if it makes the result easier to maintain if we make units of logical definitions larger, e.g. ASCIIDOC = asciidoc TXT_TO_MANHTML = $(ASCIIDOC) -b

FEAUTRE-REQUEST: upon git difftool, files which cannot be modified (persistently) should be made read only

2014-10-15 Thread Christoph Anton Mitterer
Hi. Apparently since a while, git difftool has the awseome feature, that it just symlinks the files to the working copy, if a diff with that is requested. e.g. something like: git difftool -d will have /tmp/git-difftool.TWYTA created with subdirs left: -rw-r--r-- 1 user user 45k Oct

[PATCH v2] mergetools/meld: make usage of `--output` configurable and more robust

2014-10-15 Thread David Aguilar
Older versions of meld listed --output in `meld --help`. Newer versions only mention `meld [OPTIONS...]`. Improve the checks to catch these newer versions. Add a `mergetool.meld.hasOutput` configuration to allow overriding the heuristic. Reported-by: Andrey Novoseltsev novos...@gmail.com

[PATCH v2 4/5] t7610-mergetool: use test_config to isolate tests

2014-10-15 Thread David Aguilar
Signed-off-by: David Aguilar dav...@gmail.com --- This is a replacement patch for t7610-mergetool: prefer test_config over git config in da/mergetool-tests. Changes since v1: The changes are more surgical and the commit message mentions why we are using test_config. t/t7610-mergetool.sh | 8