Re: Subtree in Git

2013-02-28 Thread Kindjal
David Michael Barr rr-dav.id.au> writes: > From a quick survey, it appears there are no more than 55 patches > squashed into the submitted patch. > As I have an interest in git-subtree for maintaining the out-of-tree > version of vcs-svn/ and a desire to improve my rebase-fu, I am tempted > to m

Re: how to check pending commits to be pushed?

2013-02-28 Thread Patricia Bittencourt Egeland
Inside the super repo, I used "git submodule foreach", that way (which worked fine): git submodule foreach "git status || true" No idea why the line bellow didn't work: git submodule foreach "git status" Thanks, Patricia On Feb 28, 2013, at 11:58 AM, Joachim Schmitz wrote: > Patricia Bittenco

Re: [PATCH] diff: Fix rename pretty-print when suffix and prefix overlap

2013-02-28 Thread Junio C Hamano
Antoine Pelisse writes: > When considering a rename for two files that have a suffix and a prefix > that can overlap, a confusing line is shown. As an example, renaming > "a/b/b/c" to "a/b/c" shows "a/b/{ => }/b/c", instead of "a/b/{b => }/c" > > Currently, what we do is calculate the common pref

Re: [PATCH v8 4/5] Implement line-history search (git log -L)

2013-02-28 Thread Junio C Hamano
Junio C Hamano writes: > Overall, I like this better than the "log --follow" hack; as the > revision traversal is done without any pathspec when being "careful > and slow" (aka -M), you do not suffer from the "just use a singleton > pathspec globally regardless of what other history paths are bei

Re: [PATCH] diff: Fix rename pretty-print when suffix and prefix overlap

2013-02-28 Thread Antoine Pelisse
On Thu, Feb 28, 2013 at 11:14 PM, Thomas Rast wrote: > Antoine Pelisse writes: > >> diff --git a/diff.c b/diff.c >> index 9038f19..e1d82c9 100644 >> --- a/diff.c >> +++ b/diff.c >> @@ -1177,7 +1177,16 @@ static char *pprint_rename(const char *a, const char >> *b) >> - while (a <= old && b <=

Re: [PATCH] diff: Fix rename pretty-print when suffix and prefix overlap

2013-02-28 Thread Thomas Rast
Antoine Pelisse writes: > diff --git a/diff.c b/diff.c > index 9038f19..e1d82c9 100644 > --- a/diff.c > +++ b/diff.c > @@ -1177,7 +1177,16 @@ static char *pprint_rename(const char *a, const char > *b) > - while (a <= old && b <= new && *old == *new) { > + /* > + * Note: > + * i

[PATCH] diff: Fix rename pretty-print when suffix and prefix overlap

2013-02-28 Thread Antoine Pelisse
When considering a rename for two files that have a suffix and a prefix that can overlap, a confusing line is shown. As an example, renaming "a/b/b/c" to "a/b/c" shows "a/b/{ => }/b/c", instead of "a/b/{b => }/c" Currently, what we do is calculate the common prefix ("a/b/"), and the common suffix

Re: [PATCH 2/2] describe: Exclude --all --match=PATTERN

2013-02-28 Thread Junio C Hamano
Junio C Hamano writes: > I am not sure if this is (1) "behaviour is sometimes useful in > narrow cases but is not explained well", (2) "behaviour does not > make sense in any situation", or (3) "the combination can make sense > if corrected, but the current behaviour is buggy". If it is (2) or >

[PATCH v2] contrib/subtree: allow addition of remote branch with name not locally present

2013-02-28 Thread Paul Campbell
cmd_add() attempts to check for the validity of refspec for the repository it is about to add as a subtree. It tries to do so before contacting the repository. If the refspec happens to exist locally (say 'master') then the test passes and the repo is fetched. If the refspec doesn't exist locally t

Re: [PATCH v8 4/5] Implement line-history search (git log -L)

2013-02-28 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> Junio C Hamano writes: >> +/* + * NEEDSWORK: manually building a diff here is not the Right + * Thing(tm). log -L should be built into the diff pipeline. >>> >>> I am not sure about this design, and do not necessarily agree that

Re: [BUG/PATCH] contrib/subtree: allow addition of remote branch with name not locally present

2013-02-28 Thread Paul Campbell
On Thu, Feb 28, 2013 at 12:20 AM, Junio C Hamano wrote: > Paul Campbell writes: > >> cmd_add() attempts to check for the validity of refspec for the repository >> it is about to add as a subtree. It tries to do so before contacting the >> repository. If the refspec happens to exist locally (say '

Re: [PATCH v8 4/5] Implement line-history search (git log -L)

2013-02-28 Thread Junio C Hamano
Thomas Rast writes: > Junio C Hamano writes: > >>> +/* >>> + * NEEDSWORK: manually building a diff here is not the Right >>> + * Thing(tm). log -L should be built into the diff pipeline. >> >> I am not sure about this design, and do not necessarily agree that >> wedging this to the diff pipelin

Re: [PATCH v8 0/5] git log -L

2013-02-28 Thread Junio C Hamano
Thomas Rast writes: > For an instructive example, apply it and run > > git log -L:archiver:archive.h > > in your git.git. Fun ;-) This is queued at the tip of 'pu' so that poeple can have fun. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message

Re: [PATCH v8 4/5] Implement line-history search (git log -L)

2013-02-28 Thread Thomas Rast
Junio C Hamano writes: >> +/* >> + * NEEDSWORK: manually building a diff here is not the Right >> + * Thing(tm). log -L should be built into the diff pipeline. > > I am not sure about this design, and do not necessarily agree that > wedging this to the diff pipeline is the right future direction

Re: [PATCH v8 1/5] Refactor parse_loc

2013-02-28 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> From: Bo Yang >> >> We want to use the same style of -L n,m argument for 'git log -L' as >> for git-blame. Refactor the argument parsing of the range arguments >> from builtin/blame.c to the (new) file that will hold the 'git log -L' >> logic.

Re: zsh completion broken for file completion

2013-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 28/02/2013 19:43, Matthieu Moy ha scritto: > Hi, > > The completion for e.g. "git add file" is broken in master. I get > the following result: > > git add fo__gitcomp_file:8: command not found: compgen > > The guilty commit is fea16b47b60 (Fri Ja

Re: how to check pending commits to be pushed?

2013-02-28 Thread Joachim Schmitz
Patricia Bittencourt Egeland wrote: Hi, Does someone know how to identify pending commits to be pushed in a local super repository (with quite some submodules), with git-1.6.5-1 ? git status ? Bye, Jojo -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

zsh completion broken for file completion

2013-02-28 Thread Matthieu Moy
Hi, The completion for e.g. "git add file" is broken in master. I get the following result: git add fo__gitcomp_file:8: command not found: compgen The guilty commit is fea16b47b60 (Fri Jan 11 19:48:43 2013, Manlio Perillo, git-completion.bash: add support for path completion), which introduces a

Re: [PATCH v8 4/5] Implement line-history search (git log -L)

2013-02-28 Thread Junio C Hamano
Thomas Rast writes: > @@ -138,6 +155,11 @@ Examples > This makes sense only when following a strict policy of merging all > topic branches when staying on a single integration branch. > > +git log -L '/int main/',/^}/:main.c:: > + > + Shows how the function `main()` in the file

Re: [PATCH v8 3/5] Export rewrite_parents() for 'log -L'

2013-02-28 Thread Junio C Hamano
Thomas Rast writes: > From: Bo Yang > > The function rewrite_one is used to rewrite a single > parent of the current commit, and is used by rewrite_parents > to rewrite all the parents. > > Decouple the dependence between them by making rewrite_one > a callback function that is passed to rewrite

Re: [PATCH v8 2/5] blame: introduce $ as "end of file" in -L syntax

2013-02-28 Thread Junio C Hamano
Thomas Rast writes: > To save the user a lookup of the last line number, introduce $ as a > shorthand for the last line. This is mostly useful to spell "until > the end of the file" as '-L,$'. Doesn't "-L " or "-L ," do that already? If it were to introduce "-L $-4," or "-L$-4,+2", I would und

[RFC] optimize set_shared_perm()

2013-02-28 Thread Torsten Bögershausen
optimize set_shared_perm() in path.c: - sometimes the chown() function is called even when not needed. (This can be provoced by running t1301, and adding some debug code) Save a chmod from 400 to 400, or from 600->600 on these files: .git/info/refs+ .git/objects/info/packs+ Save chmod

Re: [PATCH v8 1/5] Refactor parse_loc

2013-02-28 Thread Junio C Hamano
Thomas Rast writes: > From: Bo Yang > > We want to use the same style of -L n,m argument for 'git log -L' as > for git-blame. Refactor the argument parsing of the range arguments > from builtin/blame.c to the (new) file that will hold the 'git log -L' > logic. > > To accommodate different data

[PATCH v8 4/5] Implement line-history search (git log -L)

2013-02-28 Thread Thomas Rast
This is a rewrite of much of Bo's work, mainly in an effort to split it into smaller, easier to understand routines. The algorithm is built around the struct range_set, which encodes a series of line ranges as intervals [a,b). This is used in two contexts: * A set of lines we are tracking (which

[PATCH v8 5/5] log -L: :pattern:file syntax to find by funcname

2013-02-28 Thread Thomas Rast
This new syntax finds a funcname matching /pattern/, and then takes from there up to (but not including) the next funcname. So you can say git log -L:main:main.c and it will dig up the main() function and show its line-log, provided there are no other funcnames matching 'main'. Signed-off-by:

[PATCH v8 1/5] Refactor parse_loc

2013-02-28 Thread Thomas Rast
From: Bo Yang We want to use the same style of -L n,m argument for 'git log -L' as for git-blame. Refactor the argument parsing of the range arguments from builtin/blame.c to the (new) file that will hold the 'git log -L' logic. To accommodate different data structures in blame and log -L, the

[PATCH v8 3/5] Export rewrite_parents() for 'log -L'

2013-02-28 Thread Thomas Rast
From: Bo Yang The function rewrite_one is used to rewrite a single parent of the current commit, and is used by rewrite_parents to rewrite all the parents. Decouple the dependence between them by making rewrite_one a callback function that is passed to rewrite_parents. Then export rewrite_parent

[PATCH v8 2/5] blame: introduce $ as "end of file" in -L syntax

2013-02-28 Thread Thomas Rast
To save the user a lookup of the last line number, introduce $ as a shorthand for the last line. This is mostly useful to spell "until the end of the file" as '-L,$'. Signed-off-by: Thomas Rast --- Documentation/line-range-format.txt | 6 ++ line-log.c | 8

[PATCH v8 0/5] git log -L

2013-02-28 Thread Thomas Rast
Here's another shot :-) For an instructive example, apply it and run git log -L:archiver:archive.h in your git.git. Last time around, apart from some minor issues, there was one main point discussed[1]: it should be possible to do the line-log in two separate steps, one for filtering and one