[PATCH] log: add %S option (like --source) to log --format

2018-12-16 Thread Issac Trotts
Make it possible to write for example git log --format="%H,%S" where the %S at the end is a new placeholder that prints out the ref (tag/branch) for each commit. Using %d might seem like an alternative but it only shows the ref for the last commit in the branch. This change is based on

Re: pack file object size question

2018-12-16 Thread Jonathan Nieder
Hi, Farhan Khan wrote: >> Farhan Khan wrote: >>> I am having trouble figuring out the boundary between two objects in >>> the pack file. [...] > I think the issue is, the compressed object has a fixed > size and git inflates it, then moves on to the next object. I am > trying to figu

Re: pack file object size question

2018-12-16 Thread Farhan Khan
On Sun, Dec 16, 2018 at 5:15 PM Jonathan Nieder wrote: > > Hi, > > Farhan Khan wrote: > > > I am trying to write an implementation of "git index-pack" and having > > a bit of trouble with understanding the ".pack" format. Specifically, > > I am having trouble figuring out the boundary between two

[PATCH] gitweb: correctly store previous rev in javascript-actions mode

2018-12-16 Thread Jonathan Nieder
From: Robert Luberda Date: Sun, 16 Mar 2014 22:57:19 +0100 Without this change, the setting $feature{'javascript-actions'}{'default'} = [1]; in gitweb.conf breaks gitweb's blame page: clicking on line numbers displayed in the second column on the page has no effect. For comparison, with javas

Re: pack file object size question

2018-12-16 Thread Jonathan Nieder
Hi, Farhan Khan wrote: > I am trying to write an implementation of "git index-pack" and having > a bit of trouble with understanding the ".pack" format. Specifically, > I am having trouble figuring out the boundary between two objects in > the pack file. Have you seen Documentation/technical/pac

[PATCH v3 0/3]

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski Finally got around to submitting latest changes. I think this addresses all the feedback The atom now returns the worktree path instead of '+' I stuck to cyan for the coloring, since it seemed most popular I added one more change to display the worktree path in cyan

[PATCH v3 1/3] ref-filter: add worktreepath atom

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski Add an atom proving the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. --- Documentation/git-for-each-ref.txt | 4 +++ ref-filter.c | 70

[PATCH v3 2/3] branch: Mark and color a branch differently if it is checked out in a linked worktree

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski In order to more clearly display which branches are active, the output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in

[PATCH v3 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski --- builtin/branch.c | 4 1 file changed, 4 insertions(+) diff --git a/builtin/branch.c b/builtin/branch.c index 2a24153b78..56589a3684 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -366,6 +366,10 @@ static char *build_format(struct ref_filter *filter, i

pack file object size question

2018-12-16 Thread Farhan Khan
Hi all, I am trying to write an implementation of "git index-pack" and having a bit of trouble with understanding the ".pack" format. Specifically, I am having trouble figuring out the boundary between two objects in the pack file. It seems that there is a 12 byte header (signature, version, numb

Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-16 Thread Alban Gruin
Hi Junio, Le 09/12/2018 à 09:42, Junio C Hamano a écrit :> -%<- > * ag/sequencer-reduce-rewriting-todo (2018-11-12) 16 commits > . rebase--interactive: move transform_todo_file() to rebase--interactive.c > . sequencer: fix a call to error() in transform_todo_file() > . sequencer: use edit_todo_

Re: [PATCH] doc: short status for delete + intent-to-add

2018-12-16 Thread Duy Nguyen
On Sun, Dec 16, 2018 at 7:10 PM Anthony Sottile wrote: > > $ git rm foo > rm 'foo' > $ touch foo > $ git add --intent-to-add foo > $ git status --short > DA foo Twisted, but not wrong. It may also be a good idea to describe intent-to-add status, which is probably something like [ D]A

[PATCH] doc: short status for delete + intent-to-add

2018-12-16 Thread Anthony Sottile
$ git rm foo rm 'foo' $ touch foo $ git add --intent-to-add foo $ git status --short DA foo Signed-off-by: Anthony Sottile --- Documentation/git-status.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index d9f422

Re: [PATCH v2 0/3] A few Asciidoctor-fixes

2018-12-16 Thread Jeff King
On Sun, Dec 16, 2018 at 03:28:56PM +0100, Martin Ågren wrote: > This series addresses a few instances where our documentation renders > badly in Asciidoctor, compared to Asciidoc. The changes made are exactly > the same as in v1 [1], but the first commit message is corrected, and > the two patches

Re: [PATCH 0/4] A few Asciidoctor-fixes

2018-12-16 Thread Jeff King
On Sun, Dec 16, 2018 at 03:34:42PM +0100, Martin Ågren wrote: > Your list seems complete to me in terms of "how could we teach doc-diff > to diff asciidoctor vs asciidoc?". For the resulting diff to actually be > useful ;-) there are two more outstanding issues that I see: > > - Headers and foo

[PATCH v2] worktree: allow to (re)move worktrees with uninitialized submodules

2018-12-16 Thread Nguyễn Thái Ngọc Duy
Uninitialized submodules have nothing valueable for us to be worried about. They are just SHA-1. Let "worktree remove" and "worktree move" continue in this case so that people can still use multiple worktrees on repos with optional submodules that are never populated, like sha1collisiondetection in

Re: [PATCH 0/4] A few Asciidoctor-fixes

2018-12-16 Thread Martin Ågren
On Sun, 16 Dec 2018 at 11:45, Jeff King wrote: > > On Sat, Dec 15, 2018 at 12:27:38PM +0100, Martin Ågren wrote: > I think the relevant bits from [1] are: > > * Use `make --always-make ... install-man` in doc-diff. > * ./doc-diff -f HEAD HEAD # note -f > * Add empty commit and tweak config.mak

[PATCH v2 3/3] git-status.txt: render tables correctly under Asciidoctor

2018-12-16 Thread Martin Ågren
Asciidoctor removes the indentation of each line in these tables, so the last lines of each table have a completely broken alignment. Similar to 379805051d ("Documentation: render revisions correctly under Asciidoctor", 2018-05-06), use an explicit literal block to indicate that we want to keep th

[PATCH v2 0/3] A few Asciidoctor-fixes

2018-12-16 Thread Martin Ågren
This series addresses a few instances where our documentation renders badly in Asciidoctor, compared to Asciidoc. The changes made are exactly the same as in v1 [1], but the first commit message is corrected, and the two patches 2/4 and 3/4 are now just a single patch 2/3. Thanks Peff for your com

[PATCH v2 1/3] git-column.txt: fix section header

2018-12-16 Thread Martin Ågren
We have too few dashes under "Examples", which causes Asciidoctor to not pick it up as a section header. Instead, it thinks we are starting a code listing block, which ends up containing the remainder of the document. The result is quite ugly. Make sure we have as many dashes as we have characters

[PATCH v2 2/3] Documentation: do not nest open blocks

2018-12-16 Thread Martin Ågren
It appears we try to nest open blocks, but that does not work well with Asciidoctor, which fails to indent the inner blocks. As a result, they do not visually seem to relate (as much) to the preceding paragraph as they should. Drop the outer blocks to fix the rendering of the inner ones. Asciidoc r

Re: [PATCH 1/4] git-column.txt: fix section header

2018-12-16 Thread Martin Ågren
On Sun, 16 Dec 2018 at 11:51, Jeff King wrote: > > On Sat, Dec 15, 2018 at 12:27:39PM +0100, Martin Ågren wrote: > > > We have too few dashes under "Examples", which causes Asciidoctor to not > > pick it up as a section header, but to instead just render the dashes > > literally. This also seems t

Re: [PATCH] worktree: allow to (re)move worktrees with uninitialized submodules

2018-12-16 Thread Eric Sunshine
On Sun, Dec 16, 2018 at 7:12 AM Nguyễn Thái Ngọc Duy wrote: > Uninitialized submodules have nothing valueable for us to be worried > about. They are just SHA-1. Let "worktree remove" and "worktree move" > continue in this case so that people can still use multiple worktrees > on repos with optiona

[PATCH] worktree: allow to (re)move worktrees with uninitialized submodules

2018-12-16 Thread Nguyễn Thái Ngọc Duy
Uninitialized submodules have nothing valueable for us to be worried about. They are just SHA-1. Let "worktree remove" and "worktree move" continue in this case so that people can still use multiple worktrees on repos with optional submodules that are never populated, like sha1collisiondetection in

Re: [PATCH 0/3] protocol v2 and hidden refs

2018-12-16 Thread Ævar Arnfjörð Bjarmason
On Sun, Dec 16 2018, Jeff King wrote: > On Sat, Dec 15, 2018 at 08:53:35PM +0100, Ævar Arnfjörð Bjarmason wrote: > >> > So I'm a bit worried that the unified endpoint model is going to be a >> > dead end, at which point carrying around git-serve just makes things >> > more complicated. >> >> Thi

Re: [PATCH 1/3] serve: pass "config context" through to individual commands

2018-12-16 Thread Junio C Hamano
Jeff King writes: > Yeah, I agree that such a "pass this through" struct full of options and > context would make sense. I just wouldn't tie it to the "serve" > machinery. > > Did you read the side-thread between me and Jonathan? Another option > here is to just have ls-refs assume that the clien

Re: [PATCH 4/4] git-status.txt: render tables correctly under Asciidoctor

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 12:27:42PM +0100, Martin Ågren wrote: > Asciidoctor removes the indentation of each line in these tables, so the > last lines of each table have a completely broken alignment. > > Similar to 379805051d ("Documentation: render revisions correctly under > Asciidoctor", 2018-

Re: [PATCH 3/4] rev-list-options.txt: do not nest open blocks

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 12:27:41PM +0100, Martin Ågren wrote: > Similar to the previous commit, it appears we try to nest open blocks, > which does not work well with Asciidoctor. Drop the outer one. That > fixes the indentation similar to the previous patch, and makes us stop > rendering a litera

Re: [PATCH 2/4] git-init.txt: do not nest open blocks

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 12:27:40PM +0100, Martin Ågren wrote: > It appears we try to nest open blocks, but that does not work well with > Asciidoctor, which fails to indent the inner block. This causes the > inner block to be set as if it had nothing to do with `--shared`. Drop > the outer one. As

Re: [PATCH 1/4] git-column.txt: fix section header

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 12:27:39PM +0100, Martin Ågren wrote: > We have too few dashes under "Examples", which causes Asciidoctor to not > pick it up as a section header, but to instead just render the dashes > literally. This also seems to confuse Asciidoctor about dashes in > general around here

Re: [PATCH 0/4] A few Asciidoctor-fixes

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 12:27:38PM +0100, Martin Ågren wrote: > I have (ab)used doc-diff to try to find instances where Asciidoctor and > Asciidoc render our documentation differently. (See [1] for details on > the hack.) This series fixes the differences that somehow stood out in > the diff. Many

Re: [PATCH 0/3] protocol v2 and hidden refs

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 08:53:35PM +0100, Ævar Arnfjörð Bjarmason wrote: > > So I'm a bit worried that the unified endpoint model is going to be a > > dead end, at which point carrying around git-serve just makes things > > more complicated. > > This is from wetware memory of something discussed

Re: [PATCH 1/3] serve: pass "config context" through to individual commands

2018-12-16 Thread Jeff King
On Sat, Dec 15, 2018 at 09:31:15AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > I actually started by doing that, but "struct serve_options" is not > > currently known by ls-refs.c, upload-pack.c, etc. So they'd have to > > start including "serve.h". I don't think that's the end of the