Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Eric Sunshine
On Sun, Jun 21, 2015 at 4:48 PM, Karthik Nayak wrote: > Add the '--points-at' option provided by 'ref-filter'. The > option lets the user to pick only refs which point to a particular > commit. > > Add documentation and tests for the same. > > Based-on-patch-by: Jeff King > Mentored-by: Christian

Re: [PATCH v4 07/19] for-each-ref: add '--merged' and '--no-merged' options

2015-06-22 Thread Eric Sunshine
On Sun, Jun 21, 2015 at 4:48 PM, Karthik Nayak wrote: > Add the '--merged' and '--no-merged' options provided by 'ref-filter'. > The '--merged' option lets the user to only list refs merged into the > named commit. The '--no-merged' option lets the user to only list refs > not merged into the name

Re: [PATCH 1/3] contrib/subtree: Use tabs consitently for indentation in tests

2015-06-22 Thread Eric Sunshine
On Mon, Jun 22, 2015 at 9:53 AM, Charles Bailey wrote: > contrib/subtree: Use tabs consitently for indentation in tests s/consitently/consistently/ > Although subtrees tests uses more spaces for indentation than tabs, > there are still quite a lot of lines indented with tabs. As tabs conform > w

Re: [PATCH v7 3/5] bisect: simplify the addition of new bisect terms

2015-06-23 Thread Eric Sunshine
On Tue, Jun 23, 2015 at 8:54 AM, Matthieu Moy wrote: > diff --git a/revision.c b/revision.c > index 3ff8723..f22923f 100644 > --- a/revision.c > +++ b/revision.c > @@ -2076,14 +2079,32 @@ void parse_revision_opt(struct rev_info *revs, struct > parse_opt_ctx_t *ctx, > ctx->argc -= n; > }

Re: [PATCHv6 1/3] git-rebase -i: add command "drop" to remove a commit

2015-06-23 Thread Eric Sunshine
On Mon, Jun 22, 2015 at 5:42 PM, Galan RĂ©mi wrote: > Instead of removing a line to remove the commit, you can use the > command "drop" (just like "pick" or "edit"). It has the same effect as > deleting the line (removing the commit) except that you keep a visual > trace of your actions, allowing a

Re: [PATCHv6 1/3] git-rebase -i: add command "drop" to remove a commit

2015-06-23 Thread Eric Sunshine
On Tue, Jun 23, 2015 at 3:01 PM, Remi Galan Alfonso wrote: > Eric Sunshine writes: >> > +test_rebase_end () { >> > + test_when_finished "git checkout master && >> > + git branch -D $1 && >> > + test_might_fail g

Re: [PATCH 7/7] cat-file: add --batch-all-objects option

2015-06-25 Thread Eric Sunshine
On Mon, Jun 22, 2015 at 6:45 AM, Jeff King wrote: > [...] This patch adds an option to > "cat-file --batch-check" to operate on all available > objects (rather than reading names from stdin). > > Signed-off-by: Jeff King > --- > diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh > index 93a47

Re: [msysGit] [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID

2015-06-27 Thread Eric Sunshine
On Wed, Jun 24, 2015 at 8:03 PM, Philip Oakley wrote: > Delete the duplicated GUID from the generation code for the Visual Studio > .sln project file. > > The duplicate GUID tended to be allocated to test-svn-fe, which was then > ignored by Visual Studio / MSVC, and it's omission from the build ne

Re: [PATCH] fsck: it is OK for a tag and a commit to lack the body

2015-06-28 Thread Eric Sunshine
On Sun, Jun 28, 2015 at 2:18 PM, Junio C Hamano wrote: > When fsck validates a commit or a tag object, it scans each line in > the header the object using helper functions such as "start_with()", s/header/& of/ > etc. that work on a NUL terminated buffer, but before a1e920a0 > (index-pack: termi

Re: [PATCH v4 38/44] builtin-am: support and auto-detect StGit patches

2015-06-29 Thread Eric Sunshine
On Mon, Jun 29, 2015 at 4:42 PM, Stefan Beller wrote: > On Sun, Jun 28, 2015 at 7:06 AM, Paul Tan wrote: >> +/** >> + * Returns true if `str` consists of only whitespace, false otherwise. >> + */ >> +static int str_isspace(const char *str) >> +{ >> + while (*str) >> + if (!iss

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-29 Thread Eric Sunshine
On Thu, Jun 25, 2015 at 12:55:45PM -0400, Jeff King wrote: > This feeds the format directly to strftime. Besides being a > little more flexible, the main advantage is that your system > strftime may know more about your locale's preferred format > (e.g., how to spell the days of the week). > > Sig

[RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-29 Thread Eric Sunshine
ly, re-implement "git checkout --to" as "git worktree new". As a side-effect, linked worktree creation becomes much more discoverable with its own dedicated command, whereas `--to` was easily overlooked amid the plethora of options recognized by git-checkout. Signed-off-by: Er

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread Eric Sunshine
On Mon, Jun 29, 2015 at 4:17 PM, David Turner wrote: > These are necessary because alternate ref backends might store reflogs > somewhere other than .git/logs. Code that now directly manipulates > .git/logs should instead go through git-reflog. > > In a moment, we will use these functions to make

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 6:20 AM, Jeff King wrote: > On Mon, Jun 29, 2015 at 06:22:47PM -0400, Eric Sunshine wrote: >> void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm) >> { >> size_t len; >> struct strbuf f = STRBUF_INIT; >>

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 9:26 AM, Jeff King wrote: > On Mon, Jun 29, 2015 at 06:22:47PM -0400, Eric Sunshine wrote: > >> Clients of strbuf rightly expect the buffer to grow as needed in >> order to complete the requested operation. It is, therefore, both >> weird and

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 1:05 PM, Junio C Hamano wrote: > Answering myself to my earlier question, the reason is because I was > worried what happens when given fmt is a malformed strftime format > specifier. Perhaps it ends with a lone % and "% " may format to > something unexpected, or something

Re: [PATCH 3/3] introduce "format" date-mode

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 1:58 PM, Jeff King wrote: > On Tue, Jun 30, 2015 at 12:58:33PM -0400, Eric Sunshine wrote: >> Beyond the extra allocation, I was also concerned about the >> sledgehammer approach of "%s " to append a single character when there >> are mu

Re: [PATCH v6 6/7] git-reflog: add create and exists functions

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 12:07 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >>> + for (i = start; i < argc; i++) { >>> + if (safe_create_reflog(argv[i], &err, 1)) { >>> + error(

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 5:23 AM, Duy Nguyen wrote: > On Tue, Jun 30, 2015 at 11:56 AM, Eric Sunshine > wrote: >> The command "git checkout --to " is something of an anachronism, >> encompassing functionality somewhere between "checkout" and "clon

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 12:56 AM, Eric Sunshine wrote: > The command "git checkout --to " is something of an anachronism, > encompassing functionality somewhere between "checkout" and "clone". > The introduction of the git-worktree command, however, pro

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-06-30 Thread Eric Sunshine
On Tue, Jun 30, 2015 at 6:02 PM, Eric Sunshine wrote: > On Tue, Jun 30, 2015 at 5:23 AM, Duy Nguyen wrote: >> On Tue, Jun 30, 2015 at 11:56 AM, Eric Sunshine >> wrote: >>> The command "git checkout --to " is something of an anachronism, >>> e

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 12:18 PM, Junio C Hamano wrote: > Matthieu Moy writes: >> +/* >> + * Turn >> + * pick d6a2f0303e897ec257dd0e0a39a5ccb709bc2047 some message >> + * into >> + * pick d6a2f03 some message >> + */ >> +static void abbrev_sha1_in_line(struct strbuf *line) >> +{ >> + struct st

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 12:36 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> I was about to mention the same shortcoming, but you beat me to it. >> >>> Perhaps be more strict and do this instead (without >>> leading strbuf_trim): >>> >

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 12:53 PM, Junio C Hamano wrote: > From: Eric Sunshine > > The command "git checkout --to " is something of an anachronism, > encompassing functionality somewhere between "checkout" and "clone". > The introduction of the git

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 1:13 PM, Eric Sunshine wrote: > On Wed, Jul 1, 2015 at 12:53 PM, Junio C Hamano wrote: >> From: Eric Sunshine >> >> The command "git checkout --to " is something of an anachronism, >> encompassing functionality somewhere between "

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 1:13 PM, Eric Sunshine wrote: > On Wed, Jul 1, 2015 at 12:53 PM, Junio C Hamano wrote: >> * Duy seems to think "worktree add" is coming, too, so here is a >>trivial tweak of your patch from the last month, with test >>adjustments to

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 9:07 PM, Duy Nguyen wrote: > On Thu, Jul 2, 2015 at 12:13 AM, Eric Sunshine > wrote: >>>I noticed GIT_CHECKOUT_NEW_WORKTREE environment variabl that does >>>not seem to be documented. Is this something we still need? >>>The

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-02 Thread Eric Sunshine
On Thu, Jul 2, 2015 at 8:41 AM, Duy Nguyen wrote: > On Thu, Jul 2, 2015 at 9:52 AM, Eric Sunshine wrote: >> The recursion protection is indeed no longer needed and gets removed >> by the "worktree add" patch. However, there are still a few bits of >> code which wa

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-02 Thread Eric Sunshine
On Thu, Jul 2, 2015 at 8:50 AM, Duy Nguyen wrote: > On Thu, Jul 2, 2015 at 7:41 PM, Duy Nguyen wrote: >>> merge_working_tree: >>> tree = parse_tree_indirect(old->commit && >>> !opts->new_worktree_mode ? >>> old->commit->object.sha1 : >>> EMPTY_TREE_SHA1_BIN); >

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-02 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 10:52 PM, Eric Sunshine wrote: > However, there are still a few bits of > code which want to know that the checkout is happening in a new > worktree. I haven't examined them closely yet to diagnose if this > specialized knowledge can be eliminated. Perhaps

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-02 Thread Eric Sunshine
On Thu, Jul 2, 2015 at 2:45 PM, Eric Sunshine wrote: > There's another instance: 3473ad0 (checkout: don't require a work tree > when checking out into a new one, 2014-11-30) added this: > > if (!new_worktree) > setup_work_tree(); > > which the

Re: [RFC/PATCH] worktree: replace "checkout --to" with "worktree new"

2015-07-02 Thread Eric Sunshine
On Thu, Jul 2, 2015 at 3:00 PM, Eric Sunshine wrote: > On Thu, Jul 2, 2015 at 2:45 PM, Eric Sunshine wrote: >> There's another instance: 3473ad0 (checkout: don't require a work tree >> when checking out into a new one, 2014-11-30) added this: &g

[PATCH v2 02/23] Documentation/git-worktree: associate options with commands

2015-07-03 Thread Eric Sunshine
git-worktree options affect some worktree commands but not others, but this is not necessarily obvious from the option descriptions. Make this clear by indicating explicitly which commands are affected by which options. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 6

[PATCH v2 06/23] Documentation/git-worktree: add high-level 'lock' overview

2015-07-03 Thread Eric Sunshine
the high-level DESCRIPTION section, so add a generalized discussion of locking to DESCRIPTION and move the technical information to DETAILS. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git

[PATCH v2 03/23] Documentation: move linked worktree description from checkout to worktree

2015-07-03 Thread Eric Sunshine
Now that the git-worktree command exists, its documentation page is the natural place for the linked worktree description to reside. Relocate the "MULTIPLE WORKING TREES" description verbatim from git-checkout.txt to git-worktree.txt. Signed-off-by: Eric Sunshine --- When Junio queue

[PATCH v2 05/23] Documentation/git-worktree: split technical info from general description

2015-07-03 Thread Eric Sunshine
The DESCRIPTION section should provide a high-level overview of linked worktree functionality to bring users up to speed quickly, without overloading them with low-level details, so relocate the technical information to a new DETAILS section. Signed-off-by: Eric Sunshine --- Documentation/git

[PATCH v2 00/23] replace "checkout --to" with "worktree add"

2015-07-03 Thread Eric Sunshine
eset --hard" rather than "git checkout" to populate the new linked worktree. [*4*]: http://thread.gmane.org/gmane.comp.version-control.git/273032/focus=273226 Eric Sunshine (23): Documentation/git-checkout: fix incorrect worktree prune command Documentation/git-worktree: associate

[PATCH v2 01/23] Documentation/git-checkout: fix incorrect worktree prune command

2015-07-03 Thread Eric Sunshine
This was missed when "git prune --worktrees" became "git worktree prune". Signed-off-by: Eric Sunshine --- Documentation/git-checkout.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt in

[PATCH v2 07/23] Documentation/git-worktree: add EXAMPLES section

2015-07-03 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 22 ++ 1 file changed, 22 insertions(+) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 410f0b4..028bbd9 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git

[PATCH v2 04/23] Documentation/git-worktree: add BUGS section

2015-07-03 Thread Eric Sunshine
Relocate submodule warning to BUGS and enumerate missing commands. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index

[PATCH v2 09/23] checkout: relocate --to's "no branch specified" check

2015-07-03 Thread Eric Sunshine
h name. Therefore, as a preparatory step, rather than having prepare_linked_checkout() perform this check, make it the caller's responsibility. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/checkout.c b/b

[PATCH v2 13/23] worktree: introduce "add" command

2015-07-03 Thread Eric Sunshine
nd the scenes, but an upcoming patch will move the actual functionality (checkout.c:prepare_linked_checkout() and its helpers) to worktree.c. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 21 +++-- builtin/worktree.c | 32 +

[PATCH v2 10/23] checkout: prepare_linked_checkout: drop now-unused 'new' argument

2015-07-03 Thread Eric Sunshine
The only references to 'new' were folded out by the last two patches. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 0cb81ee..0dcdde2 100644 --- a/builtin/checko

[PATCH v2 08/23] checkout: fix bug with --to and relative HEAD

2015-07-03 Thread Eric Sunshine
within prepare_linked_checkout() upon 'struct branch_info'. The eventual plan is to relocate "git checkout --to" functionality to "git worktree add", and worktree.c won't have knowledge of 'struct branch_info', so removal of this dependency is a step toward

[PATCH v2 11/23] checkout: make --to unconditionally verbose

2015-07-03 Thread Eric Sunshine
ose to ease eventual code movement to worktree.c. (A --quiet flag can be added to git-worktree later if there is demand for it.) Signed-off-by: Eric Sunshine --- builtin/checkout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c inde

[PATCH v2 21/23] worktree: add: make -b/-B default to HEAD when is omitted

2015-07-03 Thread Eric Sunshine
As a convenience, like "git branch" and "git checkout -b", make "git worktree add -b " default to HEAD when is omitted. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 1 + builtin/worktree.c | 6 -- t/t2025-worktree-add.

[PATCH v2 16/23] worktree: add -b/-B options

2015-07-03 Thread Eric Sunshine
One of git-worktree's roles is to populate the new worktree, much like git-checkout, and thus, for convenience, ought to support several of the same shortcuts. Toward this goal, add -b/-B options to create a new branch and check it out in the new worktree. Signed-off-by: Eric Sunshine ---

[PATCH v2 12/23] checkout: drop 'checkout_opts' dependency from prepare_linked_checkout

2015-07-03 Thread Eric Sunshine
e command it should run to populate the new worktree. Facilitate relocation of prepare_linked_worktree() by instead having it accept the pathname and argv[] directly, thus eliminating the final references to 'struct checkout_opts'. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 9

[PATCH v2 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-03 Thread Eric Sunshine
mind. Therefore, overload it to also suppress the check for a branch already checked out elsewhere. Signed-off-by: Eric Sunshine --- I plopped this patch at the end of the series so that it can be dropped easily if desired since Junio indicated[1] that he would "moderately object" to t

[PATCH v2 20/23] worktree: extract basename computation to new function

2015-07-03 Thread Eric Sunshine
A subsequent patch will also need to compute the basename of the new worktree, so factor out this logic into a new function. Signed-off-by: Eric Sunshine --- builtin/worktree.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/builtin/worktree.c

[PATCH v2 18/23] checkout: retire --to option

2015-07-03 Thread Eric Sunshine
them by the private GIT_CHECKOUT_NEW_WORKTREE environment variable). Signed-off-by: Eric Sunshine --- builtin/checkout.c | 156 + builtin/worktree.c | 138 --- 2 files changed, 133 insertions(+), 161 dele

[PATCH v2 15/23] worktree: add --detach option

2015-07-03 Thread Eric Sunshine
One of git-worktree's roles is to populate the new worktree, much like git-checkout, and thus, for convenience, ought to support several of the same shortcuts. Toward this goal, add a --detach option to detach HEAD in the new worktree. Signed-off-by: Eric Sunshine --- Documentatio

[PATCH v2 22/23] worktree: add: auto-vivify new branch when is omitted

2015-07-03 Thread Eric Sunshine
sociates it with new worktree "../hotfix". Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 8 ++-- builtin/worktree.c | 8 ++-- t/t2025-worktree-add.sh| 7 +++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Documentation/git-w

[PATCH v2 14/23] worktree: add --force option

2015-07-03 Thread Eric Sunshine
By default, "git worktree add" refuses to create a new worktree when the requested branch is already checked out elsewhere. Add a --force option to override this safeguard. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 8 +++- builtin/worktree.c | 6

[PATCH v2 19/23] checkout: require worktree unconditionally

2015-07-03 Thread Eric Sunshine
which now check bare repository behavior of "git worktree add" instead. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 2 -- git.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index b1e68b3..5754554 1

[PATCH v2 17/23] tests: worktree: retrofit "checkout --to" tests for "worktree add"

2015-07-03 Thread Eric Sunshine
opped altogether since it becomes meaningless with retirement of "checkout --to".) Signed-off-by: Eric Sunshine --- t/{t2025-checkout-to.sh => t2025-worktree-add.sh} | 48 +++ t/t2026-prune-linked-checkouts.sh | 2 +- t/t7410-submodule-checkout

Re: [PATCH v2 07/23] Documentation/git-worktree: add EXAMPLES section

2015-07-03 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 8:17 PM, Eric Sunshine wrote: > Signed-off-by: Eric Sunshine > --- > +EXAMPLES > + > +You are middle of a refactoring session and your boss comes in and demands s/middle/in the &/ > +that you fix something immediately. You might typically us

Re: [PATCH v2 19/23] checkout: require worktree unconditionally

2015-07-03 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 8:17 PM, Eric Sunshine wrote: > In order to allow linked worktree creation via "git checkout -b" from a s/-b/--to/ > bare repository, 3473ad0 (checkout: don't require a work tree when > checking out into a new one, 2014-11-30) dropped git-ch

Re: [PATCH v2 18/23] checkout: retire --to option

2015-07-05 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 11:04 PM, Duy Nguyen wrote: > On Sat, Jul 4, 2015 at 7:17 AM, Eric Sunshine wrote: >> Now that "git worktree add" has achieved user-facing feature-parity with >> "git checkout --to", retire the latter. >> >> Move th

Re: [PATCH v2 04/23] Documentation/git-worktree: add BUGS section

2015-07-05 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 10:41 PM, Duy Nguyen wrote: > On Sat, Jul 4, 2015 at 7:17 AM, Eric Sunshine wrote: >> +git-worktree could provide more automation for tasks currently >> +performed manually or via other commands, such as: >> + >> +- `add` to create a new linked

Re: [PATCH v2 13/23] worktree: introduce "add" command

2015-07-05 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 10:53 PM, Duy Nguyen wrote: > On Sat, Jul 4, 2015 at 7:17 AM, Eric Sunshine wrote: >> COMMANDS >> >> +add :: >> + >> +Check out `` into a separate working directory, ``, creating >> +`` if necessary. The new wor

Re: [PATCH v2 08/23] checkout: fix bug with --to and relative HEAD

2015-07-05 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 10:45 PM, Duy Nguyen wrote: > On Sat, Jul 4, 2015 at 7:17 AM, Eric Sunshine wrote: >> Given "git checkout --to HEAD~1", the new worktree's HEAD should >> begin life at the current branch's HEAD~1, however, it actually ends up >> at

Re: [PATCH v2 16/23] worktree: add -b/-B options

2015-07-05 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 11:19 PM, Duy Nguyen wrote: > On Sat, Jul 4, 2015 at 7:17 AM, Eric Sunshine wrote: >> One of git-worktree's roles is to populate the new worktree, much like >> git-checkout, and thus, for convenience, ought to support several of the >> same shortc

Re: Draft of Git Rev News edition 5

2015-07-05 Thread Eric Sunshine
e criteria for deciding what merits mention in the newsletter. Is the recent introduction of git-worktree and the attendant relocation of "add" and "prune" functionality worthy? If so, perhaps the following write-up would be suitable? 8< From: Eric Sunshine Subj

Re: Draft of Git Rev News edition 5

2015-07-05 Thread Eric Sunshine
On Sun, Jul 5, 2015 at 5:13 PM, Christian Couder wrote: > On Sun, Jul 5, 2015 at 9:11 PM, Eric Sunshine wrote: >> On Sun, Jul 05, 2015 at 01:13:57PM +0200, Christian Couder wrote: >>> A draft of Git Rev News edition 5 is available here: >>> https://github.com/gi

Re: Draft of Git Rev News edition 5

2015-07-05 Thread Eric Sunshine
On Sun, Jul 5, 2015 at 6:35 PM, Thomas Ferris Nicolaisen wrote: > On Mon, Jul 6, 2015 at 12:01 AM, Eric Sunshine > wrote: >> Unfortunately, the non-ASCII characters >> in Duy's name got corrupted, and the botch is present in the patch I >> sent. Sorry. Not sure how

Re: Draft of Git Rev News edition 5

2015-07-06 Thread Eric Sunshine
On Mon, Jul 6, 2015 at 12:38 PM, Junio C Hamano wrote: > Eric Sunshine writes: >> I'm not familiar with the criteria for deciding what merits mention >> in the newsletter. Is the recent introduction of git-worktree and the >> attendant relocation of "add"

[PATCH v3 21/23] worktree: add: make -b/-B default to HEAD when is omitted

2015-07-06 Thread Eric Sunshine
As a convenience, like "git branch" and "git checkout -b", make "git worktree add -b " default to HEAD when is omitted. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 1 + builtin/worktree.c | 6 -- t/t2025-worktree-add.sh

[PATCH v3 13/23] worktree: introduce "add" command

2015-07-06 Thread Eric Sunshine
nd the scenes, but an upcoming patch will move the actual functionality (checkout.c:prepare_linked_checkout() and its helpers) to worktree.c. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 20 ++-- builtin/worktree.c | 31

[PATCH v3 14/23] worktree: add --force option

2015-07-06 Thread Eric Sunshine
By default, "git worktree add" refuses to create a new worktree when the requested branch is already checked out elsewhere. Add a --force option to override this safeguard. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 8 +++- builtin/worktree.c | 6

[PATCH v3 15/23] worktree: add --detach option

2015-07-06 Thread Eric Sunshine
One of git-worktree's roles is to populate the new worktree, much like git-checkout, and thus, for convenience, ought to support several of the same shortcuts. Toward this goal, add a --detach option to detach HEAD in the new worktree. Signed-off-by: Eric Sunshine --- Documentatio

[PATCH v3 00/23] replace "checkout --to" with "worktree add"

2015-07-06 Thread Eric Sunshine
couple new tests * minor grammatical fixes to documentation and a few commit messages [*1*]: http://thread.gmane.org/gmane.comp.version-control.git/273316 [*2*]: http://article.gmane.org/gmane.comp.version-control.git/273358 Eric Sunshine (23): Documentation/git-checkout: fix incorrect workt

[PATCH v3 22/23] worktree: add: auto-vivify new branch when is omitted

2015-07-06 Thread Eric Sunshine
sociates it with new worktree "../hotfix". Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 8 ++-- builtin/worktree.c | 8 ++-- t/t2025-worktree-add.sh| 5 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Documentation/git-w

[PATCH v3 16/23] worktree: add -b/-B options

2015-07-06 Thread Eric Sunshine
ed in the synopsis; -B is omitted.) Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 13 ++--- builtin/worktree.c | 11 +++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt

[PATCH v3 03/23] Documentation: move linked worktree description from checkout to worktree

2015-07-06 Thread Eric Sunshine
Now that the git-worktree command exists, its documentation page is the natural place for the linked worktree description to reside. Relocate the "MULTIPLE WORKING TREES" description verbatim from git-checkout.txt to git-worktree.txt. Signed-off-by: Eric Sunshine --- Documen

[PATCH v3 09/23] checkout: relocate --to's "no branch specified" check

2015-07-06 Thread Eric Sunshine
h name. Therefore, as a preparatory step, rather than having prepare_linked_checkout() perform this check, make it the caller's responsibility. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/checkout.c b/b

[PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-06 Thread Eric Sunshine
mind. Therefore, overload it to also suppress the check for a branch already checked out elsewhere. Signed-off-by: Eric Sunshine --- I plopped this patch at the end of the series so that it can be dropped easily if desired since Junio indicated[1] that he would "moderately object" to t

[PATCH v3 08/23] checkout: fix bug with --to and relative HEAD

2015-07-06 Thread Eric Sunshine
within prepare_linked_checkout() upon 'struct branch_info'. The plan is to eventually relocate "git checkout --to" functionality to "git worktree add", and worktree.c won't have knowledge of 'struct branch_info', so removal of this dependency is a st

[PATCH v3 19/23] checkout: require worktree unconditionally

2015-07-06 Thread Eric Sunshine
heck bare repository behavior of "git worktree add" instead. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 2 -- git.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index b1e68b3..5754554 100644

[PATCH v3 12/23] checkout: drop 'checkout_opts' dependency from prepare_linked_checkout

2015-07-06 Thread Eric Sunshine
e command it should run to populate the new worktree. Facilitate relocation of prepare_linked_worktree() by instead having it accept the pathname and argv[] directly, thus eliminating the final references to 'struct checkout_opts'. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 9

[PATCH v3 20/23] worktree: extract basename computation to new function

2015-07-06 Thread Eric Sunshine
A subsequent patch will also need to compute the basename of the new worktree, so factor out this logic into a new function. Signed-off-by: Eric Sunshine --- builtin/worktree.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/builtin/worktree.c

[PATCH v3 18/23] checkout: retire --to option

2015-07-06 Thread Eric Sunshine
them by the private GIT_CHECKOUT_NEW_WORKTREE environment variable). Signed-off-by: Eric Sunshine --- Documentation/git-checkout.txt | 7 -- builtin/checkout.c | 161 + builtin/worktree.c | 144 ++--

[PATCH v3 17/23] tests: worktree: retrofit "checkout --to" tests for "worktree add"

2015-07-06 Thread Eric Sunshine
opped altogether since it becomes meaningless with retirement of "checkout --to".) Signed-off-by: Eric Sunshine --- t/{t2025-checkout-to.sh => t2025-worktree-add.sh} | 48 +++ t/t2026-prune-linked-checkouts.sh | 2 +- t/t7410-submodule-checkout

[PATCH v3 10/23] checkout: prepare_linked_checkout: drop now-unused 'new' argument

2015-07-06 Thread Eric Sunshine
The only references to 'new' were folded out by the last two patches. Signed-off-by: Eric Sunshine --- builtin/checkout.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 162c822..134b6d6 100644 --- a/builtin/checko

[PATCH v3 11/23] checkout: make --to unconditionally verbose

2015-07-06 Thread Eric Sunshine
ose to ease eventual code movement to worktree.c. (A --quiet flag can be added to git-worktree later if there is demand for it.) Signed-off-by: Eric Sunshine --- builtin/checkout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c inde

[PATCH v3 05/23] Documentation/git-worktree: split technical info from general description

2015-07-06 Thread Eric Sunshine
The DESCRIPTION section should provide a high-level overview of linked worktree functionality to bring users up to speed quickly, without overloading them with low-level details, so relocate the technical information to a new DETAILS section. Signed-off-by: Eric Sunshine --- Documentation/git

[PATCH v3 02/23] Documentation/git-worktree: associate options with commands

2015-07-06 Thread Eric Sunshine
git-worktree options affect some worktree commands but not others, but this is not necessarily obvious from the option descriptions. Make this clear by indicating explicitly which commands are affected by which options. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 6

[PATCH v3 01/23] Documentation/git-checkout: fix incorrect worktree prune command

2015-07-06 Thread Eric Sunshine
This was missed when "git prune --worktrees" became "git worktree prune". Signed-off-by: Eric Sunshine --- Documentation/git-checkout.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt in

[PATCH v3 04/23] Documentation/git-worktree: add BUGS section

2015-07-06 Thread Eric Sunshine
Relocate submodule warning to BUGS and enumerate missing commands. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index

[PATCH v3 06/23] Documentation/git-worktree: add high-level 'lock' overview

2015-07-06 Thread Eric Sunshine
the high-level DESCRIPTION section, so add a generalized discussion of locking to DESCRIPTION and move the technical information to DETAILS. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git

[PATCH v3 07/23] Documentation/git-worktree: add EXAMPLES section

2015-07-06 Thread Eric Sunshine
Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 22 ++ 1 file changed, 22 insertions(+) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 0385e9a..6afff1e 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git

Re: Draft of Git Rev News edition 5

2015-07-06 Thread Eric Sunshine
On Mon, Jul 06, 2015 at 10:54:28AM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > How about this instead: prefixing with "As originally implemented", > > with a couple s/is/was/ thrown in... > > > > As originally implemented, creation of linked-w

Re: [PATCH v3 22/23] worktree: add: auto-vivify new branch when is omitted

2015-07-06 Thread Eric Sunshine
On Mon, Jul 06, 2015 at 12:19:14PM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt > > index 377ae0f..da71f50 100644 > > --- a/Documentation/git-worktree.txt > > +++ b/Documentation/g

Re: [PATCH v3 18/23] checkout: retire --to option

2015-07-07 Thread Eric Sunshine
On Mon, Jul 6, 2015 at 3:41 PM, Junio C Hamano wrote: > Eric Sunshine writes: >> Now that "git worktree add" has achieved user-facing feature-parity with >> "git checkout --to", retire the latter. >> [...] >> This effectively reverts changes

Re: [PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-07 Thread Eric Sunshine
On Mon, Jul 6, 2015 at 3:40 PM, Junio C Hamano wrote: > Eric Sunshine writes: >> As a safeguard, checking out a branch already checked out by a different >> worktree is disallowed. This behavior can be overridden with >> --ignore-other-worktrees, however, this option i

Re: [PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 4:24 AM, Eric Sunshine wrote: > On Mon, Jul 6, 2015 at 3:40 PM, Junio C Hamano wrote: >> If you are extending the history of some branch, then you would want >> to be on that branch. Why would you want to have another worktree >> that will get into a

Re: Subject: [PATCH] git am: Transform and skip patches via new hook

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 3:52 AM, Robert Collins wrote: > From 0428b0a1248fb84c584a5a6c1f110770c6615d5e Mon Sep 17 00:00:00 2001 > From: Robert Collins > Date: Tue, 7 Jul 2015 15:43:24 +1200 > Subject: [PATCH] git am: Transform and skip patches via new hook Drop the "From sha1", "Date:", and "Subj

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 3:49 PM, Jeff King wrote: > On Tue, Jul 07, 2015 at 09:31:25PM +0200, X H wrote: > >> For the moment, I'm the only one pushing to the remote, always with >> the same user (second user is planned). I use git-for-windows which is >> based on MSYS2. I have mounted the network s

Re: [PATCH v3 23/23] checkout: retire --ignore-other-worktrees in favor of --force

2015-07-07 Thread Eric Sunshine
On Tue, Jul 7, 2015 at 12:20 PM, Junio C Hamano wrote: > Eric Sunshine writes: > I would not mind "git worktree add -f" to disable the "no multiple > checkouts of the same branch" safety, but I do not think it is > sensible to remove "-i-o-w" and confla

Re: [PATCH] git_open_noatime: return with errno=0 on success

2015-07-08 Thread Eric Sunshine
On Wed, Jul 8, 2015 at 8:38 AM, Clemens Buchacher wrote: > In read_sha1_file_extended we die if read_object fails with a fatal > error. We detect a fatal error if errno is non-zero and is not > ENOENT. If the object could not be read because it does not exist, > this is not considered a fatal erro

<    1   2   3   4   5   6   7   8   9   10   >