Re: [PATCH RFC] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-09 Thread Jacob Keller
On Tue, Aug 9, 2016 at 3:50 PM, Stefan Beller <sbel...@google.com> wrote: > On Tue, Aug 9, 2016 at 3:32 PM, Jacob Keller <jacob.e.kel...@intel.com> wrote: >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> For projects which have frequent updates to subm

[PATCH RFC] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-09 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> For projects which have frequent updates to submodules it is often useful to be able to see a submodule update commit as a difference. Teach diff's --submodule= a new "diff" format which will execute a diff for the submodule between

[PATCH] completion: add completion for --submodule=* diff option

2016-08-09 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Teach git-completion.bash to complete --submodule= for git commands which take diff options. Also teach completion for git-log to support --diff-algorithms as well. Signed-off-by: Jacob Keller <jacob.kel...@gmail.com> --- contrib/co

Re: [PATCHv2 0/6] git clone: Marry --recursive and --reference

2016-08-08 Thread Jacob Keller
On Mon, Aug 8, 2016 at 9:08 PM, Stefan Beller wrote: > > v3: > > Thanks to Junios critial questions regarding the design, I took a step back > to look at the bigger picture. > > --super-reference sounds confusing. (what is the super referring to?) > So drop that approach. > >

Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs

2016-08-03 Thread Jacob Keller
On Wed, Aug 3, 2016 at 3:36 PM, Michael Haggerty <mhag...@alum.mit.edu> wrote: > On 08/04/2016 12:29 AM, Jacob Keller wrote: >> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty <mhag...@alum.mit.edu> >> wrote: >> It seems odd to be that a line with "199"

Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs

2016-08-03 Thread Jacob Keller
On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote: > +/* > + * If a line is indented more than this, get_indent() just returns this > value. > + * This avoids having to do absurd amounts of work for data that are not > + * human-readable text, and also ensures that the

Re: Feature request for automatic worktree checkout

2016-07-18 Thread Jacob Keller
On Mon, Jul 18, 2016 at 11:33 AM, Junio C Hamano wrote: > Ehsan Azarnasab writes: > >> Currently if I have a branch checked out in a work-tree, git-checkout >> will show this error message when checking out that branch: >> >> $ git checkout master >>

Re: git branch doesn't allow me to forcibly delete branch which was checked out in a now-deleted worktree dir

2016-07-08 Thread Jacob Keller
On Fri, Jul 8, 2016 at 7:22 PM, Erik Johnson <paleh...@gmail.com> wrote: > On Fri, Jul 08, 2016 at 05:41:17PM -0700, Jacob Keller wrote: >> It is possible we should update "git branch -d" should perform a >> worktree prune first, since that would enable it t

Re: Fast-forward able commit, otherwise fail

2016-07-08 Thread Jacob Keller
On Fri, Jul 8, 2016 at 3:19 PM, Junio C Hamano wrote: > David Lightle writes: >> In fact, I just noticed that GitLab has built in the functionality I'm >> looking for even, which is what they call "Merge commit with >> semi-linear history" but I'm asking

Re: git branch doesn't allow me to forcibly delete branch which was checked out in a now-deleted worktree dir

2016-07-08 Thread Jacob Keller
On Thu, Jul 7, 2016 at 5:36 PM, Erik Johnson wrote: > I'm not expecting _any_ git branch command to prune worktrees, but a > branch _deletion_ shouldn't fail because git thinks the branch is > checked out in a worktree that doesn't exist anymore. Even in the > scenario where

Re: git branch doesn't allow me to forcibly delete branch which was checked out in a now-deleted worktree dir

2016-07-07 Thread Jacob Keller
On Thu, Jul 7, 2016 at 11:44 AM, Erik Johnson wrote: > % git branch -D archive-extracted-xz > error: Cannot delete branch 'archive-extracted-xz' checked out at > '/home/erik/git/salt/archive-extracted-xz' > % test -d /home/erik/git/salt/archive-extracted-xz || echo "directory

Re: Over-/underquoting, was Re: [PATCH] revert: clarify seemingly bogus OPT_END repetition

2016-07-06 Thread Jacob Keller
On Wed, Jul 6, 2016 at 6:16 AM, Johannes Schindelin wrote: >> Johannes Schindelin venit, vidit, dixit 06.07.2016 09:01: >> OTOH, I often have to look up the original message because people cut >> too much, or because they take one sentence out of context. > > And

Re: [PATCH] revert: clarify seemingly bogus OPT_END repetition

2016-07-05 Thread Jacob Keller
On Tue, Jul 5, 2016 at 1:44 PM, Jeff King wrote: > On Tue, Jul 05, 2016 at 04:28:20PM -0400, Jeff King wrote: > >> I wonder if parse_options_concat should simply allocate a new list >> (after computing the total required size). I guess this is the only >> caller, though, so perhaps

Re: [PATCH] verify-tag: allow to verify signed blob objects

2016-06-15 Thread Jacob Keller
On Wed, Jun 15, 2016 at 12:24 PM, Junio C Hamano wrote: > Michael J Gruber writes: > >>> Or even >>> >>> if ((flags & GPG_VERIFY_BLOB) && (type != OBJ_BLOB)) >>> "you told me to check blob but didn't give me one"; >>> }

Re: [PATCH] fetch: document that pruning happens before fetching

2016-06-14 Thread Jacob Keller
On Mon, Jun 13, 2016 at 11:17 PM, Jeff King <p...@peff.net> wrote: > On Mon, Jun 13, 2016 at 11:14:36PM -0700, Jacob Keller wrote: > >> On Mon, Jun 13, 2016 at 4:58 PM, Jeff King <p...@peff.net> wrote: >> > This was changed in 10a6cc8 (fetch --prune: Run prune

Re: [PATCH] fetch: document that pruning happens before fetching

2016-06-14 Thread Jacob Keller
On Mon, Jun 13, 2016 at 4:58 PM, Jeff King wrote: > This was changed in 10a6cc8 (fetch --prune: Run prune before > fetching, 2014-01-02), but it seems that nobody in that > discussion realized we were advertising the "after" > explicitly. > > Signed-off-by: Jeff King

Re: [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Jacob Keller
On Fri, Jun 10, 2016 at 9:25 AM, Stefan Beller wrote: > On Fri, Jun 10, 2016 at 8:56 AM, Junio C Hamano wrote: >> Jeff King writes: >> >>> On Fri, Jun 10, 2016 at 03:50:43AM -0400, Jeff King wrote: >>> I found a false positive with the

Re: Coccinelle for automated refactors

2016-06-06 Thread Jacob Keller
On Mon, Jun 6, 2016 at 11:55 AM, Junio C Hamano wrote: > "brian m. carlson" writes: > >> An example semantic patch looks like this: >> >> @@ >> expression E1; >> @@ >> - is_null_sha1(E1.hash) >> + is_null_oid() >> >> @@ >> expression E1; >> @@ >>

Re: wishlist; unify behavior while cloning non-bare repos over http to be in line with ssh/local

2016-05-10 Thread Jacob Keller
On Tue, May 10, 2016 at 1:11 PM, Junio C Hamano wrote: > Yaroslav Halchenko writes: > >> On Fri, 06 May 2016, Yaroslav Halchenko wrote: >> >>> Dear Git Folks, >> >>> Originally this issue was mentioned in previous thread [1], and I have >>> decided >>> to

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-05-03 Thread Jacob Keller
On Mon, May 2, 2016 at 11:02 AM, Jeff King wrote: > On Mon, May 02, 2016 at 10:40:28AM -0700, Junio C Hamano wrote: > >> "Keller, Jacob E" writes: >> >> > True. I think the chances that it needs such a thing are quite minor, >> > and if an undocumented

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-29 Thread Jacob Keller
On Fri, Apr 29, 2016 at 1:29 PM, Junio C Hamano wrote: > Jeff King writes: > >> ... Having the two directly next to each other reads >> better to me. This is a pretty unusual diff, though, in that it did >> change the surrounding whitespace (and if you look

Re: [PATCH 0/5] fixes for sanitized submodule config

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:56 AM, Stefan Beller wrote: > On Thu, Apr 28, 2016 at 7:02 AM, Johannes Schindelin > wrote: >> Hi Peff, >> >> On Thu, 28 Apr 2016, Jeff King wrote: >> >>> On Thu, Apr 28, 2016 at 08:17:53AM -0400, Jeff King wrote: >>> >>>

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:36 AM, Jeff King <p...@peff.net> wrote: > On Thu, Apr 28, 2016 at 08:28:29AM -0700, Jacob Keller wrote: > >> > diff --git a/git-submodule.sh b/git-submodule.sh >> > index 2a84d7e..3a40d4b 100755 >> > --- a/git-submodule.sh >> &

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 6:49 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 02:19:37PM +0200, Johannes Schindelin wrote: > >> > Should we consider just white-listing all of "http.*"? >> > >> > That would help other cases which have come up, like: >> > >> >

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 6:37 AM, Jeff King wrote: > Commit 14111fc (git: submodule honor -c credential.* from > command line, 2016-02-29) taught git-submodule.sh to save > the sanitized value of $GIT_CONFIG_PARAMETERS when clearing > the environment for a submodule. However, it

Re: [PATCH 1/5] t5550: fix typo in $HTTPD_URL

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:25 AM, Jeff King <p...@peff.net> wrote: > On Thu, Apr 28, 2016 at 08:24:05AM -0700, Jacob Keller wrote: > >> On Thu, Apr 28, 2016 at 6:36 AM, Jeff King <p...@peff.net> wrote: >> > Commit 14111fc (git: submodule honor -c credential.* f

Re: [PATCH 2/5] t5550: break submodule config test into multiple sub-tests

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:21 AM, Stefan Beller wrote: > On Thu, Apr 28, 2016 at 6:37 AM, Jeff King wrote: >> Right now we test only the cloning case, but there are other >> interesting cases (e.g., fetching). Let's pull the setup >> bits into their own test,

Re: [PATCH 1/5] t5550: fix typo in $HTTPD_URL

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 6:36 AM, Jeff King wrote: > Commit 14111fc (git: submodule honor -c credential.* from > command line, 2016-02-29) accidentally wrote $HTTP_URL. It > happened to work because we ended up with "credential..helper", > which we treat the same as

Re: Bisect limited to Merge Commits

2016-04-28 Thread Jacob Keller
On Wed, Apr 27, 2016 at 11:19 PM, Hagen Paul Pfeifer wrote: > * Johannes Sixt | 2016-04-27 23:33:53 [+0200]: > > Hey Junio, hey Hannes, > >> git bisect start >> git rev-list --first-parent --boundary origin..origin/pu | >> sed -ne s/-//p | xargs git bisect good >> git bisect bad

Re: [PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Jacob Keller
On Tue, Apr 26, 2016 at 4:19 PM, Stefan Beller <sbel...@google.com> wrote: > On Tue, Apr 26, 2016 at 3:50 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: >> On Tue, Apr 26, 2016 at 1:50 PM, Stefan Beller <sbel...@google.com> wrote: >>> When adding new submodu

Re: [PATCH 03/15] submodule add: label submodules if asked to

2016-04-26 Thread Jacob Keller
On Tue, Apr 26, 2016 at 1:50 PM, Stefan Beller wrote: > When adding new submodules, you can specify the > label(s) the submodule belongs to by giving one or more > --label arguments. This will record each label in the > .gitmodules file as a value of the key >

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-25 Thread Jacob Keller
LFS runs a special command to download and replace all LFS >> content in bulk [3]. This works great for LFS repositories. >> >> However, I noticed that git config command line instructions such as >> "-c filter.lfs.smudge=" are not passed to Git submodule operations. Thu

Re: [PATCH 2/3] githooks.txt: Amend dangerous advice about 'update' hook ACL

2016-04-24 Thread Jacob Keller
On Sun, Apr 24, 2016 at 1:20 PM, Ævar Arnfjörð Bjarmason wrote: > Any ACL you implement via an 'update' hook isn't actual access control > if the user has login access to the machine running git, because they > can trivially just built their own git version which doesn't run the

Re: problems serving non-bare repos with submodules over http

2016-04-21 Thread Jacob Keller
On Thu, Apr 21, 2016 at 10:48 AM, Stefan Beller wrote: > On Thu, Apr 21, 2016 at 10:45 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> In case of non bare: >>> >>> Get the repo and all its submodules from the specified

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Jacob Keller
On Tue, Apr 19, 2016 at 10:06 AM, Jeff King wrote: > On Tue, Apr 19, 2016 at 08:17:38AM -0700, Stefan Beller wrote: > >> On Mon, Apr 18, 2016 at 10:03 PM, Jeff King wrote: >> >> > I guess this will invalidate old patch-ids, but there's not much to be >> > done about

Re: [PATCH 2/2] mv: allow moving nested submodules

2016-04-19 Thread Jacob Keller
but I think the resulting code is much easier to follow. The use of the continue allows us to drop a layer of indentation making the remaining code a bit easier on the eyes. The patch description doesn't at first glance match the code change, since now it's a much larger chunk of moved c

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-18 Thread Jacob Keller
rest > of the context above. > > This heuristic appears to resolve the above example and several other > common issues without producing significantly weird results. However, as > with any heuristic it is not really known whether this will always be > more optimal. Thus, it can b

Re: git merge branch --no-commit does commit fast forward merges

2016-04-17 Thread Jacob Keller
On Sun, Apr 17, 2016 at 2:10 PM, Christoph Paulik wrote: > > Hi Git Mailinglist, > git merge branch --no-commit does commit fast forward merges leaving users > no way to change the merge results. The command only works as expected when > also adding the --no-ff flag. Looking at

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 5:49 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +static int line_length(const char *recs) >> +{ >> + char *s = strchr(recs, '\n'); >> + return s ? s - recs : strlen(recs); >> +} > > It seems that you guys are

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 4:05 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: > There's a few places that will need cleaning up (comments and such) > that mention empty line still, but that's not surprising. I am going > to test this for a bit on my local repos, and see

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
r name(?) > There's a few places that will need cleaning up (comments and such) that mention empty line still, but that's not surprising. I am going to test this for a bit on my local repos, and see if it makes any difference to the old heuristic as well. Thanks, Jake > Signed-off-by

[RFC PATCH, WAS: "weird diff output?" v3 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function recs_match which perform

[RFC PATCH, WAS: "weird diff output?" v3 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
* Add tests * Add better/more documentation explaining the heuristic, possibly with examples(?) * better name(?) Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- Documentation/diff-config.txt | 6 ++ Documentation/dif

[RFC PATCH, WAS: "weird diff output?" v3 0/2] implement empty line diff chunk heuristic

2016-04-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Third version of my series with a few more minor fixups. I left the diff command line and configuration option alone for now, suspecting that long term we either (a) remove it or (b) use a gitattribute, so there is no reason to bikeshed the name

Re: [RFC PATCH, WAS: "weird diff output?" v2 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 3:46 PM, Jeff King <p...@peff.net> wrote: > On Fri, Apr 15, 2016 at 02:56:21PM -0700, Jacob Keller wrote: > >> @@ -470,8 +477,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, >> long flags) { >>* the line ne

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 2:44 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >>>> What you have is a pure developer support; aim to come up with "good >>>> enough" way, giving developers an easi

[RFC PATCH, WAS: "weird diff output?" v2 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
* Add tests * Add better/more documentation explaining the heuristic, possibly with examples(?) * better name(?) Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- Documentation/diff-config.txt | 6 ++ Documentation/dif

[RFC PATCH, WAS: "weird diff output?" v2 0/2] implement empty line diff chunk heuristic

2016-04-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Second version of my series with a few more minor fixups. I left the diff command line and configuration option alone for now, suspecting that long term we either (a) remove it or (b) use a gitattribute, so there is no reason to bikeshed the name

[RFC PATCH, WAS: "weird diff output?" v2 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function recs_match which perform

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 2:15 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: > On Fri, Apr 15, 2016 at 1:30 PM, Junio C Hamano <gits...@pobox.com> wrote: >> Jacob Keller <jacob.kel...@gmail.com> writes: >> >>> On Fri, Apr 15, 2016 at 1:06 PM, Junio C Ha

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 1:30 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano <gits...@pobox.com> wrote: >> >>> I actually do not think these knobs sh

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> +diff.emptyLineHeuristic:: >> >> I was looking at the TODO here and thought about the name: >> It should not encode the `emptyLine` into the config option as >> it is only

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 12:57 PM, Stefan Beller wrote: > I was looking at the TODO here and thought about the name: > It should not encode the `emptyLine` into the config option as > it is only one of many heuristics. > > It should be something like

Re: [RFC PATCH, WAS: "weird diff output?" 1/2] xdiff: add xdl_hash_and_recmatch helper function

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:25 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> It is a common pattern in xdl_change_compact to check that hashes and >&

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:33 AM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 10:27 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> Actually we would only need to have the empty line count in the >>> second loop as the

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:10 AM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 10:02 AM, Stefan Beller wrote: >>> @@ -458,11 +458,11 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, >>> long flags) { >>> * the group. >>>

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:02 AM, Stefan Beller <sbel...@google.com> wrote: > On Fri, Apr 15, 2016 at 9:51 AM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> I took up Stefan's patch, and modifie

[RFC PATCH, WAS: "weird diff output?" 1/2] xdiff: add xdl_hash_and_recmatch helper function

2016-04-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function xdl_hash_and_recmatch

[RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
* Add tests * Add better/more documentation explaining the heuristic, possibly with examples(?) * better name(?) Signed-off-by: Stefan Beller <sbel...@google.com> Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- Documentation/diff-config.txt | 6 ++ Documentation/dif

[RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> I took up Stefan's patch, and modified it to resolve a couple issues. I also tried to implement the suggestions from Junio's review, as well as the suggestions I had. It appears to produce equivalent output as Jeff's script. This version is

Re: [RFC PATCH, WAS: "weird diff output?"] Implement better chunk heuristics.

2016-04-14 Thread Jacob Keller
On Thu, Apr 14, 2016 at 5:43 PM, Stefan Beller <sbel...@google.com> wrote: > On Thu, Apr 14, 2016 at 5:26 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: >> On Thu, Apr 14, 2016 at 5:07 PM, Stefan Beller <sbel...@google.com> wrote: >>> TODO(sbeller):

Re: [RFC PATCH, WAS: "weird diff output?"] Implement better chunk heuristics.

2016-04-14 Thread Jacob Keller
On Thu, Apr 14, 2016 at 5:07 PM, Stefan Beller wrote: > TODO(sbeller): > * describe the discussion on why this is better > * see if this can be tested? > Thanks for taking time to do this! It looks like a few things are still missing, CRLF obviously, and making it a

Re: weird diff output?

2016-04-14 Thread Jacob Keller
On Thu, Apr 14, 2016 at 2:05 PM, Stefan Beller wrote: > On Thu, Apr 14, 2016 at 11:34 AM, Jeff King wrote: >> On Thu, Apr 14, 2016 at 06:56:39AM -0700, Davide Libenzi wrote: >> >>> That was a zillions of years ago :) , but from a quick look at email >>> thread,

Re: [PATCH 3/3] clone: add t5614 to test cloning submodules with shallowness involved

2016-04-13 Thread Jacob Keller
On Tue, Apr 12, 2016 at 4:48 PM, Stefan Beller wrote: > There are some inherent issues with shallow clones and submodules, such > as having not having a commit available the superproject may point to > in the submodule due to being shallow. Use the new file t5614 to document >

Re: [PATCH] format-patch: allow --no-patch to disable patch output

2016-04-08 Thread Jacob Keller
On Fri, Apr 8, 2016 at 11:30 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> So if I want to get the summary of a patch out of a commit without the >> actual diff what would you suggest? > > "git log --

Re: [PATCH] git-format-patch.txt: don't show -s as shorthand for multiple options

2016-04-08 Thread Jacob Keller
On Mon, Apr 4, 2016 at 12:32 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> Documentation/diff-options.txt | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt >> index

Re: [PATCH] format-patch: allow --no-patch to disable patch output

2016-04-08 Thread Jacob Keller
On Thu, Apr 7, 2016 at 2:30 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Thu, Apr 7, 2016 at 12:46 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> The documentation for format-patch indicates that --no-patch wilL >> suppress patch output. It als

[PATCH] format-patch: allow --no-patch to disable patch output

2016-04-07 Thread Jacob Keller
as expected. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- Documentation/diff-options.txt | 2 ++ builtin/log.c | 4 ++-- t/t4014-format-patch.sh| 26 ++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Documen

Re: weird diff output?

2016-04-06 Thread Jacob Keller
On Thu, Mar 31, 2016 at 6:47 AM, Jeff King <p...@peff.net> wrote: > On Wed, Mar 30, 2016 at 12:31:30PM -0700, Jacob Keller wrote: > >> So far I've only found a single location that ends up looking worse >> within the Linux kernel. Diffs of some Kbuild settings res

Re: Bug Report

2016-04-02 Thread Jacob Keller
Hi, On Sat, Apr 2, 2016 at 5:25 PM, Benjamin Sandeen wrote: > Today, I managed to create a duplicate branch in a git repository. While > this may not be a bug per se, I do think that it is confusing and some way > of preventing such issues in the future

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

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

Re: weird diff output?

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

Re: weird diff output?

2016-03-30 Thread Jacob Keller
On Tue, Mar 29, 2016 at 11:05 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: > On Tue, Mar 29, 2016 at 9:55 PM, Jeff King <p...@peff.net> wrote: >> One thing I like to do when playing with new diff ideas is to pipe all >> of "log -p" for a real projec

Re: weird diff output?

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

Re: weird diff output?

2016-03-29 Thread Jacob Keller
On Tue, Mar 29, 2016 at 11:16 AM, Stefan Beller wrote: > On Tue, Mar 29, 2016 at 10:54 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> I thought this is an optimization for C code where you have a diff like: >>> >>> int

weird diff output?

2016-03-28 Thread Jacob Keller
On Mon, Mar 28, 2016 at 4:28 PM, Stefan Beller wrote: > cat > expect < +Entering '../nested1' > +Entering '../nested1/nested2' > +Entering '../nested1/nested2/nested3' > +Entering '../nested1/nested2/nested3/submodule' > +Entering '../sub1' > +Entering '../sub2' > +Entering

Re: [RFC/GSOC] Git Beginner | Warnings for potentially destructive commands

2016-03-27 Thread Jacob Keller
On Sat, Mar 26, 2016 at 8:12 AM, Matthieu Moy <matthieu@grenoble-inp.fr> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> If possible, I would suggest aiming for generating the actual topology >> that the user is seeing, customized so that it gives re

Re: [RFC/GSOC] Git Beginner | Warnings for potentially destructive commands

2016-03-25 Thread Jacob Keller
On Fri, Mar 25, 2016 at 10:38 AM, Junio C Hamano wrote: > The above two examples make me wonder if these should be static > text. "ggit rebase" and "ggit reset" have full information of the > concrete branch names, commit object names and the actual topology > of the history,

Re: [RFD] minor frustration in 'git add' pathname completion

2016-03-24 Thread Jacob Keller
On Thu, Mar 24, 2016 at 3:55 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> If I were to explicitly ignore that file, then even though I know >>> whats-cooking.txt is not ignored, >>> >>>$ git add whats-coo >>> >>> would not offer anything.

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-24 Thread Jacob Keller
el...@google.com> > --- It is nice to see the format for doing this standardized, and reduce extra code in the submodule--helper. I had wondered why we used --prefix before. Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com> > builtin/submodule--helper.c | 5 + > git-subm

Re: [PATCH 2/4] submodule: fix recursive execution from non root directory

2016-03-24 Thread Jacob Keller
s > ) || > @@ -1240,6 +1242,7 @@ cmd_sync() > > if test -n "$recursive" > then > + wt_prefix= And here I think I see why we moved the original prefix

Re: [PATCH 1/4] submodule: fix recursive path printing from non root directory

2016-03-24 Thread Jacob Keller
rigin_url" > > if test -n "$recursive" > then > - prefix="$prefix$sm_path/" > eval cmd_sync > fi > ) > -- > 2.8.0.rc4.10.g52f3f33 > Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com> Regards, Jake -- 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] git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS

2016-03-22 Thread Jacob Keller
On Tue, Mar 22, 2016 at 2:43 PM, Jonathan Nieder wrote: > Jeff King wrote[1]: > >> Subject: git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS >> >> The "git -c var=value" option stuffs the config value into >> $GIT_CONFIG_PARAMETERS, so that sub-processes can see

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

2016-03-15 Thread Jacob Keller
On Tue, Mar 15, 2016 at 9:47 AM, Karthik Nayak wrote: > Add support for %(objectname:short=) which would print the > abbreviated unique objectname of given length. When no length is > specified 7 is used. The minimum length is 'MINIMUM_ABBREV'. > Isn't the default

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

2016-03-15 Thread Jacob Keller
On Tue, Mar 15, 2016 at 9:47 AM, Karthik Nayak wrote: > diff --git a/Documentation/git-for-each-ref.txt > b/Documentation/git-for-each-ref.txt > index 193e99e..578bbd1 100644 > --- a/Documentation/git-for-each-ref.txt > +++ b/Documentation/git-for-each-ref.txt > @@ -116,10

Re: [RFC/GSoC] Introduction

2016-03-14 Thread Jacob Keller
On Sun, Mar 13, 2016 at 10:25 PM, Sidhant Sharma wrote: > > On Monday 14 March 2016 02:49 AM, Kevin Daudt wrote: >> On Mon, Mar 14, 2016 at 12:03:33AM +0530, Sidhant Sharma wrote: >>> Other than this, I also tried to expand the list of potentially destructive >>> commands

Re: [RFC/GSoC] Introduction

2016-03-14 Thread Jacob Keller
On Sun, Mar 13, 2016 at 10:25 PM, Sidhant Sharma <tigerkid...@gmail.com> wrote: > > On Monday 14 March 2016 04:58 AM, Jacob Keller wrote: >> On Sun, Mar 13, 2016 at 11:33 AM, Sidhant Sharma <tigerkid...@gmail.com> >> wrote: >>> Coincidentally, my appr

Re: [RFC/GSoC] Introduction

2016-03-13 Thread Jacob Keller
On Sun, Mar 13, 2016 at 11:33 AM, Sidhant Sharma wrote: > Coincidentally, my approach too is a wrapper around git as you suggest. > The approach is simple and straight forward, but I wasn't sure if it would be > accepted on the list, mainly because it may not look

Re: [PATCH 15/15] branch: implement '--format' option

2016-03-07 Thread Jacob Keller
On Sun, Mar 6, 2016 at 4:05 AM, Karthik Nayak wrote: > 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'. > s/tags/branches/ maybe? Thanks, Jake -- To

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

2016-03-07 Thread Jacob Keller
On Mon, Mar 7, 2016 at 3:08 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >> The "%(symref)" atom doesn't work when used with the ':short' modifier >> because we strictly match only 'symref' for setting the 'need_symref' >> indicator. Fix this by

Re: [PATCH 06/15] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams

2016-03-07 Thread Jacob Keller
On Sun, Mar 6, 2016 at 4:04 AM, Karthik Nayak wrote: > Borrowing from branch.c's implementation print "[gone]" whenever an > unknown upstream ref is encountered instead of just ignoring it. > > This makes sure that when branch.c is ported over to using ref-filter > APIs for

Re: Fsck configurations and cloning.

2016-03-05 Thread Jacob Keller
On Sat, Mar 5, 2016 at 5:44 PM, Ryne Everett wrote: > I'm assuming fsck configurations are supposed to apply to clones but > I'm having no luck: > > $ git --version > git version 2.7.2 > $ git config --get transfer.fsckobjects > true > $ git config --get

Re: [PATCH] Documentation: reword rebase summary

2016-03-01 Thread Jacob Keller
On Tue, Mar 1, 2016 at 2:49 PM, Stefan Beller wrote: > The wording is introduced in c3f0baaca (Documentation: sync git.txt > command list and manual page title, 2007-01-18), but rebase has evolved > since then, capture the modern usage by being more generic about the > rebase

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-03-01 Thread Jacob Keller
On Tue, Mar 1, 2016 at 11:07 AM, Junio C Hamano wrote: >> I could call expect_askpass here at each time but I don't think it >> would be meaningful after a test_must_fail. > > Even if you call expect_askpass to check, another set_askpass is > expected to start the next cycle

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-03-01 Thread Jacob Keller
On Tue, Mar 1, 2016 at 9:26 AM, Junio C Hamano wrote: > I find this in t/lib-httpd.sh: > > set_askpass() { > >"$TRASH_DIRECTORY/askpass-query" && > echo "$1" >"$TRASH_DIRECTORY/askpass-user" && > echo "$2"

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 3:39 PM, Stefan Beller <sbel...@google.com> wrote: > On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> >> +test_expect_success 'cmdline credential config passes into submodules' ' >> + git init

Re: [PATCH v6 5/7] submodule: fix segmentation fault in submodule--helper clone

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 3:20 PM, Stefan Beller wrote: > > I think this bug was put in, by "literally" translating from shell, > see ee8838d15776, where the shell code was rewritten to C, > specially: > > git clone $quiet ${depth:+"$depth"} -n ${reference:+"$reference"} \ >

[PATCH v6 2/7] submodule: don't pass empty string arguments to submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> When --reference or --depth are unused, the current git-submodule.sh results in empty "" arguments appended to the end of the argv array inside git submodule--helper clone. This is not caught because the argc count is not checked

[PATCH v6 1/7] t/lib-httpd: load mod_unixd

2016-02-29 Thread Jacob Keller
From: Michael J Gruber In contrast to apache 2.2, apache 2.4 does not load mod_unixd in its default configuration (because there are choices). Thus, with the current config, apache 2.4.10 will not be started and the httpd tests will not run on distros with default

[PATCH v6 4/7] submodule: fix submodule--helper clone usage

2016-02-29 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> git submodule--helper clone usage stated that paths were added after the [--] argument. The actual implementation required use of --path argument and only supports one path at a time. Update the usage string to match the current implementation.

<    3   4   5   6   7   8   9   10   11   >