Re: [PATCH v2] Fix detection of uname failure

2015-07-17 Thread Johannes Schindelin
Hi Junio, On 2015-07-17 23:39, Junio C Hamano wrote: > Johannes Schindelin writes: > >> On 2015-07-17 19:09, Charles Bailey wrote: >>> From: Charles Bailey >>> >>> According to POSIX specification uname must return -1 on failure and a >>> non-negative value on success. Although many implementat

Re: Git tag: pre-receive hook issue

2015-07-17 Thread Jacob Keller
On Fri, Jul 17, 2015 at 11:58 AM, Garbageyard 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: http://pastebin.com/VnMQp5ar > > This is the link

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

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 omitted. Instead, treat: > > git worktree add --detach > > as shorthand for: > > git worktree add --detach HEAD > > Signed

[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 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 popu

[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 s

[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 r

[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 overly-

[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 GIT_C

[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 symref-st

[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 giv

[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 --- Changes since v2: add tests builtin/worktree.c | 4 ++-- t/t2025-worktree-add.sh | 12 2 files changed, 14 insertions(+), 2 deletions(-) diff --g

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

2015-07-17 Thread Eric Sunshine
Fix oversight where branch auto-vivication incorrectly kicks in when --detach is specified and omitted. Instead, treat: git worktree add --detach as shorthand for: git worktree add --detach HEAD Signed-off-by: Eric Sunshine --- New in v3. builtin/worktree.c | 2 +- t/t2025-

[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 child_process

[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 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 w

[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 --- 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 i

[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 "" (identifier ) which misleadingly implies that it is setting as the working directory (as if "cd " had been invoked), whereas it's actually preparing the new worktree by creating its administrative files, setting HEAD, and populat

[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 --- No changes

[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 ch

[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 only

[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 administrativ

[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 --- No changes since v2. builtin/checkout.c | 7 +++

[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 th

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

2015-07-17 Thread Junio C Hamano
Junio C Hamano writes: > Zoë Blade 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 skimming http://fountain.i

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

2015-07-17 Thread Junio C Hamano
Signed-off-by: Junio C Hamano --- 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 string_list_item *rr_item,

[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 --- rerere.c | 69 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/rerere.c b/rerere.c index 09b72ed..1089a9c 100644 --- a/rerere.c +++ b/rerere.c @

[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 --- rerere.c | 20 1 file ch

[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 --- rerere.c | 24 1 file changed, 24 i

[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 --- rerere.c | 38 +++--- 1 file changed, 31 insertions(+),

[PATCH v3 06/18] rerere: drop want_sp parameter from is_cmarker()

2015-07-17 Thread Junio C Hamano
As the nature of the conflict marker line determies if there should a SP and label after it, the caller shouldn't have to pass the parameter redundantly. Signed-off-by: Junio C Hamano --- rerere.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/re

[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, re

[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 --- builtin/rerere.c | 4 +-- rerere.c | 76 rerere.h | 2 +- 3 files changed, 41 inser

[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, m

[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 --- rerere.c | 95

[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 --- rerere.c | 50 ++ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/rerere.c b/rerere.c index 469

[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 --- 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 *update)

[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 --- rerere.c | 75 +

[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 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 incremen

[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 preimag

[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: fi

Re: [PATCH v2] Fix detection of uname failure

2015-07-17 Thread Junio C Hamano
Johannes Schindelin writes: > On 2015-07-17 19:09, Charles Bailey wrote: >> From: Charles Bailey >> >> 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 posit

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

2015-07-17 Thread Junio C Hamano
David Turner 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 files are also mark

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

[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, becaus

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

2015-07-17 Thread Junio C Hamano
Eric Sunshine 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 as a "

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 > > 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 > particul

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 writes: > >>> Signed-off-by: Beat Bolli >>> Reviewed-by: Eric Sunshine >>> Reviewed-by: Johannes Sixt >> >> You should drop these Reviewed-by: footers, as they imply that the >> code was thoroughly digested and the implementation deemed

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 wrote: > Eric Sunshine 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 >> --- >> @@ -845,7 +845,7 @@ Git so take care

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

2015-07-17 Thread Junio C Hamano
David Turner 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 wrong to update what

[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 Signed-off-by: David Turner --- This patch was written by my colleague Anatole Shaw for Twitter's git; I just rebased it on mainstrea

Re: Git tag: pre-receive hook issue

2015-07-17 Thread Junio C Hamano
Garbageyard 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: http://pastebin.com

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

2015-07-17 Thread Junio C Hamano
Ralf Thielow 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 one. Originally,

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 i

[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 --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/b

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. Sou

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.or

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

2015-07-17 Thread Junio C Hamano
Eric Sunshine writes: >> Signed-off-by: Beat Bolli >> Reviewed-by: Eric Sunshine >> Reviewed-by: Johannes Sixt > > You should drop these Reviewed-by: footers, as they imply that the > code was thoroughly digested and the implementation deemed correct. ... and the most importantly, the named p

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 wrote: > When referring to earlier commits in commit messages or other text, one > of the established formats is > > ("", ) > > Add a "Copy commit summary" command to the context menu that puts this > text for the currently selected commit on the cl

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

2015-07-17 Thread Junio C Hamano
Zoë Blade 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 screenplay specific

Re: Problem with architecture git.

2015-07-17 Thread Zoë Blade
On 17 Jul 2015, at 16: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. You'll probab

[PATCH v2] Fix detection of uname failure

2015-07-17 Thread Charles Bailey
From: Charles Bailey 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. Signed-off-by: Charles Bailey

Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Junio C Hamano
Charles Bailey 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 unsubscribe from thi

Re: A few "linked checkout" niggles

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 11:19 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber >> wrote: >>> Two more observations: >>> >>> $ git worktree add /tmp/gitwt >>> Enter /tmp/gitwt (identifier gitwt) >>> Switched to a new branch 'gitwt' >>> >>> Now

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

2015-07-17 Thread Junio C Hamano
Eric Sunshine 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 > --- > Documentation/git.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Doc

Re: A few "linked checkout" niggles

2015-07-17 Thread Eric Sunshine
On Fri, Jul 17, 2015 at 8:49 AM, Duy Nguyen wrote: > On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber > 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. Rig

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

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 > 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: >> >> >

[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 --- Thanks for the quick feedback, Remi. Th

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

2015-07-17 Thread Junio C Hamano
Øystein Walle 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 do not think

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 v2] gitk: Add a "Copy commit summary" command

2015-07-17 Thread Junio C Hamano
Paul Mackerras 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. Reusing a confi

Re: A few "linked checkout" niggles

2015-07-17 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber > 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

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

2015-07-17 Thread Remi Galan Alfonso
Hi, Øystein Walle 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 = true)' ' > +

[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 analogo

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

2015-07-17 Thread Zoë Blade
On 17 Jul 2015, at 14:03, Johannes Schindelin 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: > > > https://github.com/git/git/blob/v2.4.6/Documentation/Su

[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 --- This is scratching a itch I have. Most

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)) > +

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 rang

Re: A few "linked checkout" niggles

2015-07-17 Thread Duy Nguyen
On Fri, Jul 17, 2015 at 7:27 PM, Michael J Gruber 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 original branch. > > So

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 message

[PATCH] Fix detection of uname failure

2015-07-17 Thread Charles Bailey
From: Charles Bailey 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. Signed-off-by: Charles Bailey

[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 ++

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 > > ("", ) > > Add a "Copy commit summary" command to the context menu that puts this > text for the currently selected commit

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 wrote: Beat Bolli writes: > When referring to earlier commits in commit messages or other text, one > of the established formats is > > ("", ) > ... > +proc copysummary {} { > +global rowmenuid commitinfo > + > +

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

2015-07-17 Thread Stefan Haller
Junio C Hamano wrote: > Beat Bolli writes: > > > When referring to earlier commits in commit messages or other text, one > > of the established formats is > > > > ("", ) > > ... > > +proc copysummary {} { > > +global rowmenuid commitinfo > > + > > +set id [string range $rowmenuid 0

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

[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 ("", ) 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 users to create well-format