merge master into the subtree branches

2015-06-11 Thread Nico Schlömer
Hi everyone, I have a large Git project which I would like to dissect into subprojects with their own repositories. Git subtrees are ideal for this task: I first * create a branch with the contents of only one subfoldergit subtree split -P -b and then * pull this branch into another reposit

Re: [PATCH v2] fetch-pack: optionally save packs to disk

2015-06-11 Thread Johannes Sixt
Am 11.06.2015 um 20:59 schrieb Augie Fackler: When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. When you develop server software, shouldn't you test drive the server via the bare metal protocol

Re: git_config_set(?) adding and removing creates extraneous lines

2015-06-11 Thread Matthieu Moy
Anish R Athalye writes: > Now, when running `tail -n 3 .git/config`, you see: > > [branch "master"] > [branch "master"] > description = asdf\n Yes, this is a known bug that no one fixed yet. It was planned for Tanay's (Cc-ed) GSoC last year, but the project evolved in another

git_config_set(?) adding and removing creates extraneous lines

2015-06-11 Thread Anish R Athalye
Hi all, This is a very minor bug I noticed (perhaps not even worth fixing because it’s not harmful), but I thought that I’d point it out. I found that if I used `git branch --edit-description` to add and remove descriptions a couple times, it would accumulate extra lines in my `.git/config` in

Re: [PATCH] git-checkout.txt: Document "git checkout " better

2015-06-11 Thread Scott Schmit
On Wed, Jun 10, 2015 at 08:05:32AM -0700, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > git checkout can be used to revert changes in the working tree. > > I somehow thought that concensus in the recent thread was that > "restore", not "revert", is the more appropriate wording? >

Re: [PATCH] Fix power checking on OS X

2015-06-11 Thread Eric Sunshine
On Thu, Jun 11, 2015 at 10:37 AM, Panagiotis Astithas wrote: > The output of "pmset -g batt" changed at some point from > "Currently drawing from 'AC Power'" to the slightly different > "Now drawing from 'AC Power'". Starting the match from "drawing" > makes the check work in both old and new vers

[PATCH v4] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-11 Thread Michael Rappazzo
Difference between v3 and v4 of this patch: - cleaned up changes in rearrange_squash() function - consolidated autosquash test Michael Rappazzo (1): git-rebase--interactive.sh: add config option for custom instruction format Documentation/git-rebase.txt | 7 +++ git-rebase--

[PATCH v4] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-11 Thread Michael Rappazzo
A config option 'rebase.instructionFormat' can override the default 'oneline' format of the rebase instruction list. Since the list is parsed using the left, right or boundary mark plus the sha1, they are prepended to the instruction format. Signed-off-by: Michael Rappazzo --- Documentation/git

[PATCH v2] Allow to control where the replace refs are looked for

2015-06-11 Thread Mike Hommey
It can be useful to have grafts or replace refs for specific use-cases while keeping the default "view" of the repository pristine (or with a different set of grafts/replace refs). It is possible to use a different graft file with GIT_GRAFT_FILE, but while replace refs are more powerful, they don'

Re: [PATCH] Allow to control the namespace for replace refs

2015-06-11 Thread Junio C Hamano
Mike Hommey writes: > On Thu, Jun 11, 2015 at 08:16:02AM -0700, Junio C Hamano wrote: >> Mike Hommey writes: >> >> > I do agree that this is all confusing, but allow me to point out that >> > it's already plenty confusing: "namespace" is a term that has been used to >> > designate a generic kin

Looking for feedback and help with a git-mirror for local usage

2015-06-11 Thread Bernd Naumann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have came up with an idea # Yep I know, exactly that kind of e-mail everyone wants to read ;) and I'm working currently on a shell-prototype to face the following situation and problem and need some feedback/advise: I often build in example

Re: [PATCH] Allow to control the namespace for replace refs

2015-06-11 Thread Mike Hommey
On Thu, Jun 11, 2015 at 08:16:02AM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > I do agree that this is all confusing, but allow me to point out that > > it's already plenty confusing: "namespace" is a term that has been used to > > designate a generic kind of namespace *and* refs/nam

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Junio C Hamano
Michael Edgar writes: > On Thu, Jun 11, 2015 at 10:32 AM, Jeff King wrote: >> On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: >> >>> > I see that do_fetch_pack checks server_supports("shallow"). Is that >>> > enough to cover all fetch cases? And if it is, why does it not cover the >>

RE: proxy_windows_386.exe Firewall Notification

2015-06-11 Thread BGaudreault Brian
Lol, sorry. I meant to post in the Vagrant forums. Too many projects going on at the same time! -Original Message- From: Konstantin Khomoutov [mailto:kostix+...@007spb.ru] Sent: Thursday, June 11, 2015 3:43 PM To: BGaudreault Brian Cc: git@vger.kernel.org Subject: Re: proxy_windows_386

Re: [PATCH 0/8] object_id part 2

2015-06-11 Thread Junio C Hamano
Junio C Hamano writes: > "brian m. carlson" writes: > >> On Wed, Jun 10, 2015 at 11:51:14PM +, brian m. carlson wrote: >>> On Wed, Jun 10, 2015 at 03:50:32PM -0700, Junio C Hamano wrote: >>> > "brian m. carlson" writes: >>> > > Convert struct object to object_id >>> > >>> > It seems that

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Matthieu Moy
Karthik Nayak writes: >> ... but after PATCH 7, filter and array are passed to ref_filter so you >> don't have this overhead anyway. Makes sense. >> > Yes, there we wouldn't have a ref_cbdata in 'for-each-ref'. > But this would be taken care of in 'filter_refs()'. > "Makes sense." Not sure if you

Re: proxy_windows_386.exe Firewall Notification

2015-06-11 Thread Konstantin Khomoutov
On Thu, 11 Jun 2015 17:46:58 + BGaudreault Brian wrote: > Hello, when connecting to a Vagrant Shared VM via SSH, I'm getting a > Windows Firewall prompt about 'proxy_windows_386.exe' (in C:\Program > Files\hashicorp\vagrant\embedded\gems\gems\vagrant-share-1.1.0 > \localbin\), which looks lik

Re: [PATCH] fetch-pack: optionally save packs to disk

2015-06-11 Thread Junio C Hamano
Augie Fackler writes: > @@ -708,9 +708,8 @@ static int get_pack(struct fetch_pack_args *args, > cmd.argv = argv; > av = argv; > *hdr_arg = 0; > + struct pack_header header; decl-after-stmt here... > if (!args->keep_pack && unpack_limit) { > - struct pack_

Bug report: Unhandled Exception

2015-06-11 Thread Gary England
Hello, Using git version 1.9.2-preview20140411, in Git Bash for Windows, performing a "git pull --rebase", received an unhandled exception. Here is the stack trace: MSYS-1.0.12 Build:2012-07-05 14:56 Exception: STATUS_ACCESS_VIOLATION at eip=00418DAA eax=680A38E4 ebx=685704CC ecx=00542E38 edx=0

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Karthik Nayak
On 06/12/2015 12:43 AM, Matthieu Moy wrote: Karthik Nayak writes: > On 06/11/2015 11:11 PM, Matthieu Moy wrote: >> Karthik Nayak writes: >> >>> +struct ref_filter_cbdata { >>> +struct ref_array array; >>> +struct ref_filter filter; >>> +}; >> >> I didn't notice this at first, but why i

proxy_windows_386.exe Firewall Notification

2015-06-11 Thread BGaudreault Brian
Hello, when connecting to a Vagrant Shared VM via SSH, I'm getting a Windows Firewall prompt about 'proxy_windows_386.exe' (in C:\Program Files\hashicorp\vagrant\embedded\gems\gems\vagrant-share-1.1.0\localbin\), which looks like a malware-type name. Here's the message: "Windows Security Alert

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Matthieu Moy
Karthik Nayak writes: > On 06/11/2015 11:11 PM, Matthieu Moy wrote: >> Karthik Nayak writes: >> >> > +struct ref_filter_cbdata { >> > +struct ref_array array; >> > +struct ref_filter filter; >> > +}; >> >> I didn't notice this at first, but why introduce the structure like this >> when y

[PATCH v2] fetch-pack: optionally save packs to disk

2015-06-11 Thread Augie Fackler
When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. This is made a little complicated by the fact that in some cases (like cloning from smart-http, but not from a local repo) the fetch code reads the p

Re: Submodules as first class citizens (was Re: Moving to subtrees for plugins?)

2015-06-11 Thread Jens Lehmann
Am 11.06.2015 um 18:11 schrieb Phil Hord: On Tue, Jun 9, 2015 at 2:40 PM, Jens Lehmann wrote: Am 07.06.2015 um 08:26 schrieb Stefan Beller: On 06.06.2015 12:53, Luca Milanesio wrote: On 6 Jun 2015, at 18:49, Phil Hord wrote: On Fri, Jun 5, 2015, 2:58 AM lucamilanesio wrote: Ideally, as

Re: [PATCH] git-checkout.txt: Document "git checkout " better

2015-06-11 Thread Junio C Hamano
Ed Avis writes: > I guess 'replace' would be a better word than 'restore' for the current > behaviour. Hmm, but wouldn't replace have the same issue as overwrite, namely, 'replace with what?'. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...

Re: [PATCH] fetch-pack: optionally save packs to disk

2015-06-11 Thread Stefan Beller
On Thu, Jun 11, 2015 at 10:44 AM, Augie Fackler wrote: > When developing server software, it's often helpful to save a > potentially-bogus pack for later analysis. This makes that trivial, > instead of painful. This is made a little complicated by the fact that > in some cases (like cloning from s

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Michael Edgar
On Thu, Jun 11, 2015 at 10:32 AM, Jeff King wrote: > On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: > >> > I see that do_fetch_pack checks server_supports("shallow"). Is that >> > enough to cover all fetch cases? And if it is, why does it not cover the >> > matching clone cases? >> >>

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Karthik Nayak
On 06/11/2015 11:11 PM, Matthieu Moy wrote: Karthik Nayak writes: > +struct ref_filter_cbdata { > +struct ref_array array; > +struct ref_filter filter; > +}; I didn't notice this at first, but why introduce the structure like this when you are going to turn it into pointers later in PA

Re: [PATCH/WIP v2 05/19] am: split out mbox/maildir patches with git-mailsplit

2015-06-11 Thread Stefan Beller
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan wrote: > git-am.sh supports mbox, stgit and mercurial patches. Re-implement > support for splitting out mbox/maildirs using git-mailsplit, while also > implementing the framework required to support other patch formats in > the future. > > Re-implement sup

Re: [PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Matthieu Moy
Karthik Nayak writes: > +struct ref_filter_cbdata { > + struct ref_array array; > + struct ref_filter filter; > +}; I didn't notice this at first, but why introduce the structure like this when you are going to turn it into pointers later in PATCH 7: Karthik Nayak writes: > --- a/ref-

[PATCH] fetch-pack: optionally save packs to disk

2015-06-11 Thread Augie Fackler
When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. This is made a little complicated by the fact that in some cases (like cloning from smart-http, but not from a local repo) the fetch code reads the p

Re: [PATCH/WIP v2 04/19] am: implement patch queue mechanism

2015-06-11 Thread Stefan Beller
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan wrote: > git-am applies a series of patches. If the process terminates > abnormally, we want to be able to resume applying the series of patches. > This requires the session state to be saved in a persistent location. > > Implement the mechanism of a "patc

[PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Karthik Nayak
Introduce filter_refs() which will act as an API for filtering a set of refs. Based on the type of refs the user has requested, we iterate through those refs and apply filters as per the given ref_filter structure and finally store the filtered refs in the ref_array structure. Currently this will

Re: [PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Karthik Nayak
On 06/11/2015 10:30 PM, Matthieu Moy wrote: I think it is more common to have options at the end, so I'd write it as filter_refs(&array, &filter, FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN); (changing the declaration too, obviously) I really like the way cmd_for_each_ref looks like now.

Re: [PATCH v7 0/12] Create ref-filter from for-each-ref

2015-06-11 Thread Matthieu Moy
Karthik Nayak writes: > The previous version of this patch can be found here: > http://thread.gmane.org/gmane.comp.version-control.git/270922 > > Changes found in this version: > *Various changes to the 'filter_refs()' function. > *Split 'for-each-ref: clean up code' into two commits. > *

Re: [PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Matthieu Moy
Karthik Nayak writes: > + filter_refs(&array, FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN, > &filter); I think it is more common to have options at the end, so I'd write it as filter_refs(&array, &filter, FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN); (changing the declaration too, obvio

[PATCH v7 02/12] for-each-ref: clean up code

2015-06-11 Thread Karthik Nayak
In 'grab_single_ref()' remove the extra count variable 'cnt' and use the variable 'grab_cnt' of structure 'grab_ref_cbdata' directly instead. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/for-each-ref.c | 7 ++- 1 file changed, 2 insertion

Re: Submodules as first class citizens (was Re: Moving to subtrees for plugins?)

2015-06-11 Thread Phil Hord
On Tue, Jun 9, 2015 at 2:40 PM, Jens Lehmann wrote: > Am 07.06.2015 um 08:26 schrieb Stefan Beller: >> >> On 06.06.2015 12:53, Luca Milanesio wrote: On 6 Jun 2015, at 18:49, Phil Hord wrote: On Fri, Jun 5, 2015, 2:58 AM lucamilanesio wrote: > > Ideally, as a "git clon

[PATCH v7 07/12] for-each-ref: rename some functions and make them public

2015-06-11 Thread Karthik Nayak
Rename some of the functions and make them publicly available. This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to make meaningful, targeted services available to other commands via public APIs. Functions renamed are: parse_atom()-> parse_ref_filter_a

[PATCH v7 08/12] for-each-ref: rename variables called sort to sorting

2015-06-11 Thread Karthik Nayak
Rename all the variables called sort to sorting to match the function/structure name changes made in the previous patch. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/for-each-ref.c | 28 ++-- 1 file changed, 14 inserti

[PATCH v7 12/12] ref-filter: make 'ref_array_item' use a FLEX_ARRAY for refname

2015-06-11 Thread Karthik Nayak
This would remove the need of using a pointer to store refname. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- ref-filter.c | 7 --- ref-filter.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ref-filter.c b/ref-filter.c ind

[PATCH v7 09/12] ref-filter: add 'ref-filter.h'

2015-06-11 Thread Karthik Nayak
This is step one of creating a common library for 'for-each-ref', 'branch -l' and 'tag -l'. This creates a header file with the functions and data structures that ref-filter will provide. We move the data structures created in for-each-ref to this header file. Mentored-by: Christian Couder Mentor

[PATCH v7 10/12] ref-filter: move code from 'for-each-ref'

2015-06-11 Thread Karthik Nayak
Move most of the code from 'for-each-ref' to 'ref-filter' to make it publicly available to other commands, this is to unify the code of 'tag -l', 'branch -l' and 'for-each-ref' so that they can share their implementations with each other. Add 'ref-filter' to the Makefile, this completes the moveme

[PATCH v7 11/12] for-each-ref: introduce filter_refs()

2015-06-11 Thread Karthik Nayak
Introduce filter_refs() which will act as an API for filtering a set of refs. Based on the type of refs the user has requested, we iterate through those refs and apply filters as per the given ref_filter structure and finally store the filtered refs in the ref_array structure. Currently this will

[PATCH v7 06/12] for-each-ref: introduce 'ref_array_clear()'

2015-06-11 Thread Karthik Nayak
Introduce and implement 'ref_array_clear()' which will free all allocated memory for 'ref_array'. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/for-each-ref.c | 21 + 1 file changed, 21 insertions(+) diff --git a/builtin/f

[PATCH v7 05/12] for-each-ref: introduce new structures for better organisation

2015-06-11 Thread Karthik Nayak
Introduce 'ref_filter_cbdata' which will hold 'ref_filter' (conditions to filter the refs on) and 'ref_array' (the array of ref_array_items). Modify the code to use these new structures. This is a preparatory patch to eventually move code from 'for-each-ref' to 'ref-filter' and make it publicly av

[PATCH v7 04/12] for-each-ref: rename 'refinfo' to 'ref_array_item'

2015-06-11 Thread Karthik Nayak
Rename 'refinfo' to 'ref_array_item' as a preparatory step for introduction of new structures in the forthcoming patch. Re-order the fields in 'ref_array_item' so that refname can be eventually converted to a FLEX_ARRAY. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Kar

[PATCH v7 03/12] for-each-ref: change comment in ref_sort

2015-06-11 Thread Karthik Nayak
The comment in 'ref_sort' hasn't been changed 9f613dd. Change the comment to reflect changes made in the code since 9f613dd. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/for-each-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v7 01/12] for-each-ref: extract helper functions out of grab_single_ref()

2015-06-11 Thread Karthik Nayak
Extract two helper functions out of grab_single_ref(). Firstly, new_refinfo() which is used to allocate memory for a new refinfo structure and copy the objectname, refname and flag to it. Secondly, match_name_as_path() which when given an array of patterns and the refname checks if the refname matc

Re: [PATCH 4/8] Add a utility function to make parsing hex values easier.

2015-06-11 Thread Michael Haggerty
On 06/09/2015 06:28 PM, brian m. carlson wrote: > get_oid_hex is already available for parsing hex object IDs into struct > object_id, but parsing code still must hard-code the number of bytes > read. Introduce parse_oid_hex, which accepts an optional length, and > also returns the number of bytes

[PATCH v7 0/12] Create ref-filter from for-each-ref

2015-06-11 Thread Karthik Nayak
The previous version of this patch can be found here: http://thread.gmane.org/gmane.comp.version-control.git/270922 Changes found in this version: *Various changes to the 'filter_refs()' function. *Split 'for-each-ref: clean up code' into two commits. *Other small changes. -- Regards

Re: Minor issue: bad Spanish translation

2015-06-11 Thread Gabriel
I think I've found where this issue is located: https://translations.launchpad.net/ubuntu/quantal/+source/git/+pots/git/es/+filter?person=franciscomol I'll try to fix it over there. Cheers, Gabriel El jue, 11 de jun 2015 a las 12:47 , Junio C Hamano escribió: Gabriel writes: Hi Johannes

Re: Minor issue: bad Spanish translation

2015-06-11 Thread Junio C Hamano
Gabriel writes: > Hi Johannes, > > I tried following your instructions but I can locate the sentence > where the bad translation is. Please see here: > http://stackoverflow.com/questions/30783818/find-instance-of-string-in-git-core-with-git-grep > > Any advice? Perhaps you are seeing a bad trans

Re: [PATCH 3/8] Convert struct ref to use object_id.

2015-06-11 Thread Michael Haggerty
I visually inspected patches 1 and 2 without finding any problems. Regarding this patch, I saw a few functions where you could convert local variables to "struct object_id" and then change function calls like hashcpy() to oidcpy(). See below. I'm not sure if it makes sense to do that in this same

Re: [PATCH] Documentation clarification on git-checkout regarding ours/theirs

2015-06-11 Thread Junio C Hamano
"Simon A. Eugster" writes: > From: "Simon A. Eugster" > > Signed-off-by: Simon A. Eugster > --- > Documentation/git-checkout.txt | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt > index d263a56..5c3ef8

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Matthieu Moy
Antoine Delaite writes: > - # start_bad_good is used to detect if we did a > - # 'git bisect start bad_rev good_rev' > - start_bad_good=0 > + # terms_defined is used to detect if we did a > + # 'git bisect start bad_rev good_rev' or if the user > + # defined his own terms

Re: [PATCH v2 2/7] bisect: replace hardcoded "bad|good" by variables

2015-06-11 Thread Matthieu Moy
Antoine Delaite writes: > - if (!strcmp(refname, "bad")) { > + char good_prefix[256]; > + strcpy(good_prefix, name_good); > + strcat(good_prefix, "-"); You are silently adding a restriction here: name_good must be small enough to fit in a 256-bytes array. It's not a terrible rest

Re: [PATCH] Allow to control the namespace for replace refs

2015-06-11 Thread Junio C Hamano
Mike Hommey writes: > I do agree that this is all confusing, but allow me to point out that > it's already plenty confusing: "namespace" is a term that has been used to > designate a generic kind of namespace *and* refs/namespaces. See for > example: > > https://github.com/git/git/blob/master/Doc

Re: Minor issue: bad Spanish translation

2015-06-11 Thread Gabriel
Hi Johannes, I tried following your instructions but I can locate the sentence where the bad translation is. Please see here: http://stackoverflow.com/questions/30783818/find-instance-of-string-in-git-core-with-git-grep Any advice? Cheers, Gabriel El jue, 11 de jun 2015 a las 12:10 , Gabrie

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> Junio C Hamano writes: >> >>> +bisect_terms () { >>> + test $# -eq 2 || >>> + die "You need to give me at least two arguments" >>> + >>> + if ! test -s "$GIT_DIR/BISECT_START" >>> + then >>> + echo $1 >"$GIT_DIR/BISECT_TERMS"

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> Antoine Delaite writes: >> >>> -USAGE='[help|start|bad|good|new|old|skip|next|reset|visualize|replay|log|run]' >>> +USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]' >> >> I think this patch makes the whole se

Re: [PATCH] git-checkout.txt: Document "git checkout " better

2015-06-11 Thread Ed Avis
I guess 'replace' would be a better word than 'restore' for the current behaviour. -- Ed Avis -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] git-checkout.txt: Document "git checkout " better

2015-06-11 Thread Junio C Hamano
Torsten Bögershausen writes: > On 2015-06-10 17.05, Junio C Hamano wrote: > >>> -git-checkout - Checkout a branch or paths to the working tree >>> +git-checkout - Switch branches or reverts changes in the working tree >> >> Two verbs in different moods; either "switch branches or restore >> chan

Re: [PATCH] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-11 Thread Johannes Schindelin
Hi Mike, On 2015-06-11 16:02, Mike Rappazzo wrote: > On Thu, Jun 11, 2015 at 9:40 AM, Johannes Schindelin > wrote: >> >> On 2015-06-11 03:30, Michael Rappazzo wrote: >> >>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh >>> index dc3133f..6d14315 100644 >>> --- a/git-rebase-

[PATCH] Fix power checking on OS X

2015-06-11 Thread Panagiotis Astithas
The output of "pmset -g batt" changed at some point from "Currently drawing from 'AC Power'" to the slightly different "Now drawing from 'AC Power'". Starting the match from "drawing" makes the check work in both old and new versions of OS X. Signed-off-by: Panagiotis Astithas --- contrib/hooks/

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Jeff King
On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: > > I see that do_fetch_pack checks server_supports("shallow"). Is that > > enough to cover all fetch cases? And if it is, why does it not cover the > > matching clone cases? > > I think this replacement check would do > > if ((args->de

Re: [PATCH] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-11 Thread Mike Rappazzo
On Thu, Jun 11, 2015 at 9:40 AM, Johannes Schindelin wrote: > Hi Michael, > > On 2015-06-11 03:30, Michael Rappazzo wrote: > >> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh >> index dc3133f..6d14315 100644 >> --- a/git-rebase--interactive.sh >> +++ b/git-rebase--interactive

Re: [PATCH] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-11 Thread Johannes Schindelin
Hi Michael, On 2015-06-11 03:30, Michael Rappazzo wrote: > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > index dc3133f..6d14315 100644 > --- a/git-rebase--interactive.sh > +++ b/git-rebase--interactive.sh > @@ -740,10 +740,19 @@ collapse_todo_ids() { > # "pick sha1 fixup

Re: [PATCH v2 2/2] pull: allow dirty tree when rebase.autostash enabled

2015-06-11 Thread Paul Tan
On Sun, Jun 7, 2015 at 5:12 AM, Kevin Daudt wrote: > From: Kevin Daudt > > rebase learned to stash changes when it encounters a dirty work tree, but > git pull --rebase does not. > > Only verify if the working tree is dirty when rebase.autostash is not > enabled. > > Signed-off-by: Kevin Daudt

Re: [PATCH v2 1/2] t5520-pull: Simplify --rebase with dirty tree test

2015-06-11 Thread Paul Tan
On Sun, Jun 7, 2015 at 5:12 AM, Kevin Daudt wrote: > @@ -278,25 +291,6 @@ test_expect_success 'rebased upstream + fetch + pull > --rebase' ' > > ' > > -test_expect_success 'pull --rebase dies early with dirty working directory' ' > - > - git checkout to-rebase && > - git update-ref r

Re: [PATCH] clone: check if server supports shallow clones

2015-06-11 Thread Duy Nguyen
On Thu, Jun 11, 2015 at 2:05 AM, Jeff King wrote: > On Wed, Jun 10, 2015 at 02:35:20PM -0400, Mike Edgar wrote: > >> When the user passes --depth to git-clone the server's capabilities are >> not currently consulted. The client will send shallow requests even if >> the server does not understand t

[PATCH] Documentation clarification on git-checkout regarding ours/theirs

2015-06-11 Thread Simon A. Eugster
From: "Simon A. Eugster" Signed-off-by: Simon A. Eugster --- Documentation/git-checkout.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index d263a56..5c3ef86 100644 --- a/Documentation/git-checkout.txt

Re: [PATCH] git-checkout.txt: Document

2015-06-11 Thread Ed Avis
> I agree, the word 'revert' is already taken for the operation of creating a new commit which undoes some earlier commit. So 'revert' cannot be used for the operation of overwriting a working tree file with its contents from the repository. But just because 'revert' is not a good choice, doesn't

[PATCH/WIP v2 18/19] cache-tree: introduce write_index_as_tree()

2015-06-11 Thread Paul Tan
A caller may wish to write a temporary index as a tree. However, write_cache_as_tree() assumes that the index was read from, and will write to, the default index file path. Introduce write_index_as_tree() which removes this limitation by allowing the caller to specify its own index_state and index

[PATCH/WIP v2 19/19] am: implement 3-way merge

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --3way option, and if set, would attempt to do a 3-way merge if the initial patch application fails. Re-implement this feature through the fall_back_threeway() function. Signed-off-by: Paul Tan --- builtin/am.c

[PATCH/WIP v2 08/19] am: apply patch with git-apply

2015-06-11 Thread Paul Tan
Implement applying the patch to the index using git-apply. Signed-off-by: Paul Tan --- builtin/am.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/builtin/am.c b/builtin/am.c index a1db474..b725a74 100644 --- a/builtin/

[PATCH/WIP v2 16/19] am: exit with user friendly message on patch failure

2015-06-11 Thread Paul Tan
Since ced9456 (Give the user a hint for how to continue in the case that git-am fails because it requires user intervention, 2006-05-02), git-am prints additional information on how the user can re-invoke git-am to resume patch application after resolving the failure. Re-implement this through the

[PATCH/WIP v2 15/19] am: implement quiet option

2015-06-11 Thread Paul Tan
Since 0e987a1 (am, rebase: teach quiet option, 2009-06-16), git-am supported the --quiet option and GIT_QUIET environment variable, and when told to be quiet, would only speak on failure. Re-implement this by introducing the say() function, which works like fprintf_ln(), but would only write to the

[PATCH/WIP v2 10/19] am: refresh the index at start

2015-06-11 Thread Paul Tan
If a file is unchanged but stat-dirty, git-apply may erroneously fail to apply patches, thinking that they conflict with a dirty working tree. As such, since 2a6f08a (am: refresh the index at start and --resolved, 2011-08-15), git-am will refresh the index before applying patches. Re-implement thi

[PATCH/WIP v2 14/19] am: implement --abort

2015-06-11 Thread Paul Tan
Since 3e5057a (git am --abort, 2008-07-16), git-am supported the --abort option that will rewind HEAD back to the original commit. Re-implement this feature through am_abort(). Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), to prevent commits made s

[PATCH/WIP v2 17/19] am: implement am --signoff

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --signoff option which will append a signoff at the end of the commit messsage. Re-implement this feature by calling append_signoff() if the option is set. Signed-off-by: Paul Tan --- builtin/am.c | 13 +

[PATCH/WIP v2 11/19] am: refuse to apply patches if index is dirty

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am will refuse to apply patches if the index is dirty. Re-implement this behavior. Signed-off-by: Paul Tan --- builtin/am.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/buil

[PATCH/WIP v2 12/19] am: implement --resolved/--continue

2015-06-11 Thread Paul Tan
Since 0c15cc9 (git-am: --resolved., 2005-11-16), git-am supported resuming from a failed patch application. The user will manually apply the patch, and the run git am --resolved which will then commit the resulting index. Re-implement this feature by introducing am_resolve(). Signed-off-by: Paul T

[PATCH/WIP v2 13/19] am: implement --skip

2015-06-11 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported resuming from a failed patch application by skipping the current patch. Re-implement this feature by introducing am_skip(). Signed-off-by: Paul Tan --- builtin/am.c | 121

[PATCH/WIP v2 09/19] am: commit applied patch

2015-06-11 Thread Paul Tan
Implement do_commit(), which commits the index which contains the results of applying the patch, along with the extracted commit message and authorship information. Signed-off-by: Paul Tan --- builtin/am.c | 50 ++ 1 file changed, 46 insertions(+),

[PATCH/WIP v2 03/19] am: implement skeletal builtin am

2015-06-11 Thread Paul Tan
For the purpose of rewriting git-am.sh into a C builtin, implement a skeletal builtin/am.c that redirects to $GIT_EXEC_PATH/git-am if the environment variable _GIT_USE_BUILTIN_AM is not defined. Since in the Makefile git-am.sh takes precedence over builtin/am.c, $GIT_EXEC_PATH/git-am will contain t

[PATCH/WIP v2 06/19] am: detect mbox patches

2015-06-11 Thread Paul Tan
Since 15ced75 (git-am foreign patch support: autodetect some patch formats, 2009-05-27), git-am.sh is able to autodetect mbox, stgit and mercurial patches through heuristics. Re-implement support for autodetecting mbox/maildir files. Helped-by: Eric Sunshine Signed-off-by: Paul Tan --- Notes:

[PATCH/WIP v2 01/19] wrapper: implement xopen()

2015-06-11 Thread Paul Tan
A common usage pattern of open() is to check if it was successful, and die() if it was not: int fd = open(path, O_WRONLY | O_CREAT, 0777); if (fd < 0) die_errno(_("Could not open '%s' for writing."), path); Implement a wrapper function xopen() that does the above s

[PATCH/WIP v2 04/19] am: implement patch queue mechanism

2015-06-11 Thread Paul Tan
git-am applies a series of patches. If the process terminates abnormally, we want to be able to resume applying the series of patches. This requires the session state to be saved in a persistent location. Implement the mechanism of a "patch queue", represented by 2 integers -- the index of the cur

[PATCH/WIP v2 02/19] wrapper: implement xfopen()

2015-06-11 Thread Paul Tan
A common usage pattern of fopen() is to check if it succeeded, and die() if it failed: FILE *fp = fopen(path, "w"); if (!fp) die_errno(_("could not open '%s' for writing"), path); Implement a wrapper function xfopen() for the above, so that we can save a few lines

[PATCH/WIP v2 07/19] am: extract patch, message and authorship with git-mailinfo

2015-06-11 Thread Paul Tan
For the purpose of applying the patch and committing the results, implement extracting the patch data, commit message and authorship from an e-mail message using git-mailinfo. git-mailinfo is run as a separate process, but ideally in the future, we should be be able to access its functionality dir

[PATCH/WIP v2 05/19] am: split out mbox/maildir patches with git-mailsplit

2015-06-11 Thread Paul Tan
git-am.sh supports mbox, stgit and mercurial patches. Re-implement support for splitting out mbox/maildirs using git-mailsplit, while also implementing the framework required to support other patch formats in the future. Re-implement support for the --patch-format option (since a5a6755 (git-am for

[PATCH/WIP v2 00/19] Make git-am a builtin

2015-06-11 Thread Paul Tan
This is a re-roll of [v1]. Thanks Junio, Torsten, Jeff, Eric for the reviews last round. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/270048 git-am is a commonly used command for applying a series of patches from a mailbox to the current branch. Currently, it is

[PATCH v2 00/19] Make git-am a builtin

2015-06-11 Thread Paul Tan
This is a re-roll of [v1]. Thanks Junio, Torsten, Jeff, Eric for the reviews last round. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/270048 git-am is a commonly used command for applying a series of patches from a mailbox to the current branch. Currently, it is

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Matthieu Moy
Junio C Hamano writes: > Junio C Hamano writes: > >> +bisect_terms () { >> +test $# -eq 2 || >> +die "You need to give me at least two arguments" >> + >> +if ! test -s "$GIT_DIR/BISECT_START" >> +then >> +echo $1 >"$GIT_DIR/BISECT_TERMS" && >> +echo $2 >>"

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-11 Thread Matthieu Moy
Junio C Hamano writes: > Antoine Delaite writes: > >> -USAGE='[help|start|bad|good|new|old|skip|next|reset|visualize|replay|log|run]' >> +USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]' > > I think this patch makes the whole series go in the right direction.

Re: "git difftool" is not working as expected during MERGING

2015-06-11 Thread David Aguilar
On Wed, Jun 10, 2015 at 03:12:21PM +0200, Bossert, Andre wrote: > Hello, > > i've tested "git difftool" with -t --ext-cmd and other options to see > my diff with external tools, but it always show internal text-diff in > console. The same tests with "git mergetool" working as expected. I've > comp