[PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Zoë Blade
Add support for Fountain, a plain text screenplay format. In the structure of a screenplay, scenes are roughly analogous to functions, in the sense that it makes your job slightly easier if you can see which ones were changed in a given range of patches. --- Documentation/gitattributes.txt | 2

[PATCH] Fix detection of uname failure

2015-07-17 Thread Charles Bailey
From: Charles Bailey cbaile...@bloomberg.net According to POSIX specification uname must return -1 on failure and a non-negative value on success. Although many implementations do return 0 on success it is valid to return any positive value for success. In particular, Solaris returns 1.

Re: A few linked checkout niggles

2015-07-17 Thread Michael J Gruber
Two more observations: $ git worktree add /tmp/gitwt Enter /tmp/gitwt (identifier gitwt) Switched to a new branch 'gitwt' Now I'm in /tmp/gitwt at branch gitwt. Right? No. I'm in the original wd at the original branch. So either we cd to the new location or quelch these messages or add a

Re: A few linked checkout niggles

2015-07-17 Thread Duy Nguyen
On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber g...@drmicha.warpmail.net wrote: Two more observations: $ git worktree add /tmp/gitwt Enter /tmp/gitwt (identifier gitwt) Switched to a new branch 'gitwt' Now I'm in /tmp/gitwt at branch gitwt. Right? No. I'm in the original wd at the

[PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Zoë Blade
Add support for Fountain, a plain text screenplay format. Git facilitates not just programming specifically, but creative writing in general, so it makes sense to also support other plain text documents besides source code. In the structure of a screenplay specifically, scenes are roughly

Re: [PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Zoë Blade
On 17 Jul 2015, at 14:03, Johannes Schindelin johannes.schinde...@gmx.de wrote: Maybe you want to add a paragraph explaining a bit more about Fountain, or at least link to http://fountain.io/? In any case, you will need to sign off on your patch:

Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Johannes Schindelin
Hi Charles, On 2015-07-17 14:11, Charles Bailey wrote: diff --git a/dir.c b/dir.c index 8209f8b..52dbfd0 100644 --- a/dir.c +++ b/dir.c @@ -1848,7 +1848,7 @@ static const char *get_ident_string(void) if (sb.len) return sb.buf; - if (uname(uts)) + if

Re: [PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Johannes Schindelin
Hi Zoë, On 2015-07-17 13:59, Zoë Blade wrote: Add support for Fountain, a plain text screenplay format. In the structure of a screenplay, scenes are roughly analogous to functions, in the sense that it makes your job slightly easier if you can see which ones were changed in a given range

[PATCH] fetch: add configuration for making --all default

2015-07-17 Thread Øystein Walle
Fetching from all remotes by default is useful if you're working on a repo with few and/or fast remotes. It also lets you fetch from origin even if the current branch's upstream is elsewhere without specifying it explicitly. Signed-off-by: Øystein Walle oys...@gmail.com --- This is scratching a

Re: [PATCH] fetch: add configuration for making --all default

2015-07-17 Thread Remi Galan Alfonso
Hi, Øystein Walle oys...@gmail.com writes: +fetch.all:: +If true, fetch will automatically behave as if the `--all` +option was given on the command line uness a remote was given. The +default is false. s/uness/unless +test_expect_success 'git fetch (fetch.all =

Re: A few linked checkout niggles

2015-07-17 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber g...@drmicha.warpmail.net wrote: Two more observations: $ git worktree add /tmp/gitwt Enter /tmp/gitwt (identifier gitwt) Switched to a new branch 'gitwt' Now I'm in /tmp/gitwt at branch gitwt. Right?

Re: [PATCH v2] gitk: Add a Copy commit summary command

2015-07-17 Thread Junio C Hamano
Paul Mackerras pau...@samba.org writes: We have an item in the preferences menu to control the SHA1 length that is automatically selected when going to a new commit. It's stored in the variable $autosellen. That seems like it would be a reasonable choice for the SHA1 length to use here.

[PATCH v3] gitk: Add a Copy commit summary command

2015-07-17 Thread Beat Bolli
When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) Add a Copy commit summary command to the context menu that puts this text for the currently selected commit on the clipboard. This makes it easy for our

git clone --recursive and URL overrides

2015-07-17 Thread Christian Weiske
Hi, I'm setting some URL overrides via -c foo.insteadof=bar to git clone --recursive, but they are not used in the subsequent submodule requests on git 1.9.1. Is this expected behavior, or a bug? -- Regards/Mit freundlichen Grüßen Christian Weiske -= Geeking around in the name of science

Re: [PATCH v2] gitk: Add a Copy commit summary command

2015-07-17 Thread Stefan Haller
Junio C Hamano gits...@pobox.com wrote: Beat Bolli dev+...@drbeat.li writes: When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) ... +proc copysummary {} { +global rowmenuid commitinfo +

Re: [PATCH v2] gitk: Add a Copy commit summary command

2015-07-17 Thread Beat Bolli
On 2015-07-17 10:50, li...@haller-berlin.de wrote: Junio C Hamano gits...@pobox.com wrote: Beat Bolli dev+...@drbeat.li writes: When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) ... +proc

Problem with architecture git.

2015-07-17 Thread Alexander
Hello, I have problem with architecure of my project, help me to resolve problem . I want to do in my remote repo two branches with two different working folders (master , dev ) to check it . How can I do it ? Thank you. -- To unsubscribe from this list: send the line unsubscribe git in the

Re: [PATCH] fetch: add configuration for making --all default

2015-07-17 Thread Junio C Hamano
Øystein Walle oys...@gmail.com writes: Fetching from all remotes by default is useful if you're working on a repo with few and/or fast remotes. That part is sensible. It also lets you fetch from origin even if the current branch's upstream is elsewhere without specifying it explicitly. I

[PATCH v2] fetch: add configuration for making --all default

2015-07-17 Thread Øystein Walle
Fetching from all remotes by default is useful if you're working on a repo with few and/or fast remotes. It also lets you fetch from origin even if the current branch's upstream is elsewhere without specifying it explicitly. Signed-off-by: Øystein Walle oys...@gmail.com --- Thanks for the quick

Re: [PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Johannes Schindelin
Hi Zoë, On 2015-07-17 16:03, Zoë Blade wrote: On 17 Jul 2015, at 14:03, Johannes Schindelin johannes.schinde...@gmx.de wrote: Maybe you want to add a paragraph explaining a bit more about Fountain, or at least link to http://fountain.io/? In any case, you will need to sign off on your

Re: [PATCH v2] gitk: Add a Copy commit summary command

2015-07-17 Thread Paul Mackerras
On Thu, Jul 16, 2015 at 05:29:25PM +0200, Beat Bolli wrote: When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) Add a Copy commit summary command to the context menu that puts this text for the

Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Charles Bailey
On Fri, Jul 17, 2015 at 03:06:57PM +0200, Johannes Schindelin wrote: From a quick `git grep '== -1'` and another quick `git grep ' 0'` it appears to me that we prefer the latter. Maybe you want to adjust it in the patch, too? I did the same grep and found lots of examples of both. Many of

Re: [PATCH v2] Documentation/git: fix stale MULTIPLE CHECKOUT MODE reference

2015-07-17 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: This should have been changed by 93a3649 (Documentation: move linked worktree description from checkout to worktree, 2015-07-06). Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- Documentation/git.txt | 2 +- 1 file changed, 1

Re: A few linked checkout niggles

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 11:19 AM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com writes: On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber g...@drmicha.warpmail.net wrote: Two more observations: $ git worktree add /tmp/gitwt Enter /tmp/gitwt (identifier gitwt)

Re: [PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Junio C Hamano
Zoë Blade z...@bytenoise.co.uk writes: Add support for Fountain, a plain text screenplay format. Git facilitates not just programming specifically, but creative writing in general, so it makes sense to also support other plain text documents besides source code. In the structure of a

Re: [PATCH v3] gitk: Add a Copy commit summary command

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 4:39 AM, Beat Bolli dev+...@drbeat.li wrote: When referring to earlier commits in commit messages or other text, one of the established formats is abbrev-sha (summary, author-date) Add a Copy commit summary command to the context menu that puts this text for the

Re: A few linked checkout niggles

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 8:49 AM, Duy Nguyen pclo...@gmail.com wrote: On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber g...@drmicha.warpmail.net wrote: Two more observations: $ git worktree add /tmp/gitwt Enter /tmp/gitwt (identifier gitwt) Switched to a new branch 'gitwt' Now I'm in

Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Junio C Hamano
Charles Bailey char...@hashpling.org writes: ... I think ' 0' is probably better. In POSIX, we shouldn't ever get a negative value which isn't -1, but if we ever do it is probably safer to fail. I'll send and update. Thanks; I was about to type the same reasoning and conclusion ;-) -- To

Re: [PATCH v3] gitk: Add a Copy commit summary command

2015-07-17 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Signed-off-by: Beat Bolli dev+...@drbeat.li Reviewed-by: Eric Sunshine sunsh...@sunshineco.com Reviewed-by: Johannes Sixt j...@kdbg.org You should drop these Reviewed-by: footers, as they imply that the code was thoroughly digested and the

[PATCH v2] Fix detection of uname failure

2015-07-17 Thread Charles Bailey
From: Charles Bailey cbaile...@bloomberg.net According to POSIX specification uname must return -1 on failure and a non-negative value on success. Although many implementations do return 0 on success it is valid to return any positive value for success. In particular, Solaris returns 1.

Re: Problem with architecture git.

2015-07-17 Thread Zoë Blade
On 17 Jul 2015, at 16:12, Alexander samarinav1...@gmail.com wrote: Hello, I have problem with architecure of my project, help me to resolve problem . I want to do in my remote repo two branches with two different working folders (master , dev ) to check it . How can I do it ? Thank

Git tag: pre-receive hook issue

2015-07-17 Thread Garbageyard
We have a pre-receive hook that checks for JIRA ID whenever someone pushes code to Git server. I'm trying to avoid this check when someone is applying a tag. Here's the link for the script: http://pastebin.com/VnMQp5ar This is the link for output: http://pastebin.com/tBGmYaZF Problem is that if

Re: [PATCH] branch: fix usage string for specific git-branch options

2015-07-17 Thread Junio C Hamano
Ralf Thielow ralf.thie...@gmail.com writes: The usage string of git-branch shows generic options and specific options. However, the specific options are called actions. Call them both options. I think this is a valid problem to address, but I do not know if the proposed solution is the right

Re: Problem with architecture git.

2015-07-17 Thread Keller, Jacob E
On Fri, 2015-07-17 at 15:12 +, Alexander wrote: Hello, I have problem with architecure of my project, help me to resolve problem . I want to do in my remote repo two branches with two different working folders (master , dev ) to check it . How can I do it ? Thank you. Sounds

[PATCH] branch: fix usage string for specific git-branch options

2015-07-17 Thread Ralf Thielow
The usage string of git-branch shows generic options and specific options. However, the specific options are called actions. Call them both options. Signed-off-by: Ralf Thielow ralf.thie...@gmail.com --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Alternative download site for git-osx-installer?

2015-07-17 Thread Jordan Lowe
Good afternoon, I've been trying to download the git-osx-installer but SourceForge seems to be having problems. Is there an alternate download location? -- Thank you, Jordan Lowe -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

Re: Git tag: pre-receive hook issue

2015-07-17 Thread Junio C Hamano
Garbageyard varuag.chha...@gmail.com writes: We have a pre-receive hook that checks for JIRA ID whenever someone pushes code to Git server. I'm trying to avoid this check when someone is applying a tag. Here's the link for the script: http://pastebin.com/VnMQp5ar This is the link for output:

[PATCH] unpack-trees: don't update files flagged for deletion

2015-07-17 Thread David Turner
Don't update files in the worktree from cache entries which are flagged with CE_WT_REMOVE. This is fixes merges in sparse checkouts. Signed-off-by: Anatole Shaw git-de...@omni.poc.net Signed-off-by: David Turner dtur...@twopensource.com --- This patch was written by my colleague Anatole Shaw

Re: [PATCH v2] Documentation/git: fix stale MULTIPLE CHECKOUT MODE reference

2015-07-17 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Thanks. I have two comments. if using Cogito etc., which is totally outside the topic of this patch, is way outdated. Perhaps we would want to remove or replace it. Do you want me to re-roll the current patch to also include the Cogito change

Re: [PATCH v2] unpack-trees: don't update files with CE_WT_REMOVE set

2015-07-17 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Don't update files in the worktree from cache entries which are flagged with CE_WT_REMOVE. When a user does a sparse checkout, git removes files that are marked with CE_WT_REMOVE (because they are out-of-scope for the sparse checkout). If those

[PATCH v3 01/18] rerere: fix an off-by-one non-bug

2015-07-17 Thread Junio C Hamano
When ac49f5ca (rerere remaining, 2011-02-16) split out a new helper function check_one_conflict() out of find_conflict() function, so that the latter will use the returned value from the new helper to update the loop control variable that is an index into active_cache[], the new variable

[PATCH v3 02/18] rerere: plug conflict ID leaks

2015-07-17 Thread Junio C Hamano
The merge_rr string list stores the conflict ID (a hexadecimal string that is used to index into $GIT_DIR/rr-cache) in the .util field of its elements, and when do_plain_rerere() resolves a conflict, the field is cleared. Also, when rerere_forget() recomputes the conflict ID to updates the

[PATCH v3 00/18] rerere preparatory clean-up

2015-07-17 Thread Junio C Hamano
This is a resend of v2: http://thread.gmane.org/gmane.comp.version-control.git/273117 plus 5 new changes. I have a few more real-fix changes that build on top, but they are not sufficiently polished to be published yet compared to these early clean-up bits. Junio C Hamano (18): rerere:

Re: Git tag: pre-receive hook issue

2015-07-17 Thread Jacob Keller
On Fri, Jul 17, 2015 at 11:58 AM, Garbageyard varuag.chha...@gmail.com wrote: We have a pre-receive hook that checks for JIRA ID whenever someone pushes code to Git server. I'm trying to avoid this check when someone is applying a tag. Here's the link for the script:

[PATCH v2] unpack-trees: don't update files with CE_WT_REMOVE set

2015-07-17 Thread David Turner
Don't update files in the worktree from cache entries which are flagged with CE_WT_REMOVE. When a user does a sparse checkout, git removes files that are marked with CE_WT_REMOVE (because they are out-of-scope for the sparse checkout). If those files are also marked CE_UPDATE (for instance,

Re: [PATCH] userdiff: add support for Fountain documents

2015-07-17 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Zoë Blade z...@bytenoise.co.uk writes: More information about the Fountain format can be found on its official website, at http://fountain.io . So I visited there. +PATTERNS(fountain, ^((INT|EST|EXT)?\\.[A-Z0-9' -]+)$, + [^ \t-]+), After

[PATCH v3 02/22] checkout: name check_linked_checkouts() more meaningfully

2015-07-17 Thread Eric Sunshine
check_linked_checkouts() doesn't just check linked checkouts for something; specifically, it aborts the operation if the branch about to be checked out is already checked out elsewhere. Therefore, rename it to die_if_checked_out() to give a better indication of its function. The more meaningful

[PATCH v3 09/22] branch: publish die_if_checked_out()

2015-07-17 Thread Eric Sunshine
git-worktree currently conflates new branch creation, setting of HEAD in the new wortkree, and worktree population into a single sub-invocation of git-checkout. However, these operations will eventually be separated, and git-worktree itself will need to be able to detect if the branch is already

[PATCH v3 00/22] rid git-checkout of too-intimate knowledge of new worktree

2015-07-17 Thread Eric Sunshine
This is v3 of [1] which rids git-checkout of specialized knowledge that it's operating in a newly created linked worktree. Thanks to Junio for his review, and Duy and Michael J Gruber for additional observations. A v2 to v3 interdiff is included below. Changes since v2: * patch 06/22: strip

[PATCH v3 18/22] worktree: detect branch-name/detached and error conditions locally

2015-07-17 Thread Eric Sunshine
git-worktree currently conflates setting of HEAD in the new worktree with initial worktree population via a single git-checkout invocation, which requires git-checkout to have special knowledge that it is operating in a newly created worktree. The eventual goal is to separate these operations and

[PATCH v3 19/22] worktree: make setup of new HEAD distinct from worktree population

2015-07-17 Thread Eric Sunshine
git-worktree currently conflates setting of HEAD in the new worktree and initial worktree population into a single git-checkout invocation which requires git-checkout to have special knowledge that it is operating on a newly created worktree. The eventual goal is to rid git-checkout of that

[PATCH v3 22/22] checkout: drop intimate knowledge of newly created worktree

2015-07-17 Thread Eric Sunshine
Now that git-worktree no longer relies upon git-checkout for new branch creation, new worktree HEAD set up, or initial worktree population, git-checkout no longer needs intimate knowledge that it may be operating in a newly created worktree. Therefore, drop 'new_worktree_mode' and the private

[PATCH v3 07/22] checkout: check_linked_checkout: simplify symref parsing

2015-07-17 Thread Eric Sunshine
check_linked_checkout() only understands symref-style HEAD (i.e. ref: refs/heads/master), however, HEAD may also be a an actual symbolic link (on platforms which support it), thus it will need to check that style HEAD, as well (via readlink()). As a preparatory step, simplify parsing of

[PATCH v3 05/22] checkout: generalize die_if_checked_out() branch name argument

2015-07-17 Thread Eric Sunshine
The plan is to publish die_if_checked_out() so that callers other than git-checkout can take advantage of it, however, those callers won't have access to git-checkout's struct branch_info. Therefore, change it to accept the full name of the branch as a simple string instead. While here, also give

[PATCH v3 13/22] worktree: make --detach mutually exclusive with -b/-B

2015-07-17 Thread Eric Sunshine
Be consistent with git-checkout which disallows this (not particularly meaningful) combination. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- Changes since v2: add tests builtin/worktree.c | 4 ++-- t/t2025-worktree-add.sh | 12 2 files changed, 14 insertions(+),

[PATCH v3 14/22] worktree: add: suppress auto-vivication with --detach and no branch

2015-07-17 Thread Eric Sunshine
Fix oversight where branch auto-vivication incorrectly kicks in when --detach is specified and branch omitted. Instead, treat: git worktree add --detach path as shorthand for: git worktree add --detach path HEAD Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- New in v3.

[PATCH v3 16/22] worktree: elucidate environment variables intended for child processes

2015-07-17 Thread Eric Sunshine
Take advantage of 'struct child_process.env' to make it obvious that environment variables set by add_worktree() are intended specifically for sub-commands it invokes to operate in the new worktree. We assign a local 'struct argv_array' to child_process.env, rather than utilizing the

[PATCH v3 20/22] worktree: avoid resolving HEAD unnecessarily

2015-07-17 Thread Eric Sunshine
Now that git-worktree sets HEAD explicitly to its final value via either git-symbolic-ref or git-update-ref, rather than relying upon git-checkout to do so, the hack for pacifying is_git_directory() with a temporary HEAD, though still necessary, can be simplified. Since the real HEAD is now

[PATCH v3 15/22] worktree: make branch creation distinct from worktree population

2015-07-17 Thread Eric Sunshine
git-worktree currently conflates branch creation, setting of HEAD in the new worktree, and worktree population into a single sub-invocation of git-checkout, which requires git-checkout to be specially aware that it is operating in a newly-created worktree. The goal is to free git-checkout of that

[PATCH v3 17/22] worktree: add_worktree: construct worktree-population command locally

2015-07-17 Thread Eric Sunshine
The caller of add_worktree() provides it with a command to invoke to populate the new worktree. This was a useful abstraction during the conversion of git checkout --to functionality to git worktree add since git-checkout and git-worktree constructed the population command differently. However,

[PATCH v3 08/22] checkout: teach check_linked_checkout() about symbolic link HEAD

2015-07-17 Thread Eric Sunshine
check_linked_checkout() only understands symref-style HEAD (i.e. ref: refs/heads/master), however, HEAD may also be a an actual symbolic link (on platforms which support it). To accurately detect if a branch is checked out elsewhere, it needs to handle symbolic link HEAD, as well. Signed-off-by:

[PATCH v3 10/22] worktree: improve worktree setup message

2015-07-17 Thread Eric Sunshine
When git-worktree creates a new worktree, it reports: Enter path (identifier tag) which misleadingly implies that it is setting path as the working directory (as if cd path had been invoked), whereas it's actually preparing the new worktree by creating its administrative files, setting HEAD,

[PATCH v3 21/22] worktree: populate via git reset --hard rather than git checkout

2015-07-17 Thread Eric Sunshine
Now that git-worktree handles all functionality (--force, --detach, -b/-B) previously delegated to git-checkout, actual population of the new worktree can be accomplished more directly and lightweight with git reset --hard in place of git checkout. Signed-off-by: Eric Sunshine

[PATCH v3 11/22] worktree: simplify new branch (-b/-B) option checking

2015-07-17 Thread Eric Sunshine
Make 'new_branch' be the name of the new branch for both forced and non-forced cases; and add boolean 'force_new_branch' to indicate forced branch creation. This will simplify logic later on when git-worktree handles branch creation locally rather than delegating it to git-checkout as part of the

[PATCH v3 12/22] worktree: introduce options container

2015-07-17 Thread Eric Sunshine
add_worktree() will eventually need to deal with some options itself, so introduce a structure into which options can be conveniently bundled, and pass it along to add_worktree(). Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- No changes since v2. builtin/worktree.c | 45

[PATCH v3 03/22] checkout: improve die_if_checked_out() robustness

2015-07-17 Thread Eric Sunshine
die_if_checked_out() is intended to check if the branch about to be checked out is already checked out either in the main worktree or in a linked worktree. However, if .git/worktrees directory does not exist, then it never bothers checking the main worktree, even though the specified branch might

Re: [PATCH v2] Fix detection of uname failure

2015-07-17 Thread Johannes Schindelin
On 2015-07-17 19:09, Charles Bailey wrote: From: Charles Bailey cbaile...@bloomberg.net According to POSIX specification uname must return -1 on failure and a non-negative value on success. Although many implementations do return 0 on success it is valid to return any positive value for

[PATCH v3 01/22] checkout: avoid resolving HEAD unnecessarily

2015-07-17 Thread Eric Sunshine
When --ignore-other-worktree is specified, we unconditionally skip the check to see if the requested branch is already checked out in a linked worktree. Since we know that we will be skipping that check, there is no need to resolve HEAD in order to detect other conditions under which we may skip

[PATCH v3 06/22] checkout: check_linked_checkout: improve already checked out aesthetic

2015-07-17 Thread Eric Sunshine
When check_linked_checkout() discovers that the branch is already checked out elsewhere, it emits the diagnostic: 'blorp' is already checked out at '/some/path/.git' which is misleading since checked out at implies the working tree, but .git is the location of the repository administrative

[PATCH v3 04/22] checkout: die_if_checked_out: simplify strbuf management

2015-07-17 Thread Eric Sunshine
There is no reason to keep the strbuf active long after its last use. By releasing it as early as possible, resource management is simplified and there is less worry about future changes resulting in a leak. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- No changes since v2.

Re: [PATCH v3 14/22] worktree: add: suppress auto-vivication with --detach and no branch

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 07:00:09PM -0400, Eric Sunshine wrote: Fix oversight where branch auto-vivication incorrectly kicks in when --detach is specified and branch omitted. Instead, treat: git worktree add --detach path as shorthand for: git worktree add --detach path HEAD

Re: [PATCH] unpack-trees: don't update files flagged for deletion

2015-07-17 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Don't update files in the worktree from cache entries which are flagged with CE_WT_REMOVE. This is fixes merges in sparse checkouts. s/This is/This/; But more importantly, what is missing is why it is a good fix. i.e. things like: - why is it

Re: [PATCH v2] Documentation/git: fix stale MULTIPLE CHECKOUT MODE reference

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 1:03 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: This should have been changed by 93a3649 (Documentation: move linked worktree description from checkout to worktree, 2015-07-06). Signed-off-by: Eric Sunshine

Re: [PATCH v3] gitk: Add a Copy commit summary command

2015-07-17 Thread Beat Bolli
On 17.07.15 19:28, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: Signed-off-by: Beat Bolli dev+...@drbeat.li Reviewed-by: Eric Sunshine sunsh...@sunshineco.com Reviewed-by: Johannes Sixt j...@kdbg.org You should drop these Reviewed-by: footers, as they imply that the

RFC/Pull request v2: Refs db backend

2015-07-17 Thread David Turner
I've prepared another version of my pluggable backends series. This version has the following changes: 1. Addressed all cosmetic review comments from previous version 2. Significant cleanup of LMDB code: formatting and variable names, functions extracted, etc. 3. Explicit handling of per-worktree

Re: [PATCH v2] Fix detection of uname failure

2015-07-17 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: On 2015-07-17 19:09, Charles Bailey wrote: From: Charles Bailey cbaile...@bloomberg.net According to POSIX specification uname must return -1 on failure and a non-negative value on success. Although many implementations do return 0 on

[PATCH v3 04/18] rerere: write out each record of MERGE_RR in one go

2015-07-17 Thread Junio C Hamano
Instead of writing the hash for a conflict, a HT, and the path with three separate write_in_full() calls, format them into a single record into a strbuf and write it out in one go. As a more recent rerere remaining codepath abuses the .util field of the merge_rr data to store a sentinel token,

[PATCH v3 08/18] rerere: explain the rerere I/O abstraction

2015-07-17 Thread Junio C Hamano
Explain the internals of rerere as in-code comments. This one covers our thin I/O abstraction to read from either a file or a memory while optionally writing out to a file. Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 38 +++--- 1 file changed,

[PATCH v3 03/18] rerere: lift PATH_MAX limitation

2015-07-17 Thread Junio C Hamano
The MERGE_RR file records a collection of NUL-terminated entries, each of which consists of - a hash that identifies the conflict - a HT - the pathname We used to read this piece-by-piece, and worse yet, read the pathname part a byte at a time into a fixed buffer of size PATH_MAX. Instead,

[PATCH v3 16/18] rerere: call conflict-ids IDs

2015-07-17 Thread Junio C Hamano
Most places we call conflict IDs name and some others we call them hex; update all of them to id. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/rerere.c | 4 +-- rerere.c | 76 rerere.h | 2 +- 3 files

[PATCH v3 10/18] rerere: explain the primary codepath

2015-07-17 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling NEEDSWORK comment to highlight iffy bits and questionable assumptions. This one covers the codepath reached from rerere(), the primary interface to the subsystem. Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c |

[PATCH v3 18/18] rerere: un-nest merge() further

2015-07-17 Thread Junio C Hamano
By consistently using upon failure, set 'ret' and jump to out pattern, flatten the function further. Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 50 ++ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/rerere.c

[PATCH v3 09/18] rerere: explain MERGE_RR management helpers

2015-07-17 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling NEEDSWORK comment to highlight iffy bits and questionable assumptions. This one covers the $GIT_DIR/MERGE_RR file and in-core merge_rr that are used to keep track of the status of rerere session in progress. Signed-off-by:

[PATCH v3 13/18] rerere: refactor replay part of do_plain_rerere()

2015-07-17 Thread Junio C Hamano
Extract the body of a loop that attempts to replay recorded resolution for each conflicted path into a helper function, not because I want to call it from multiple places later, but because the logic has become too deeply nested and hard to read. Signed-off-by: Junio C Hamano gits...@pobox.com

[PATCH v3 17/18] rerere: use struct rerere_id instead of char * for conflict ID

2015-07-17 Thread Junio C Hamano
This gives a thin abstraction between the conflict ID that is a hash value obtained by inspecting the conflicts and the name of the directory under $GIT_DIR/rr-cache/, in which the previous resolution is recorded to be replayed. The plan is to make sure that the presense of the directory does not

[PATCH v3 15/18] rerere: further clarify do_rerere_one_path()

2015-07-17 Thread Junio C Hamano
Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/rerere.c b/rerere.c index 1089a9c..30bdfeb 100644 --- a/rerere.c +++ b/rerere.c @@ -644,16 +644,13 @@ static void do_rerere_one_path(struct

[PATCH v3 14/18] rerere: further de-dent do_plain_rerere()

2015-07-17 Thread Junio C Hamano
It's just easier to follow this way. Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 69 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/rerere.c b/rerere.c index 09b72ed..1089a9c 100644 ---

[PATCH v3 07/18] rerere: stop looping unnecessarily

2015-07-17 Thread Junio C Hamano
handle_cache() loops 3 times starting from an index entry that is unmerged, while ignoring an entry for a path that is different from what we are looking for. As the index is sorted, once we see a different path, we know we saw all stages for the path we are interested in. Just loop while we see

[PATCH v3 12/18] rerere: explain the remainder

2015-07-17 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling NEEDSWORK comment to highlight iffy bits and questionable assumptions. This covers the codepath that implements rerere gc and rerere clear. Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 20

[PATCH v3 11/18] rerere: explain rerere forget codepath

2015-07-17 Thread Junio C Hamano
Explain the internals of rerere as in-code comments, while sprinkling NEEDSWORK comment to highlight iffy bits and questionable assumptions. This covers the codepath that implements rerere forget. Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 24 1 file

[PATCH v3 05/18] rerere: report autoupdated paths only after actually updating them

2015-07-17 Thread Junio C Hamano
Signed-off-by: Junio C Hamano gits...@pobox.com --- rerere.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/rerere.c b/rerere.c index 27b287d..304df02 100644 --- a/rerere.c +++ b/rerere.c @@ -482,6 +482,8 @@ static void update_paths(struct string_list