Re: [PATCH 0/7] Submodule improvements

2015-08-17 Thread Stefan Beller
A last minute change in the last patch broke t7400-submodule-basic.sh, test 82 -- 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 7/7] submodule: implement `module_clone` as a builtin helper

2015-08-17 Thread Stefan Beller
On Mon, Aug 17, 2015 at 5:22 PM, Stefan Beller wrote: > `module_clone` is part of the update command, which I want to convert > to C next. > > Signed-off-by: Stefan Beller > --- > builtin/submodule--helper.c | 161 > +++- > git-submodule.sh|

[PATCH 5/7] submodule: implement `module_list` as a builtin helper

2015-08-17 Thread Stefan Beller
Most of the submodule operations work on a set of submodules. Calculating and using this set is usually done via: module_list "$@" | { while read mode sha1 stage sm_path do # the actual operation done } Currently the function `module_

[PATCH 6/7] submodule: implement `module_name` as a builtin helper

2015-08-17 Thread Stefan Beller
This implements the helper `module_name` in C instead of shell, yielding a nice performance boost. Before this patch, I measured a time (best out of three): $ time ./t7400-submodule-basic.sh >/dev/null real0m11.066s user0m3.348s sys 0m8.534s With this patch applied

[PATCH 4/7] submodule: Allow errornous values for the fetchrecursesubmodules option

2015-08-17 Thread Stefan Beller
From: Heiko Voigt We should not die when reading the submodule config cache since the user might not be able to get out of that situation when the configuration is part of the history. We should handle this condition later when the value is about to be used. Signed-off-by: Heiko Voigt Signed-o

[PATCH 1/7] submodule: implement a config API for lookup of .gitmodules values

2015-08-17 Thread Stefan Beller
From: Heiko Voigt In a superproject some commands need to interact with submodules. They need to query values from the .gitmodules file either from the worktree of from certain revisions. At the moment this is quite hard since a caller would need to read the .gitmodules file from the history and

[PATCH 2/7] submodule: extract functions for config set and lookup

2015-08-17 Thread Stefan Beller
From: Heiko Voigt This is one step towards using the new configuration API. We just extract these functions to make replacing the actual code easier. Signed-off-by: Heiko Voigt Signed-off-by: Stefan Beller --- submodule.c | 142 +--- 1 f

[PATCH 7/7] submodule: implement `module_clone` as a builtin helper

2015-08-17 Thread Stefan Beller
`module_clone` is part of the update command, which I want to convert to C next. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 161 +++- git-submodule.sh| 78 + 2 files changed, 162 insertions(+), 77 deleti

[PATCH 3/7] submodule: use new config API for worktree configurations

2015-08-17 Thread Stefan Beller
From: Heiko Voigt We remove the extracted functions and directly parse into and read out of the cache. This allows us to have one unified way of accessing submodule configuration values specific to single submodules. Regardless whether we need to access a configuration from history or from the wo

[PATCH 0/7] Submodule improvements

2015-08-17 Thread Stefan Beller
This series is a reroll consisting of hv/submodule-config and sb/submodule-helper and it applies on top of origin/jk/git-path. Our long term goal is to make submodule handling more scalable by parallelizing the submodule code. To write good parallelizable code I'd first want to port it to C, as t

Re: [PATCH v9 3/6] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Jacob Keller
On Mon, Aug 17, 2015 at 3:38 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> From: Jacob Keller >> >> Combining rewrite and notes-merge functionality has been left as an >> exercise for a future contributor. > > This comment is probably unnecessary; we haven't even established if > such a

Re: [PATCH v7 1/2] submodule refactor: use git_path_submodule() in add_submodule_odb()

2015-08-17 Thread Stefan Beller
On Tue, Aug 4, 2015 at 3:05 PM, Max Kirillov wrote: > Functions which directly operate submodule's object database do not handle the > case when the submodule is linked worktree (which are introduced in > c7b3a3d2fe). Instead of fixing the path calculation use already existing > git_path_submodule

Re: [PATCH v7 2/2] path: implement common_dir handling in git_path_submodule()

2015-08-17 Thread Stefan Beller
On Tue, Aug 4, 2015 at 3:05 PM, Max Kirillov wrote: > When submodule is a linked worktree, "git diff --submodule" and other > calls which directly access the submodule's object database do not correctly > calculate its path. Fix it by changing the git_path_submodule() behavior, > to use either com

Re: What's cooking in git.git (Aug 2015, #03; Mon, 17)

2015-08-17 Thread Junio C Hamano
Stefan Beller writes: >> * sb/remove-get-pathspec (2015-08-03) 1 commit >> - builtin/mv: remove get_pathspec() >> >> Expecting a reroll. >> ($gmane/275224) > > IIRC the discussion turned out to expect a > full conversion of internal_copy_pathspec in builtin/mv > and not just moving all the cru

Re: What's cooking in git.git (Aug 2015, #03; Mon, 17)

2015-08-17 Thread Stefan Beller
On Mon, Aug 17, 2015 at 3:34 PM, Junio C Hamano wrote: > * hv/submodule-config (2015-06-15) 4 commits > - do not die on error of parsing fetchrecursesubmodules option > - use new config API for worktree configurations of submodules > - extract functions for submodule config set and lookup > -

Re: [PATCH v9 3/6] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Junio C Hamano
Jacob Keller writes: > From: Jacob Keller > > Combining rewrite and notes-merge functionality has been left as an > exercise for a future contributor. This comment is probably unnecessary; we haven't even established if such a combination is desirable AFAICT in the discussion. The patch itself

Re: [PATCH v9 0/6] implement notes.mergeStrategy

2015-08-17 Thread Junio C Hamano
I just said v8 needs reroll in the latest "What's cooking"; after a quick read, this round looks very reasonable, as you said in your cover letter. Will replace what has been queued. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vg

What's cooking in git.git (Aug 2015, #03; Mon, 17)

2015-08-17 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The third batch of topics have graduated to 'master'. You can find the changes described here in the integration branches of the repositories l

Re: [PATCH v11 12/13] tag.c: implement '--format' option

2015-08-17 Thread Jacob Keller
On Mon, Aug 17, 2015 at 12:14 PM, Karthik Nayak wrote: > On Tue, Aug 18, 2015 at 12:34 AM, Junio C Hamano wrote: >> Karthik Nayak writes: >> >>> From: Karthik Nayak >>> >>> Implement the '--format' option provided by 'ref-filter'. >>> This lets the user list tags as per desired format similar >

[PATCH v9 3/6] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Jacob Keller
From: Jacob Keller Combining rewrite and notes-merge functionality has been left as an exercise for a future contributor. Signed-off-by: Jacob Keller --- builtin/notes.c | 12 +--- notes-utils.c | 18 ++ notes-utils.h | 1 + 3 files changed, 20 insertions(+), 11 de

[PATCH v9 4/6] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-17 Thread Jacob Keller
From: Jacob Keller Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-not

[PATCH v9 0/6] implement notes.mergeStrategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller This series implements mergeStrategy configuration options which take the same value as --strategy. This series does not change the allowed refs to merge from or to. There is a known limitation that you cannot merge from refs outside of refs/notes (precluding the use of such re

[PATCH v9 5/6] notes: add notes.mergeStrategy option to select default strategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach git-notes about "notes.mergeStrategy" to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as "cat_sort_uniq" without having to pass the "-s" option manually. Signed-off-by: Jacob Keller --- Documentation/con

[PATCH v9 2/6] notes: extract enum notes_merge_strategy to notes-utils.h

2015-08-17 Thread Jacob Keller
From: Jacob Keller A future patch will extract parsing of the --strategy string into a helper function in notes.c and will require the enumeration definition. Signed-off-by: Jacob Keller --- notes-merge.h | 10 +++--- notes-utils.h | 8 2 files changed, 11 insertions(+), 7 deleti

[PATCH v9 6/6] notes: teach git-notes about notes..mergeStrategy option

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach notes about a new "notes..mergeStrategy" option for configuring the notes merge strategy when merging into refs/notes/. This option allows for the selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want cat_sort_uniq f

[PATCH v9 1/6] notes: document cat_sort_uniq rewriteMode

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletion

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Junio C Hamano
Dave Borowitz writes: > Slight digression for a question that came up during reworking the > series: would it be reasonable to rewrite option parsing in > builtin/send-pack.c to use the options API? Surely. The part of the system whose option parsing predates parse-options may not have been con

Re: [PATCH 2/2] gc: Remove garbage .idx files from pack dir

2015-08-17 Thread Junio C Hamano
Doug Kelly writes: > +static struct string_list pack_garbage = STRING_LIST_INIT_DUP; > + > static char *pidfile; > > +static void clean_pack_garbage(void) > +{ > + int i; > + for (i = 0; i < pack_garbage.nr; i++) > + unlink_or_warn(pack_garbage.items[i].string); > + str

[PATCH] Documentation: read-tree consistent usage of working tree

2015-08-17 Thread Lars Vogel
http://git-scm.com/docs/git-clone speaks only about working tree, the usage of "working directory" for working tree is confusing. Working directory describes the current directory while working tree describes all files and sub directories. Signed-off-by: Lars Vogel --- Documentation/git-read-tre

[PATCH] Documentation: read-tree consistent usage of working tree

2015-08-17 Thread Lars Vogel
http://git-scm.com/docs/git-clone speaks only about working tree, the usage of "working directory" for working tree is confusing. Working tree describes the current directory. Signed-off-by: Lars Vogel --- Documentation/git-read-tree.txt | 8 1 file changed, 4 insertions(+), 4 deletions

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Dave Borowitz
On Mon, Aug 17, 2015 at 3:54 PM, Junio C Hamano wrote: > In the shorter term, at least we should be able to introduce > git_parse_maybe_bool() that does not take "name", use that as a > helper to implement git_config_maybe_bool(), so that the existing > callers of git_config_maybe_bool() does not

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Junio C Hamano
Dave Borowitz writes: > Is there a common utility function that does what we want? Basically > git_config_maybe_bool but not specifically about configs. Interesting. git_config_maybe_bool() and its friends take the usual (name, value) and pretend to be part of the "config" family, primarily bec

Re: [PATCH 7/7] Add a config option push.gpgSign for default signed pushes

2015-08-17 Thread Junio C Hamano
Junio C Hamano writes: > Dave Borowitz writes: > >> The issue is that if both _ALWAYS and _IF_POSSIBLE are set, >> git_transport_push interprets it as _ALWAYS. But, we are also supposed >> to prefer explicit command-line options to config values. >> >> Suppose we parsed config first, then option

Re: [PATCH v2] utf8.c: print warning about iconv errors

2015-08-17 Thread Junio C Hamano
Jeff King writes: > On Fri, Aug 14, 2015 at 03:35:58PM -0700, Junio C Hamano wrote: > >> Max Kirillov writes: >> >> > * do not limit number of warnings - does not worth complicating the code >> >> Unless the warning leads to a quick "die()", wouldn't this make Git >> unusable by spewing a "fal

Re: [PATCH 7/7] Add a config option push.gpgSign for default signed pushes

2015-08-17 Thread Dave Borowitz
On Mon, Aug 17, 2015 at 3:42 PM, Junio C Hamano wrote: > > Dave Borowitz writes: > > > The issue is that if both _ALWAYS and _IF_POSSIBLE are set, > > git_transport_push interprets it as _ALWAYS. But, we are also supposed > > to prefer explicit command-line options to config values. > > > > Suppo

Re: [PATCH 7/7] Add a config option push.gpgSign for default signed pushes

2015-08-17 Thread Junio C Hamano
Dave Borowitz writes: > The issue is that if both _ALWAYS and _IF_POSSIBLE are set, > git_transport_push interprets it as _ALWAYS. But, we are also supposed > to prefer explicit command-line options to config values. > > Suppose we parsed config first, then options. If the user has > push.signed

Re: [PATCH v8 4/8] notes: allow use of the "rewrite" terminology for merge strategies

2015-08-17 Thread Junio C Hamano
Johan Herland writes: > On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller > wrote: >> From: Jacob Keller >> >> notes-merge.c already re-uses the same functions for the automatic merge >> strategies used by the rewrite functionality. Teach the -s/--strategy >> option how to interpret the equivalen

Re: [PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Junio C Hamano
Paul Tan writes: The codepath in the original looks like this: head_tree=$(git rev-parse --verify -q HEAD || echo $empty_tree) && ==> git read-tree --reset -u $head_tree $head_tree && index_tree=$(git write-tree) && orig_head=$(git rev-parse --verify -q ORIG_HEAD || e

Re: [PATCH v11 11/13] tag.c: use 'ref-filter' APIs

2015-08-17 Thread Karthik Nayak
On Tue, Aug 18, 2015 at 12:30 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> We improve the sorting option provided by 'tag.c' by using the sorting >> options provided by 'ref-filter'. This causes the test 'invalid sort >> parameter on command line' in t7004 to fail, as 'ref-filter' throw

Re: [PATCH v11 12/13] tag.c: implement '--format' option

2015-08-17 Thread Karthik Nayak
On Tue, Aug 18, 2015 at 12:34 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> From: 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 a

Re: [PATCH v11 05/13] ref-filter: implement an `align` atom

2015-08-17 Thread Karthik Nayak
On Mon, Aug 17, 2015 at 11:52 PM, Eric Sunshine wrote: > On Mon, Aug 17, 2015 at 10:28 AM, Karthik Nayak wrote: >> On Mon, Aug 17, 2015 at 7:37 AM, Eric Sunshine >> wrote: >>> On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak >>> wrote: +{ + struct strbuf aligned = STRBUF_INIT; >

Re: [PATCH v11 12/13] tag.c: implement '--format' option

2015-08-17 Thread Junio C Hamano
Karthik Nayak writes: > From: 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. Hmm, do we want "--format" added to

Re: [PATCH v2] utf8.c: print warning about iconv errors

2015-08-17 Thread Jeff King
On Fri, Aug 14, 2015 at 03:35:58PM -0700, Junio C Hamano wrote: > Max Kirillov writes: > > > * do not limit number of warnings - does not worth complicating the code > > Unless the warning leads to a quick "die()", wouldn't this make Git > unusable by spewing a "falling back to verbatim copy" f

Re: [PATCH v11 11/13] tag.c: use 'ref-filter' APIs

2015-08-17 Thread Junio C Hamano
Karthik Nayak writes: > We improve the sorting option provided by 'tag.c' by using the sorting > options provided by 'ref-filter'. This causes the test 'invalid sort > parameter on command line' in t7004 to fail, as 'ref-filter' throws an > error for all sorting fields which are incorrect. The te

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Dave Borowitz
On Mon, Aug 17, 2015 at 2:47 PM, Junio C Hamano wrote: > Dave Borowitz writes: > >> On Mon, Aug 17, 2015 at 1:21 PM, Junio C Hamano wrote: >>> >>> My preference on Bikeshed 1. would probably be to add >>> >>> --sign=yes/no/if-asked >>> >>> and to keep --[no-]signed for "no" and "yes" for exi

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Junio C Hamano
Dave Borowitz writes: > On Mon, Aug 17, 2015 at 1:21 PM, Junio C Hamano wrote: >> >> My preference on Bikeshed 1. would probably be to add >> >> --sign=yes/no/if-asked >> >> and to keep --[no-]signed for "no" and "yes" for existing users. > > Incidentally, I just looked up incidence of true/

Re: [PATCH v11 05/13] ref-filter: implement an `align` atom

2015-08-17 Thread Junio C Hamano
Karthik Nayak writes: > On Mon, Aug 17, 2015 at 7:37 AM, Eric Sunshine > wrote: > ... >> Second, I realize that Junio suggested the 'return_to' idea, but it >> seems like it could become overly painful since each handler of this >> sort is going to have to perform the same manipulation to appen

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Dave Borowitz
On Mon, Aug 17, 2015 at 1:21 PM, Junio C Hamano wrote: > Dave Borowitz writes: > >> Ok, so let us bikeshed a bit further. >> >> Bikeshed 1. >> Option A: --signed/--no-signed--signed-if-possible >> Option B: --signed=true|false|if-possible, "--signed" alone implies "=true". >> >> Bikeshed 2. >> >>

Re: [PATCH v8 4/8] notes: allow use of the "rewrite" terminology for merge strategies

2015-08-17 Thread Jacob Keller
Hi, On Mon, Aug 17, 2015 at 5:54 AM, Johan Herland wrote: > On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller > wrote: >> From: Jacob Keller >> >> notes-merge.c already re-uses the same functions for the automatic merge >> strategies used by the rewrite functionality. Teach the -s/--strategy >> o

Re: [PATCH v8 8/8] notes: teach git-notes about notes..mergeStrategy option

2015-08-17 Thread Jacob Keller
Hi, On Mon, Aug 17, 2015 at 6:21 AM, Johan Herland wrote: > Allow me to suggest a different wording, somewhat inspired by the > branch..* documentation... > > On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller > wrote: >> From: Jacob Keller >> >> Add new option "notes..mergeStrategy" option which

Re: [PATCH 7/7] Add a config option push.gpgSign for default signed pushes

2015-08-17 Thread Dave Borowitz
On Mon, Aug 17, 2015 at 1:13 PM, Junio C Hamano wrote: > Dave Borowitz writes: > >> --- > > Does the lack of sign-off indicate something (like "this is just a > 'what do people think?' weatherbaloon not yet a serious submission")? > >> +push.gpgSign:: >> + May be set to a boolean value, or th

Re: [PATCH v11 05/13] ref-filter: implement an `align` atom

2015-08-17 Thread Eric Sunshine
On Mon, Aug 17, 2015 at 10:28 AM, Karthik Nayak wrote: > On Mon, Aug 17, 2015 at 7:37 AM, Eric Sunshine > wrote: >> On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak wrote: >>> +{ >>> + struct strbuf aligned = STRBUF_INIT; >>> + struct ref_formatting_state *return_to = state->prev; >>>

Re: [PATCH 1/7] Documentation/git-push.txt: Document when --signed may fail

2015-08-17 Thread Dave Borowitz
On Fri, Aug 14, 2015 at 7:10 PM, Junio C Hamano wrote: > Dave Borowitz writes: > >> Like --atomic, --signed will fail if the server does not advertise the >> necessary capability. In addition, it requires gpg on the client side. >> >> Signed-off-by: Dave Borowitz >> --- >> Documentation/git-pus

Re:

2015-08-17 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Aug 5, 2015 at 7:47 PM, Ivan Chernyavsky wrote: >> Dear community, >> >> For some time I'm wondering why there's no "--grep" option to the >> "git branch" command, which would request to print only branches >> having specified string/regexp in their history. > > Prob

Re: [PATCH v7 4/4] notes: teach git-notes about notes..mergestrategy option

2015-08-17 Thread Junio C Hamano
Jacob Keller writes: > How do you feel about having the duplicate check for the short_ref? We > *already* check this inside init_notes_check() which is called right > after this. I thought you were trying to enforce a new rule (i.e. must be under "refs/notes/") with this, but it isn't. It is "w

Re: [PATCH v7 4/4] notes: teach git-notes about notes..mergestrategy option

2015-08-17 Thread Junio C Hamano
Jacob Keller writes: >> Sorry, but I lost track. >> >> Do I understand correctly the consensus on the previous discussion? >> My understanding is: >> >> (1) We do not currently refuse to merge notes into anywhere outside >> of refs/notes/; > > We do. I mis understood the original code. We c

Re: [PATCH 0/7] Flags and config to sign pushes by default

2015-08-17 Thread Junio C Hamano
Dave Borowitz writes: > Ok, so let us bikeshed a bit further. > > Bikeshed 1. > Option A: --signed/--no-signed--signed-if-possible > Option B: --signed=true|false|if-possible, "--signed" alone implies "=true". > > Bikeshed 2. > > Option A: if-possible > > The possibly confusing thing is one might

Re: [PATCH 7/7] Add a config option push.gpgSign for default signed pushes

2015-08-17 Thread Junio C Hamano
Dave Borowitz writes: > --- Does the lack of sign-off indicate something (like "this is just a 'what do people think?' weatherbaloon not yet a serious submission")? > +push.gpgSign:: > + May be set to a boolean value, or the string 'if-possible'. A > + true value causes all pushes to be

Re: [PATCH 1/2] prepare_packed_git(): refactor garbage reporting in pack directory

2015-08-17 Thread Junio C Hamano
Eric Sunshine writes: >> -static void real_report_garbage(const char *desc, const char *path) >> +const char *bits_to_msg(unsigned seen_bits) > > If you don't expect other callers outside this file, then this should > be declared 'static'. If you do expect future external callers, then > this sho

Re: [PATCH 2/2] gc: Remove garbage .idx files from pack dir

2015-08-17 Thread Junio C Hamano
Doug Kelly writes: > Add a custom report_garbage handler to collect and remove garbage > .idx files from the pack directory. You need to explain "why" here. Why do we want to remove them? And the definition of what is "garbage" depends on that exact reason why we want to remove them. You and

Re: [PATCH v3 2/4] path: optimize common dir checking

2015-08-17 Thread Junio C Hamano
Michael Haggerty writes: > If I understand correctly, you consider the decision of where a > particular reference should be stored to be a kind of "business logic" > decision that should live outside of the refs module. I don't think it > is so important whether this knowledge is inside or outsid

Re: [PATCH v11 08/13] ref-filter: add support to sort by version

2015-08-17 Thread Karthik Nayak
On Mon, Aug 17, 2015 at 10:23 AM, Eric Sunshine wrote: > On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak wrote: >> Add support to sort by version using the "v:refname" and >> "version:refname" option. This is achieved by using the 'versioncmp()' >> function as the comparing function for qsort. >>

Re: [PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Linus Torvalds
On Mon, Aug 17, 2015 at 2:48 AM, Paul Tan wrote: > > It's true that we need to merge the ORIG_HEAD tree into the index > instead of overwriting it. Patch below. Seems to work for me. Thanks, Linus -- To unsubscribe from this list: send the line "unsubscribe git" in the body

Re: [PATCH v11 06/13] ref-filter: add option to filter out tags, branches and remotes

2015-08-17 Thread Karthik Nayak
On Mon, Aug 17, 2015 at 10:12 AM, Eric Sunshine wrote: > On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak wrote: >> Add a function called 'for_each_reftype_fullpath()' to refs.{c,h} >> which iterates through each ref for the given path without trimming >> the path and also accounting for broken ref

Re: [PATCH v11 05/13] ref-filter: implement an `align` atom

2015-08-17 Thread Karthik Nayak
On Mon, Aug 17, 2015 at 7:37 AM, Eric Sunshine wrote: > On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak wrote: >> Implement an `align` atom which left-, middle-, or right-aligns the >> content between %(align:..) and %(end). >> >> It is followed by `:,`, where the `` is >> either left, right or mi

Re: [PATCH v8 8/8] notes: teach git-notes about notes..mergeStrategy option

2015-08-17 Thread Johan Herland
Allow me to suggest a different wording, somewhat inspired by the branch..* documentation... On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller wrote: > From: Jacob Keller > > Add new option "notes..mergeStrategy" option which specifies the merge > strategy for merging into a given notes ref. Add n

Re: [PATCH v11 04/13] utf8: add function to align a string into given strbuf

2015-08-17 Thread Karthik Nayak
On Mon, Aug 17, 2015 at 5:18 AM, Eric Sunshine wrote: > On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak wrote: >> Add strbuf_utf8_align() which will align a given string into a strbuf >> as per given align_type and width. If the width is greater than the >> string length then no alignment is perfo

Re: [PATCH v8 4/8] notes: allow use of the "rewrite" terminology for merge strategies

2015-08-17 Thread Johan Herland
On Mon, Aug 17, 2015 at 10:46 AM, Jacob Keller wrote: > From: Jacob Keller > > notes-merge.c already re-uses the same functions for the automatic merge > strategies used by the rewrite functionality. Teach the -s/--strategy > option how to interpret the equivalent rewrite terminology for > consis

Re: [PATCH v11 03/13] ref-filter: introduce ref_formatting_state

2015-08-17 Thread Karthik Nayak
On Mon, Aug 17, 2015 at 5:01 AM, Eric Sunshine wrote: > On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak wrote: >> Introduce ref_formatting_state which will hold the formatted >> output strbuf and is used for nesting of modifier atoms. >> >> Signed-off-by: Karthik Nayak >> --- >> diff --git a/ref-

Re: Git stash behavior

2015-08-17 Thread Ed Avis
You may want to see this recent thread about a similar feature: -- Ed Avis -- 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

Re: [PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Johannes Schindelin
Hi Paul, On 2015-08-17 11:48, Paul Tan wrote: > It's true that we need to merge the ORIG_HEAD tree into the index > instead of overwriting it. Patch below. Thanks for your impressive, very responsive work! Dscho -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a m

[PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Paul Tan
On Mon, Aug 17, 2015 at 10:01:29AM +0200, Johannes Schindelin wrote: > Hi Linus, > > On 2015-08-17 01:33, Linus Torvalds wrote: > > On Sun, Aug 16, 2015 at 12:46 PM, Linus Torvalds > > wrote: > >> > >> Maybe it has always done this, and I just haven't noticed (I usually > >> _just_ do the "git re

[PATCH v8 6/8] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-17 Thread Jacob Keller
From: Jacob Keller Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller --- t/t3310-notes-merge-manual-resolve.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-not

[PATCH v8 3/8] note: extract parse_notes_merge_strategy to notes-utils

2015-08-17 Thread Jacob Keller
From: Jacob Keller Allow future code to re-use the parsing functionality. Signed-off-by: Jacob Keller --- builtin/notes.c | 12 +--- notes-utils.c | 18 ++ notes-utils.h | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/builtin/notes.c b/built

[PATCH v8 0/8] implement notes.mergeStrategy option

2015-08-17 Thread Jacob Keller
From: Jacob Keller - Changes since v7 - * add patches to make rewrite and merge take same options * camel case mergeStrategy * move init_notes_check above reading git-config in merge() This is necessary as it ensures refs are inside refs/notes/* It should be noted that git-notes already blocks

[PATCH v8 5/8] notes: implement parse_combine_rewrite_fn using parse_notes_merge_strategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach the rewrite combine notes to use the same names as git-notes merge. This will support all current names plus a few new synonyms. Update documentation to point to NOTES MERGE STRATEGIES to explain the various rewrite options available. Implementing rewrite functionality

[PATCH v8 1/8] notes: document cat_sort_uniq rewriteMode

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach documentation about the cat_sort_uniq rewriteMode that got added at the same time as the equivalent merge strategy. Signed-off-by: Jacob Keller --- Documentation/config.txt| 4 ++-- Documentation/git-notes.txt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletion

[PATCH v8 2/8] notes: extract enum notes_merge_strategy to notes-utils.h

2015-08-17 Thread Jacob Keller
From: Jacob Keller A future patch will extract parsing of the --strategy string into a helper function in notes.c and will require the enumeration definition. Signed-off-by: Jacob Keller --- notes-merge.h | 10 +++--- notes-utils.h | 8 2 files changed, 11 insertions(+), 7 deleti

[PATCH v8 4/8] notes: allow use of the "rewrite" terminology for merge strategies

2015-08-17 Thread Jacob Keller
From: Jacob Keller notes-merge.c already re-uses the same functions for the automatic merge strategies used by the rewrite functionality. Teach the -s/--strategy option how to interpret the equivalent rewrite terminology for consistency. Add tests for the new synonyms. Teaching rewrite how to u

[PATCH v8 7/8] notes: add notes.mergeStrategy option to select default strategy

2015-08-17 Thread Jacob Keller
From: Jacob Keller Teach git-notes about "notes.mergeStrategy" to select a general strategy for all notes merges. This enables a user to always get expected merge strategy such as "cat_sort_uniq" without having to pass the "-s" option manually. Signed-off-by: Jacob Keller --- Documentation/con

[PATCH v8 8/8] notes: teach git-notes about notes..mergeStrategy option

2015-08-17 Thread Jacob Keller
From: Jacob Keller Add new option "notes..mergeStrategy" option which specifies the merge strategy for merging into a given notes ref. This option enables selection of merge strategy for particular notes refs, rather than all notes ref merges, as user may not want cat_sort_uniq for all refs, but

Re: "git am --abort" screwing up index?

2015-08-17 Thread Johannes Schindelin
Hi Linus, On 2015-08-17 01:33, Linus Torvalds wrote: > On Sun, Aug 16, 2015 at 12:46 PM, Linus Torvalds > wrote: >> >> Maybe it has always done this, and I just haven't noticed (I usually >> _just_ do the "git reset --hard" thing, don't ask me why I wanted to >> be doubly sure this time). But may