[PATCH 2/2] gpg-interface: make parse_gpg_output static and remove from interface header

2018-07-11 Thread Henning Schild
Turn parse_gpg_output into a static function, the only outside user was migrated in an earlier commit. Signed-off-by: Henning Schild --- gpg-interface.c | 2 +- gpg-interface.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gpg-interface.c b/gpg-interface.c index 0647bd634

Re: [GSoC][PATCH v3 01/13] sequencer: make two functions and an enum from sequencer.c public

2018-07-10 Thread Junio C Hamano
. It is not too big a deal, but we prefer to hear our story told in a consistent voice. We'd phrase often the above as if giving an order to the code base to "become like so", i.e. Make X, Y, and Z accessible outside sequencer.c; rename A to B and prefix its values by

Re: [PATCH v2 2/9] gpg-interface: make parse_gpg_output static and remove from interface header

2018-07-10 Thread Junio C Hamano
ing an order to "make it so" to the codebase, e.g. Turn parse_gpg_output() into a static function, as the only outside user was removed in the previous step. or something like that. These two steps, as you said earlier, are nice clean-up patches whose goodness can be measur

[GSoC][PATCH v3 01/13] sequencer: make two functions and an enum from sequencer.c public

2018-07-10 Thread Alban Gruin
This makes rebase_path_todo(), get_missing_commit_check_level() and the enum check_level accessible outside sequencer.c. check_level is renamed missing_commit_check_level, and its value names are prefixed by MISSING_COMMIT_ to avoid namespace pollution. This function and this enum will eventually

[PATCH v2 2/9] gpg-interface: make parse_gpg_output static and remove from interface header

2018-07-10 Thread Henning Schild
This commit turns parse_gpg_output into an internal function, the only outside user was migrated in an earlier commit. Signed-off-by: Henning Schild --- gpg-interface.c | 2 +- gpg-interface.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gpg-interface.c b/gpg-interface.c

[PATCH 13/17] builtin/merge-recursive: make hash independent

2018-07-08 Thread brian m. carlson
Use GIT_MAX_HEXSZ instead of GIT_SHA1_HEXSZ for an allocation so that it is sufficiently large. Switch a comparison to use the_hash_algo to determine the length of a hex object ID. Signed-off-by: brian m. carlson --- builtin/merge-recursive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH 11/17] builtin/fmt-merge-msg: make hash independent

2018-07-08 Thread brian m. carlson
Convert several uses of GIT_SHA1_HEXSZ into references to the_hash_algo. Switch other uses into a use of parse_oid_hex and uses of its computed pointer. Signed-off-by: brian m. carlson --- builtin/fmt-merge-msg.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --

Re: [PATCH 1/3] ls-tree: make optional

2018-07-06 Thread Junio C Hamano
Joshua Nelson writes: > On 07/06/2018 01:01 PM, Junio C Hamano wrote: >> Elijah Newren writes: >> I'd prefer *not* to have such a DWIM in a command like ls-tree, aka plumbing commands, where predictability is worth 1000 times more than ease of typing. >>> >>> Fair enough. Howeve

Re: [PATCH 1/3] ls-tree: make optional

2018-07-06 Thread Joshua Nelson
On 07/06/2018 01:01 PM, Junio C Hamano wrote: > Elijah Newren writes: > >>> I'd prefer *not* to have such a DWIM in a command like ls-tree, aka >>> plumbing commands, where predictability is worth 1000 times more >>> than ease of typing. >> >> Fair enough. However, what if no or are specifie

Re: [PATCH 1/3] ls-tree: make optional

2018-07-06 Thread Junio C Hamano
Elijah Newren writes: >> I'd prefer *not* to have such a DWIM in a command like ls-tree, aka >> plumbing commands, where predictability is worth 1000 times more >> than ease of typing. > > Fair enough. However, what if no or are specified, > though -- would you be okay with the HEAD being assu

Re: [GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-05 Thread Alban Gruin
Hi Junio, Le 03/07/2018 à 22:20, Junio C Hamano a écrit : > Alban Gruin writes: > >> -enum check_level { >> -CHECK_IGNORE = 0, CHECK_WARN, CHECK_ERROR >> -}; >> - >> -static enum check_level get_missing_commit_check_level(void) >> +enum missing_commit_check_level get_missing_commit_check_lev

Re: [PATCH] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 7:57 PM Joshua Nelson wrote: > Use syntax similar to `git-checkout` to make optional for > `ls-tree`. If is omitted, default to HEAD. Infer arguments as > follows: > > 1. If args start with '--', assume to be HEAD > 2. If exactly one arg prece

Re: [PATCH] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 8:05 PM Joshua Nelson wrote: > Is it customary to send a new patch or second patch that builds on the > first? It depends what you mean. If there were problems with a version of a patch you sent, then you "re-roll", which means you re-send the patch in its entirety as if it

Re: [PATCH 1/3] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 7:15 PM Joshua Nelson wrote: > On 07/03/2018 03:15 AM, Eric Sunshine wrote: > >> + /* taken from checkout.c; > >> +* we have a simpler case because we never create a branch > >> */ > > > > However, this comment doesn't belong in the code, as it

Re: [PATCH] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
On 07/03/2018 07:53 PM, Joshua Nelson wrote: > diff --git a/t/t3104-ls-tree-optional-args.sh > b/t/t3104-ls-tree-optional-args.sh > new file mode 100755 > index 0..e9d8389bc > --- /dev/null > +++ b/t/t3104-ls-tree-optional-args.sh > @@ -0,0 +1,63 @@ > +#!/bin/sh > + > +test_description='

[PATCH] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
Use syntax similar to `git-checkout` to make optional for `ls-tree`. If is omitted, default to HEAD. Infer arguments as follows: 1. If args start with '--', assume to be HEAD 2. If exactly one arg precedes '--', treat the argument as 3. If more than one arg precedes '

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
t with ill-intent. > > On Mon, Jul 2, 2018 at 11:58 PM Joshua Nelson wrote: >> use syntax similar to `git-checkout` to make optional for >> `ls-tree`. if is omitted, default to HEAD. infer arguments as >> follows: > > Nit: Capitalize first word of each sentence. &

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
Agreed, ls-tree when called with no arguments was the main use case I wrote this for; the rest was mostly because other commands allow greater ambiguity and I wanted to make the syntax consistent. I don't mind doing this for rev-list as well if that's a useful feature. On 07/03/201

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Elijah Newren
On Tue, Jul 3, 2018 at 3:05 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> On Mon, Jul 2, 2018 at 8:58 PM, Joshua Nelson wrote: >>> use syntax similar to `git-checkout` to make optional for >>> `ls-tree`. if is omitted, default to HEAD. infer arguments

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Junio C Hamano
Elijah Newren writes: > On Mon, Jul 2, 2018 at 8:58 PM, Joshua Nelson wrote: >> use syntax similar to `git-checkout` to make optional for >> `ls-tree`. if is omitted, default to HEAD. infer arguments as >> follows: >> >> 1. if args start with -- >>

Re: [GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-03 Thread Junio C Hamano
Alban Gruin writes: > -enum check_level { > - CHECK_IGNORE = 0, CHECK_WARN, CHECK_ERROR > -}; > - > -static enum check_level get_missing_commit_check_level(void) > +enum missing_commit_check_level get_missing_commit_check_level(void) The new name definitely is better than "check_level" in th

[PATCH 2/8] gpg-interface: make parse_gpg_output static and remove from interface header

2018-07-03 Thread Henning Schild
This commit turns parse_gpg_output into an internal function, the only outside user was migrated in an earlier commit. Signed-off-by: Henning Schild --- gpg-interface.c | 2 +- gpg-interface.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gpg-interface.c b/gpg-interface.c

[PATCH v3 20/20] range-diff: make --dual-color the default mode

2018-07-03 Thread Johannes Schindelin via GitGitGadget
. Therefore, we really want to make the dual color mode the default. Signed-off-by: Johannes Schindelin --- Documentation/git-range-diff.txt | 13 - builtin/range-diff.c | 10 ++ contrib/completion/git-completion.bash | 2 +- 3 files changed, 15 insertions

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Eric Sunshine
wrote: > use syntax similar to `git-checkout` to make optional for > `ls-tree`. if is omitted, default to HEAD. infer arguments as > follows: Nit: Capitalize first word of each sentence. This commit message explains what the patch changes (which is a good thing to do), but it's

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Elijah Newren
On Mon, Jul 2, 2018 at 8:58 PM, Joshua Nelson wrote: > use syntax similar to `git-checkout` to make optional for > `ls-tree`. if is omitted, default to HEAD. infer arguments as > follows: > > 1. if args start with -- > assume to be HEAD > 2. if exactly one arg p

[PATCH 1/3] ls-tree: make optional

2018-07-02 Thread Joshua Nelson
use syntax similar to `git-checkout` to make optional for `ls-tree`. if is omitted, default to HEAD. infer arguments as follows: 1. if args start with -- assume to be HEAD 2. if exactly one arg precedes --, treat the argument as 3. if more than one arg precedes --, exit with an error

[GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-02 Thread Alban Gruin
This makes rebase_path_todo(), get_missing_commit_check_level() and the enum check_level accessible outside sequencer.c. check_level is renamed missing_commit_check_level, and its value names are prefixed by MISSING_COMMIT_ to avoid namespace pollution. This will be needed for the rewrite of appe

[PATCH v2 5/9] merge-recursive: make sure when we say we abort that we actually abort

2018-06-30 Thread Elijah Newren
In commit 65170c07d4 ("merge-recursive: avoid incorporating uncommitted changes in a merge", 2017-12-21), it was noted that there was a special case when merge-recursive didn't rely on unpack_trees() to enforce the index == HEAD requirement, and thus that it needed to do that enforcement itself. U

[PATCH v2 1/9] fetch-object: make functions return an error code

2018-06-30 Thread Christian Couder
The callers of the fetch_object() and fetch_objects() might be interested in knowing if these functions succeeded or not. Signed-off-by: Christian Couder --- fetch-object.c | 15 +-- fetch-object.h | 6 +++--- sha1-file.c| 4 ++-- 3 files changed, 14 insertions(+), 11 deletions

Re: [RFC PATCH 11/13] commit-reach: make can_all_from_reach... linear

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > The can_all_from_reach_with_flags() algorithm is currently quadratic in > the worst case, because it calls the reachable() method for every 'from' > without tracking which commits have already been walked or which can > already reach a comm

Re: [RFC PATCH 04/13] upload-pack: make reachable() more generic

2018-06-29 Thread Junio C Hamano
Derrick Stolee writes: > In anticipation of moving the reachable() method to commit-reach.c, > modify the prototype to be more generic to flags known outside of > upload-pack.c. Also rename 'want' to 'from' to make the statement > more clear outside of the co

[RFC PATCH 11/13] commit-reach: make can_all_from_reach... linear

2018-06-29 Thread Derrick Stolee
The can_all_from_reach_with_flags() algorithm is currently quadratic in the worst case, because it calls the reachable() method for every 'from' without tracking which commits have already been walked or which can already reach a commit in 'to'. Rewrite the algorithm to walk each commit a constant

[RFC PATCH 04/13] upload-pack: make reachable() more generic

2018-06-29 Thread Derrick Stolee
In anticipation of moving the reachable() method to commit-reach.c, modify the prototype to be more generic to flags known outside of upload-pack.c. Also rename 'want' to 'from' to make the statement more clear outside of the context of haves/wants negotiation. Signed-of

[GSoC][PATCH v5 1/2] sequencer: make two functions and an enum from sequencer.c public

2018-06-28 Thread Alban Gruin
This makes rebase_path_todo(), get_missing_commit_check_level() and the enum check_level accessible outside sequencer.c. check_level is renamed missing_commit_check_level, and its value names are prefixed by MISSING_COMMIT_ to avoid namespace pollution. This will be needed for the rewrite of appe

[PATCH v6 6/8] fetch: refactor to make function args narrower

2018-06-27 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport st

Re: [GSoC][PATCH v4 1/2] sequencer: make two functions and an enum from sequencer.c public

2018-06-27 Thread Alban Gruin
Hi Johannes, Le 26/06/2018 à 23:41, Johannes Schindelin a écrit : > Hi Alban, > > On Tue, 26 Jun 2018, Alban Gruin wrote: > >> diff --git a/sequencer.h b/sequencer.h >> index c5787c6b5..08397b0d1 100644 >> --- a/sequencer.h >> +++ b/sequencer.h >> @@ -3,6 +3,7 @@ >> >> const char *git_path_co

[RFC PATCH v5 9/9] git-rebase: make --allow-empty-message the default

2018-06-27 Thread Elijah Newren
rebase backends currently behave differently with empty commit messages, largely as a side-effect of the different underlying commands on which they are based. am-based rebases apply commits with an empty commit message without stopping or requiring the user to specify an extra flag. (It is intere

Re: [GSoC][PATCH v4 1/2] sequencer: make two functions and an enum from sequencer.c public

2018-06-26 Thread Johannes Schindelin
Hi Alban, On Tue, 26 Jun 2018, Alban Gruin wrote: > diff --git a/sequencer.h b/sequencer.h > index c5787c6b5..08397b0d1 100644 > --- a/sequencer.h > +++ b/sequencer.h > @@ -3,6 +3,7 @@ > > const char *git_path_commit_editmsg(void); > const char *git_path_seq_dir(void); > +const char *rebase_p

Re: [PATCH v5 6/8] fetch: refactor to make function args narrower

2018-06-26 Thread Junio C Hamano
Brandon Williams writes: > Refactor find_non_local_tags and get_ref_map to only take the > information they need instead of the entire transport struct. Besides > improving code clarity, this also improves their flexibility, allowing > for a different set of refs to be used instead of relying on

[PATCH v5 6/8] fetch: refactor to make function args narrower

2018-06-26 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport st

Re: [PATCH v2 4/6] submodule-config: make 'config_from_gitmodules' private

2018-06-26 Thread Junio C Hamano
Antonio Ospite writes: > Now that 'config_from_gitmodules' is not used in the open, it can be > marked as private. Nice ;-)

[GSoC][PATCH v4 1/2] sequencer: make two functions and an enum from sequencer.c public

2018-06-26 Thread Alban Gruin
This makes rebase_path_todo(), get_missign_commit_check_level() and the enum check_level accessible outside sequencer.c. This will be needed for the rewrite of append_todo_help() from shell to C, as it will be in a new library source file, rebase-interactive.c. Signed-off-by: Alban Gruin --- se

[PATCH v2 4/6] submodule-config: make 'config_from_gitmodules' private

2018-06-26 Thread Antonio Ospite
Now that 'config_from_gitmodules' is not used in the open, it can be marked as private. Hopefully this will prevent its usage for retrieving arbitrary configuration form the '.gitmodules' file. Signed-off-by: Antonio Ospite --- submodule-config.c | 8 submodule-config.h | 12 +

Re: [PATCH v4 6/8] fetch: refactor to make function args narrower

2018-06-25 Thread Jonathan Tan
> Refactor find_non_local_tags and get_ref_map to only take the > information they need instead of the entire transport struct. Besides > improving code clarity, this also improves their flexibility, allowing > for a different set of refs to be used instead of relying on the ones > stored in the tr

[PATCH v4 6/8] fetch: refactor to make function args narrower

2018-06-25 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport st

Re: [PATCH 0/2] Object store refactoring: make bitmap_git not global

2018-06-25 Thread Brandon Williams
On 06/07, Jonathan Tan wrote: > This is a continuation of the object store refactoring effort. > > We cannot truly free an object store without ensuring that any generated > bitmaps are first freed, so here are patches to drastically reduce the > lifetime of any bitmaps generated. As a bonus, the

[RFC PATCH v4 9/9] git-rebase: make --allow-empty-message the default

2018-06-25 Thread Elijah Newren
rebase backends currently behave differently with empty commit messages, largely as a side-effect of the different underlying commands on which they are based. am-based rebases apply commits with an empty commit message without stopping or requiring the user to specify an extra flag. (It is intere

[PATCH v1 01/11] fetch-object: make functions return an error code

2018-06-23 Thread Christian Couder
The callers of the fetch_object() and fetch_objects() might be interested in knowing if these functions succeeded or not. Signed-off-by: Christian Couder --- fetch-object.c | 15 +-- fetch-object.h | 6 +++--- sha1-file.c| 4 ++-- 3 files changed, 14 insertions(+), 11 deletions

[PATCH 4/7] submodule-config: make 'config_from_gitmodules' private

2018-06-22 Thread Antonio Ospite
Now that 'config_from_gitmodules' is not used in the open, it can be marked as private. Hopefully this will prevent its usage for retrieving arbitrary configuration form the '.gitmodules' file. Signed-off-by: Antonio Ospite --- submodule-config.c | 8 submodule-config.h | 12 +

[PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-06-22 Thread Jeff King
is originally because "--create-reflog" was squatting on the "-l" option. Now that we've deprecated that use for long enough, we can make the switch. Signed-off-by: Jeff King --- This one is mostly a squash of the remove/reincarnate steps from the previous iteration. I al

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-21 Thread Stefan Beller
> OK, the fact I was overlooking was that the "config_fn_t" argument > passed to config_from_gitmodules is what we are actually worried about, > it's the config callback which could allow generic config in .gitmodules > to sneak in. That is the precise point that I was trying to communicate. :) >

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-21 Thread Elijah Newren
Hi Dscho, Thanks for all the food for thought. This is awesome. On Thu, Jun 21, 2018 at 3:57 AM, Johannes Schindelin wrote: > On Wed, 20 Jun 2018, Elijah Newren wrote: >> On Sun, Jun 17, 2018 at 2:44 PM, Johannes Schindelin >> wrote: >> >> > I was really referring to speed. But I have to admit

[RFC PATCH v3 7/7] git-rebase: make --allow-empty-message the default

2018-06-21 Thread Elijah Newren
appears no one has ever requested a --no-allow-empty-message flag to change this behavior, make --allow-empty-message the default so that merge-based and interactive-based rebases will behave the same. Signed-off-by: Elijah Newren --- See also https://public-inbox.org/git/CABPp-BHrcUHX_zHxpojV5=sxJ1

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-21 Thread Antonio Ospite
On Wed, 20 Jun 2018 12:10:42 -0700 Stefan Beller wrote: > Hi Antonio! > > On Wed, Jun 20, 2018 at 11:06 AM Antonio Ospite wrote: > > I get that the _content_ of .gitmodules is not meant to be generic > > config, but I still see some value in having a single point when its > > _location_ is decid

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-21 Thread Johannes Schindelin
Hi Elijah, On Wed, 20 Jun 2018, Elijah Newren wrote: > On Sun, Jun 17, 2018 at 2:44 PM, Johannes Schindelin > wrote: > > > I was really referring to speed. But I have to admit that I do not have > > any current numbers. > > > > Another issue just hit me, though: rebase --am does not need to loo

[PATCH v3 6/8] fetch: refactor to make function args narrower

2018-06-20 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport st

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-20 Thread Stefan Beller
Hi Antonio! On Wed, Jun 20, 2018 at 11:06 AM Antonio Ospite wrote: > I get that the _content_ of .gitmodules is not meant to be generic > config, but I still see some value in having a single point when its > _location_ is decided. I agree that a single point for the _location_ as well as the _o

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-20 Thread Antonio Ospite
figuration file. > > > > Add a repo argument to it to make the function more general, and adjust > > the current callers in cmd_fetch and update-clone. > > > > As a proof of the utility of the change, start using the function also > > in repo_read_gitmodules which was b

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-20 Thread Antonio Ospite
to be generic config, but I still see some value in having a single point when its _location_ is decided. > > Add a repo argument to it to make the function more general, and adjust > > the current callers in cmd_fetch and update-clone. > > This could be a preparatory patch, but

Re: [RFC PATCH v2 7/7] git-rebase: make --allow-empty-message the default

2018-06-20 Thread Elijah Newren
a flag. We'd like to warn against that kind of poor practice. However, that implicitly means that commands which build on top of git-commit might copy that default even when it doesn't make sense. So it's not at all clear to me that cherry-pick or rebase -i/-m should have the same def

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-20 Thread Elijah Newren
Hi Dscho, On Sun, Jun 17, 2018 at 2:44 PM, Johannes Schindelin wrote: > I was really referring to speed. But I have to admit that I do not have > any current numbers. > > Another issue just hit me, though: rebase --am does not need to look at as > many Git objects as rebase --merge or rebase -i.

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-18 Thread Junio C Hamano
Eric Sunshine writes: > On Sun, Jun 17, 2018 at 1:32 PM Kaartic Sivaraam > wrote: >> On Friday 15 June 2018 01:13 PM, Eric Sunshine wrote: >> > On Fri, Jun 15, 2018 at 2:58 AM Simon Ruderich wrote: >> >> Should we put the part about MacOS's make int

Re: Doc/SubmittingPatches: re-phrashing a sentence about alternate solutions (was Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv")

2018-06-17 Thread Jeff King
On Sun, Jun 17, 2018 at 11:55:33PM +0530, Kaartic Sivaraam wrote: > On Sun, 2018-06-17 at 14:00 -0400, Eric Sunshine wrote: > > Whether or not to talk about alternate solutions in the commit message > > is a judgment call. Same for deciding what belongs in the commit > > message proper and what be

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-17 Thread Johannes Schindelin
ehind this commit instead. > > Going to dump the hard job on Eric, eh? ;-) Just trying to learn how to delegate. :0) > > IMHO `git rebase -i` is still too slow to be a true replacement for > > `git rebase --am` for the cases where it serves the user well. Maybe > > we sh

Doc/SubmittingPatches: re-phrashing a sentence about alternate solutions (was Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv")

2018-06-17 Thread Kaartic Sivaraam
nd it to be more "humane" than the terse bullets. But I refrained from doing so as the document is already a bit too-long ;-) > Perhaps, instead, it can be re-worded a bit to make it sound something > other than mandatory (but I can't think of a good way to phrase it; > maybe

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-17 Thread Eric Sunshine
On Sun, Jun 17, 2018 at 1:32 PM Kaartic Sivaraam wrote: > On Friday 15 June 2018 01:13 PM, Eric Sunshine wrote: > > On Fri, Jun 15, 2018 at 2:58 AM Simon Ruderich wrote: > >> Should we put the part about MacOS's make into the commit > >> message? Seems like

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-17 Thread Kaartic Sivaraam
iff -w" helps. An alternative to re-indenting would have been to >>> "undefine NEEDS_LIBICONV", however, 'undefine' was added to GNU make in >>> 3.82 but MacOS is stuck on 3.81 (from 2006) so 'undefine' was avoided. >> >> Should we put t

Re: [RFC PATCH v2 7/7] git-rebase: make --allow-empty-message the default

2018-06-17 Thread Phillip Wood
Hi Elijah On 17/06/18 06:58, Elijah Newren wrote: am-based rebases already apply commits with an empty commit message without requiring the user to specify an extra flag. Make merge-based and interactive-based rebases behave the same. Signed-off-by: Elijah Newren --- Documentation/git

[RFC PATCH v2 7/7] git-rebase: make --allow-empty-message the default

2018-06-16 Thread Elijah Newren
am-based rebases already apply commits with an empty commit message without requiring the user to specify an extra flag. Make merge-based and interactive-based rebases behave the same. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 10 -- git-rebase.sh

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-15 Thread Mahmoud Al-Qudsi
On Thu, Jun 14, 2018 at 9:25 PM, Eric Sunshine wrote: > The Makefile tweak NO_ICONV is meant to allow Git to be built without > iconv in case iconv is not installed or is otherwise dysfunctional. > However, NO_ICONV's disabling of iconv is incomplete and can incorrectly > allow "-liconv" to slip i

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-15 Thread Eric Sunshine
ave been to > > "undefine NEEDS_LIBICONV", however, 'undefine' was added to GNU make in > > 3.82 but MacOS is stuck on 3.81 (from 2006) so 'undefine' was avoided. > > Should we put the part about MacOS's make into the commit > message? Seems like relevant i

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Simon Ruderich
cedence over > NEEDS_LIBICONV. > > Reported by: Mahmoud Al-Qudsi > Signed-off-by: Eric Sunshine > --- > > This patch is extra noisy due to the indentation change. Viewing it with > "git diff -w" helps. An alternative to re-indenting would have been to > "

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Jeff King
On Fri, Jun 15, 2018 at 02:30:43AM -0400, Eric Sunshine wrote: > On Fri, Jun 15, 2018 at 12:20 AM Jeff King wrote: > > We have OLD_ICONV, too, which should probably do nothing if NO_ICONV is > > set. I think that works OK. We end up setting -DOLD_ICONV on the command > > line, but that's only con

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Eric Sunshine
On Fri, Jun 15, 2018 at 12:20 AM Jeff King wrote: > We have OLD_ICONV, too, which should probably do nothing if NO_ICONV is > set. I think that works OK. We end up setting -DOLD_ICONV on the command > line, but that's only consider inside "#ifndef NO_ICONV" within the > code. Right, that was my c

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Jeff King
s patch is extra noisy due to the indentation change. Viewing it with > "git diff -w" helps. An alternative to re-indenting would have been to > "undefine NEEDS_LIBICONV", however, 'undefine' was added to GNU make in > 3.82 but MacOS is stuck on 3.81 (from 2006) so 'undefine' was avoided. Yeah, with "-w" it looks pretty obviously correct. -Peff

[PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Eric Sunshine
to the indentation change. Viewing it with "git diff -w" helps. An alternative to re-indenting would have been to "undefine NEEDS_LIBICONV", however, 'undefine' was added to GNU make in 3.82 but MacOS is stuck on 3.81 (from 2006) so 'undefine' was avoi

[PATCH v3 5/7] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Jonathan Tan
Reduce the number of global variables by making the priority queue and the count of non-common commits in it local, passing them as a struct to various functions where necessary. This also helps in the case that fetch_pack() is invoked twice in the same process (when tag following is required when

Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Junio C Hamano
Jonathan Tan writes: > -static struct prio_queue rev_list = { compare_commits_by_commit_date }; > -static int non_common_revs, multi_ack, use_sideband; > +struct data { > + struct prio_queue rev_list; > + int non_common_revs; > +}; > + > +static int multi_ack, use_sideband; Aside from Br

Re: [PATCH v2 6/8] fetch: refactor to make function args narrower

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Refactor find_non_local_tags and get_ref_map to only take the > information they need instead of the entire transport struct. Besides > improving code clarity, this also improves their flexibility, allowing > for a different set of refs t

Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Brandon Williams
date that call to clear in this patch so that you don't forget any memory leaks. I know this may still change later on in this series but it should still get taken care of to make the review process easier. > > Signed-off-by: Jonathan Tan > --- > fetch-pack.c | 104

[PATCH v2 6/8] fetch: refactor to make function args narrower

2018-06-13 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport st

[RFC PATCH v2 1/4] git-credential-netrc: make "all" default target of Makefile

2018-06-12 Thread Todd Zullinger
Running "make" in contrib/credential/netrc should run the "all" target rather than the "test" target. Add an empty "all::" target like most of our other Makefiles. Signed-off-by: Todd Zullinger --- contrib/credential/netrc/Makefile | 3 +++ 1 file change

Re: [PATCH 05/10] t0064: make hash size independent

2018-06-11 Thread brian m. carlson
On Mon, Jun 11, 2018 at 04:09:05AM -0400, Eric Sunshine wrote: > On Mon, Jun 4, 2018 at 7:52 PM, brian m. carlson > wrote: > > test_expect_success 'lookup with almost duplicate values' ' > > + # n-1 5s > > + root=$(test_translate 555 \ > > +

Re: [PATCH 0/2] Object store refactoring: make bitmap_git not global

2018-06-11 Thread Stefan Beller
On Thu, Jun 7, 2018 at 12:04 PM Jonathan Tan wrote: > > This is a continuation of the object store refactoring effort. > > We cannot truly free an object store without ensuring that any generated > bitmaps are first freed, so here are patches to drastically reduce the > lifetime of any bitmaps gen

Re: [PATCH 05/10] t0064: make hash size independent

2018-06-11 Thread Eric Sunshine
On Mon, Jun 4, 2018 at 7:52 PM, brian m. carlson wrote: > Compute test values of the appropriate size instead of hard-coding > 40-character values. Rename the echo20 function to echoid, since the > values may be of varying sizes. > > Signed-off-by: brian m. carlson > --- > diff --git a/t/t0064-s

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-09 Thread Elijah Newren
l let Eric comment on the grammar, and I'll comment on the idea behind > this commit instead. Going to dump the hard job on Eric, eh? ;-) > IMHO `git rebase -i` is still too slow to be a true replacement for `git > rebase --am` for the cases where it serves the user well. Maybe

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-09 Thread Johannes Schindelin
`git rebase --am` for the cases where it serves the user well. Maybe we should work on making `rebase -i` faster, first? I imagine, for example, that it might make *tons* of sense to avoid writing out the index and worktree files all the time. That was necessary in the shell script version because if

[PATCH 0/2] Object store refactoring: make bitmap_git not global

2018-06-07 Thread Jonathan Tan
This is a continuation of the object store refactoring effort. We cannot truly free an object store without ensuring that any generated bitmaps are first freed, so here are patches to drastically reduce the lifetime of any bitmaps generated. As a bonus, the API is also improved, and global state r

[RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-07 Thread Elijah Newren
dates were made as part of previous patches to note which sets of options were incompatible. However, adding a new --am option allows us to make it clear which options imply this machinery and simplify the discussion of incompatible sets of options significantly. testcase modification

[RFC PATCH 1/2] git-credential-netrc: make "all" default target of Makefile

2018-06-06 Thread Todd Zullinger
Running "make" in contrib/credential/netrc should run the "all" target rather than the "test" target. Add an empty "all::" target like most of our other Makefiles. Signed-off-by: Todd Zullinger --- contrib/credential/netrc/Makefile | 3 +++ 1 file change

[PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-06 Thread Jonathan Tan
Reduce the number of global variables by making the priority queue and the count of non-common commits in it local, passing them as a struct to various functions where necessary. This also helps in the case that fetch_pack() is invoked twice in the same process (when tag following is required when

[PATCH v4 23/23] cache.h: make the_index part of "compatibility macros"

2018-06-06 Thread Nguyễn Thái Ngọc Duy
While the_index is not actually a macro, its use throughout the code base is dangerous because developers sometimes may not see that some function is using the_index (instead of some other index that the devs are interested in). By keeping the_index part of this NO_ macro, we try to reduce its use

[PATCH v3 20/20] cache.h: make the_index part of "compatibility macros"

2018-06-06 Thread Nguyễn Thái Ngọc Duy
While the_index is not actually a macro, its use throughout the code base is dangerous because developers sometimes may not see that some function is using the_index (instead of some other index that the devs are interested in). By keeping the_index part of this NO_ macro, we try to reduce its use

Re: [PATCH 4/6] fetch-pack: make negotiation-related vars local

2018-06-05 Thread Jonathan Tan
gt; 'void' (which I suppose is the idea). How about something like > 'struct negotiation_data' or 'fetch_negotiator_data' in this patch? > That way this last paragraph of the commit message wouldn't be needed. I wanted to make it easier to review the subseque

Re: [PATCH 4/6] fetch-pack: make negotiation-related vars local

2018-06-05 Thread Jonathan Nieder
Jonathan Tan wrote: > Reduce the number of global variables by making the priority queue and > the count of non-common commits in it local, passing them as a struct to > various functions where necessary. \o/ > This also helps in the case that fetch_pack() is invoked twice in the > same process

[PATCH 6/8] fetch: refactor to make function args narrower

2018-06-05 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport st

[PATCH 09/10] t1406: make hash-size independent

2018-06-04 Thread brian m. carlson
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson --- t/t1406-submodule-ref-store.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodu

[PATCH 10/10] t1407: make hash size independent

2018-06-04 Thread brian m. carlson
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson --- t/t1407-worktree-ref-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-re

[PATCH 05/10] t0064: make hash size independent

2018-06-04 Thread brian m. carlson
Compute test values of the appropriate size instead of hard-coding 40-character values. Rename the echo20 function to echoid, since the values may be of varying sizes. Signed-off-by: brian m. carlson --- t/t0064-sha1-array.sh | 49 --- 1 file changed, 27

[PATCH 08/10] t1405: make hash size independent

2018-06-04 Thread brian m. carlson
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson --- t/t1405-main-ref-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh i

<    6   7   8   9   10   11   12   13   14   15   >