Re: [PATCH] refs.c: fix fread error handling

2013-03-23 Thread Junio C Hamano
Thanks. -- 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] checkout: avoid unncessary match_pathspec calls

2013-03-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > --- > Junio, this patch clearly conflicts wih nd/magic-pathspecs. Do you > want me to: > > - hold it off until nd/magic-pathspecs graduates > - rebase on top of nd/magic-pathspecs and repost > - leave it to you to handle conflicts > ? I'd prefer to take sm

Re: [PATCH v2 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-23 Thread Eric Sunshine
On Sat, Mar 23, 2013 at 9:31 AM, John Keeping wrote: > 1) the shell opens "output" to redirect the difftool output > 2) difftool copies the empty "output" to the temporary directory > 3) difftool runs "ls" which writes to "output" > 4) difftool copies the empty "output" file back over the output o

Re: [PATCH] checkout: add --sparse for restoring files in sparse checkout mode

2013-03-23 Thread Eric Sunshine
On Sun, Mar 24, 2013 at 1:06 AM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt > index 8edcdca..45a2b53 100644 > --- a/Documentation/git-checkout.txt > +++ b/Documentation/git-checkout.txt > @@ -180,6 +180,13 @@ branch by running "git rm

Re: [PATCH] status, branch: fix the misleading "bisecting" message

2013-03-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > The current message is "bisecting %s" (or "bisecting branch %s"). > "%s" is the current branch when we started bisecting. Clarify that to > avoid confusion with good and bad refs passed to "bisect" command. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- Sounds sens

Re: [regression?] trailing slash required in .gitattributes

2013-03-23 Thread Junio C Hamano
Jeff King writes: > Yeah, that is a possibility, though it involves casting away some > constness. Patch is below, which seems to work. Hmm, because this was after I read this part: > ... match_basename, despite taking the length > of all of the strings we pass it, will happily use NUL-terminat

Re: [PATCH v2 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-23 Thread Junio C Hamano
John Keeping writes: > When 'git difftool --dir-diff' is using --no-symlinks (either explicitly > or implicitly because it's running on Windows), any working tree files > that have been copied to the temporary directory are copied back after > the difftool completes. > > Because an earlier test u

Re: [BUG?] rebase -i: edit versus unmerged changes

2013-03-23 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: > >> FWIW, I am not convinced yet why we would even want "git continue" >> in the first place, so I won't be the one who would be suggesting a >> migration path. > > Okay, I'm confused now. You were the one who suggested a unified "git > conti

[PATCH] checkout: add --sparse for restoring files in sparse checkout mode

2013-03-23 Thread Nguyễn Thái Ngọc Duy
"git checkout -- " is usually used to restore all modified files in . In sparse checkout mode, this command is overloaded with another meaning: to add back all files in that are excluded by sparse patterns. Add "--sparse" option to do what normal mode does: restore all modified files and nothing

Re: [PATCH 8/4] match-trees: drop "x = x" initializations

2013-03-23 Thread Junio C Hamano
René Scharfe writes: > Hmm, let's see if we can help the compiler follow the code without > making it harder for people to understand. The patch looks a bit > jumbled, but the resulting code is OK in my biased opinion. I actually think the result is much better than a mere "OK"; the duplicated

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-23 Thread Junio C Hamano
On Thu, Mar 21, 2013 at 4:13 AM, Jeff King wrote: > > According to 47ec794, this initialization is meant to > squelch an erroneous uninitialized variable warning from gcc > 4.0.1. That version is quite old at this point, and gcc 4.1 > and up handle it fine, with one exception. There seems to be >

Re: [RFC] test-lib.sh: No POSIXPERM for cygwin

2013-03-23 Thread Eric Sunshine
On Sat, Mar 23, 2013 at 8:40 AM, Torsten Bögershausen wrote: > Subject: [PATCH] Make core.sharedRepository work under cygwin 1.7 > > When core.sharedRepository is used, set_shared_perm() in path.c > needs lstat() to return the correct POSIX permissions. > > The default for cygwin is core.ignoreCyg

Re: [PATCH] checkout: avoid unncessary match_pathspec calls

2013-03-23 Thread Eric Sunshine
On Sat, Mar 23, 2013 at 6:55 AM, Nguyễn Thái Ngọc Duy wrote: > checkout: avoid unncessary match_pathspec calls s/unncessary/unnecessary/ > In checkout_paths() we do this > ... -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org

Re: [PATCH v2] Fix revision walk for commits with the same dates

2013-03-23 Thread Eric Sunshine
On Fri, Mar 22, 2013 at 2:38 PM, Kacper Kornet wrote: > Logic in still_interesting function allows to stop the commits > traversing if the oldest processed commit is not older then the s/then/than/ > youngest commit on the list to process and the list contains only > commits marked as not intere

Re: [PATCH v2 00/45] parse_pathspec and :(glob) magic

2013-03-23 Thread Eric Sunshine
On Fri, Mar 22, 2013 at 11:13 PM, Duy Nguyen wrote: > diff --git a/setup.c b/setup.c > index e59146b..6cf2bc6 100644 > --- a/setup.c > +++ b/setup.c > @@ -5,24 +5,37 @@ > static int inside_git_dir = -1; > static int inside_work_tree = -1; > > -char *prefix_path_gently(const char *prefix, int *p_

Re: [PATCH 0/4] contrib/subtree: general updates

2013-03-23 Thread Paul Campbell
On Thu, Mar 14, 2013 at 3:30 AM, Junio C Hamano wrote: > Miles Bader writes: > >> Paul Campbell writes: >>> James and Michael's patches add if clauses that use the >>> bashism 'if []' rather than 'if test'. >> >> "Bashism"...? I dunno how portable is, but "[" is an old unix alias >> for "test"

Re: [PATCH 8/4] match-trees: drop "x = x" initializations

2013-03-23 Thread René Scharfe
Am 22.03.2013 17:21, schrieb Jeff King: > Of the 8 patches, this is the one I find the least satisfying, if only > because I do not think gcc's failure is because of complicated control > flow, and rearranging the code would only hurt readability. Hmm, let's see if we can help the compiler follow

[PATCH v2] combine-diff: coalesce lost lines optimally

2013-03-23 Thread Antoine Pelisse
This replaces the greedy implementation to coalesce lost lines by using dynamic programming to find the Longest Common Subsequence. The O(n²) time complexity is obviously bigger than previous implementation but it can produce shorter diff results (and most likely easier to read). List of lost lin

[PATCH] refs.c: fix fread error handling

2013-03-23 Thread John Keeping
fread returns the number of items read, with no special error return. Commit 98f85ff (reflog: add for_each_reflog_ent_reverse() API - 2013-03-08) introduced a call to fread which checks for an error with "nread < 0" which is tautological since nread is unsigned. The correct check in this case (wh

Bug: `gitsubmodule` does not list modules with unicode characters

2013-03-23 Thread Ilya Kulakov
The `git submodule` commands seem to ignore modules which paths contain unicode characters. Consider the following steps to reproduce the problem: 1. Create a directory with name that contains at least one unicode character (e.g. "ûñïçödé-rèpø") 2. Initialize git repository within this

Re: [FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right

2013-03-23 Thread Christoph Anton Mitterer
On Sat, 2013-03-23 at 12:36 +, John Keeping wrote: > > What do you all think about something like the output of > > "git describe --always" instead of the SHA-1? > I think Christoph was suggesting that it should use the revision as > specified by the user, presumably falling back to HEAD when o

[PATCH v2 3/3] t7800: run --dir-diff tests with and without symlinks

2013-03-23 Thread John Keeping
Currently the difftool --dir-diff tests may or may not use symlinks depending on the operating system on which they are run. In one case this has caused a test failure to be noticed only on Windows when the test also fails on Linux when difftool is invoked with --no-symlinks. Rewrite these tests

[PATCH v2 2/3] t7800: fix tests when difftool uses --no-symlinks

2013-03-23 Thread John Keeping
When 'git difftool --dir-diff' is using --no-symlinks (either explicitly or implicitly because it's running on Windows), any working tree files that have been copied to the temporary directory are copied back after the difftool completes. Because an earlier test uses "git add .", the "output" file

[PATCH v2 1/3] t7800: don't hide grep output

2013-03-23 Thread John Keeping
Remove the stdin_contains and stdin_doesnt_contain helper functions which add nothing but hide the output of grep, hurting debugging. Suggested-by: Johannes Sixt Signed-off-by: John Keeping --- t/t7800-difftool.sh | 44 +--- 1 file changed, 17 insertions(

[PATCH v2 0/3] difftool --dir-diff test improvements

2013-03-23 Thread John Keeping
This version fixes the actual cause of the test failure (not being specific enough when adding files). This is done with a new version of patch 2. Patch 1 is unchanged and patch 3 only contains a minor change. This is built on da/difftool-fixes. There may be a small textual conflict with jk/dif

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-23 Thread Ramkumar Ramachandra
Jonathan Nieder wrote: > Junio C Hamano wrote: >> Jonathan Nieder writes: > - struct remote *remote = remote_get(repo); + struct remote *remote = pushremote_get(repo); >>> >>> "struct remote" has url and pushurl fields. What do they mean in the >>> context of these two accessors? /

Re: Hard reset of a subdirectory in a sparse checkout setting

2013-03-23 Thread Kirill Müller
On 03/23/2013 10:59 AM, Duy Nguyen wrote: On Fri, Mar 22, 2013 at 5:28 PM, Kirill Müller wrote: What's the proper way to do this in Git? I think adding --sparse to git checkout may be more user-friendly. And it looks like a simple change. I'll make a patch soon (I need some time to recall how

Re: [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push

2013-03-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > Jonathan Nieder writes: > >>> --- a/builtin/push.c >>> +++ b/builtin/push.c >>> @@ -322,7 +322,7 @@ static int push_with_options(struct transport >>> *transport, int flags) >>> static int do_push(const char *repo, int flags) >>> { >>> int i, errs; >>> -struct re

Re: [BUG?] rebase -i: edit versus unmerged changes

2013-03-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > Jonathan Nieder writes: > >> Ramkumar Ramachandra wrote: >> >>> I'd really to have that final 'git continue' in Git 2.0. Can someone >>> attempt to break up the migration path into manageable logical steps >>> that we can start working on? >> >> Is there any deadline or mi

Re: [PATCH 3/3] git-pull.sh: introduce --[no-]autostash and pull.autostash

2013-03-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > Ramkumar Ramachandra writes: > >> @@ -1786,6 +1786,11 @@ pull.rebase:: >> of merging the default branch from the default remote when "git >> pull" is run. See "branch..rebase" for setting this on a >> per-branch basis. >> + >> +pull.autostash:: >> + Wh

Re: [PATCH v2 0/6] Support triangular workflows

2013-03-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > "Philip Oakley" writes: > >> Shouldn't Documentation/gitworkflows.txt also be updated with the >> triangular workflow and its configuration? > > What is missing from gitworkflows documentation is actually a > non-triangular workflow, where people pull from and push into the

Re: [RFC] test-lib.sh: No POSIXPERM for cygwin

2013-03-23 Thread Torsten Bögershausen
On 19.03.13 22:03, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> Use a compile switch IGNORECYGWINFSTRICKS to disable the usage >> of cygwin_lstat_fn() only in path.c > > The analysis of the problem and the basic idea to disable the > fast-but-lying fstricks in the code that matters

Re: [PATCH 2/3] t5521 (pull-options): use test_commit() where appropriate

2013-03-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > Ramkumar Ramachandra writes: > >> test_commit() is a well-defined function in test-lib-functions.sh that >> allows you to create commits with a terse syntax. Prefer using it >> over creating commits by hand. >> >> Signed-off-by: Ramkumar Ramachandra >> --- >> t/t5521-pul

Re: [FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right

2013-03-23 Thread John Keeping
On Fri, Mar 22, 2013 at 09:56:17PM -0700, David Aguilar wrote: > On Fri, Mar 22, 2013 at 9:52 AM, Christoph Anton Mitterer > wrote: > > Hi. > > > > Right now, when I use difftool --dir-diff, the temp dirs are creates as > > e.g.: > > /tmp/git-difftool.QqP8x/left > > /tmp/git-difftool.QqP8x/right >

[PATCH] checkout: avoid unncessary match_pathspec calls

2013-03-23 Thread Nguyễn Thái Ngọc Duy
In checkout_paths() we do this - for i = 0..active_nr, if not updated, call match_pathspec - for ..., call match_pathspec (inside unmerge_cache) - for ..., call match_pathspec (for showing "path .. is unmerged) - for ..., if not updated, call match_pathspec and update paths That's a lot of du

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

2013-03-23 Thread Antoine Pelisse
> You should probably add some failing tests I guess it should be "failure" tests, not failing tests. -- 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 v9a 3/5] Implement line-history search (git log -L)

2013-03-23 Thread Antoine Pelisse
> diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh > new file mode 100755 > index 000..286390d > --- /dev/null > +++ b/t/t4211-line-log.sh > @@ -0,0 +1,38 @@ > +#!/bin/sh > + > +test_description='test log -L' > +. ./test-lib.sh > + > +test_expect_success 'setup (import history)' ' > +

Re: Hard reset of a subdirectory in a sparse checkout setting

2013-03-23 Thread Duy Nguyen
On Fri, Mar 22, 2013 at 5:28 PM, Kirill Müller wrote: > I can't find a neat way to "git reset --hard" a subdirectory of a checkout > without reading in directories or files which are excluded by a sparse > checkout. This has been asked on StackOverflow in greater detail, but the > "right" answer i

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-23 Thread Vadim Zeitlin
Andreas Schwab linux-m68k.org> writes: > Vadim Zeitlin zeitlins.org> writes: > > > "!^[ \t]*[A-Za-z_][A-Za-z_0-9]+[ \t]*:([^:]|$)\n" > > That would fail to match single-character identifiers. Oops, yes, you're right, of course, sorry. I have no idea why did I write that we needed to change

Re: [PATCH v9 5/5] Speed up log -L... -M

2013-03-23 Thread Jeff King
On Sat, Mar 23, 2013 at 06:58:48AM +0100, Thomas Rast wrote: > Eric Sunshine writes: > > > On Thu, Mar 21, 2013 at 8:52 AM, Thomas Rast wrote: > >> This is a bit hacky and should really be replaced by equivalent > >> support in --follow, and just using that. However, in the meantime it > > > >

Re: Some small issues with GIT GUI on MacOS.

2013-03-23 Thread Pascal
Hello again, is there another list dealing with GIT GUI ? I'm not sure to be on the good list :-( Thanks in advance for your advice, Pascal. http://blady.pagesperso-orange.fr Le 16 mars 2013 à 10:47, Pascal a écrit : > Hello, I'm new to this list and using GIT on MacOS 10.8: > $ /usr/local/git

Re: [regression?] trailing slash required in .gitattributes

2013-03-23 Thread Jeff King
On Fri, Mar 22, 2013 at 04:08:08PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > if (pathlen && pathname[pathlen-1] == '/') > > pathlen--; > > > > would work. But it seems that match_basename, despite taking the length > > of all of the strings we pass it, will happily use N

Re: [PATCH] Avoid false positives in label detection in cpp diff hunk header regex.

2013-03-23 Thread Andreas Schwab
Vadim Zeitlin writes: > "!^[ \t]*[A-Za-z_][A-Za-z_0-9]+[ \t]*:([^:]|$)\n" That would fail to match single-character identifiers. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely diffe

Re: git branch: multiple --merged and --no-merged options?

2013-03-23 Thread Jeff King
On Fri, Mar 22, 2013 at 09:46:42PM -0500, Jed Brown wrote: > > On Fri, Mar 15, 2013 at 02:38:12PM -0500, Jed Brown wrote: > >> $ git branch --no-merged master --merged next > > > > Yeah, sadly that does not work, as we use the same slot for the flag and > > store only one of the two (and we also

Re: feature request - have git honor nested .gitconfig files

2013-03-23 Thread Jeff King
On Sat, Mar 23, 2013 at 07:15:42AM +0100, Thomas Rast wrote: > > It involves a shell invocation, but it's not like we parse config in a > > tight loop. Bonus points if git provides the name of the current config > > file, so exec can use relative paths like: > > We do, however, parse config more

Re: feature request - have git honor nested .gitconfig files

2013-03-23 Thread Jeff King
On Fri, Mar 22, 2013 at 05:06:28PM -0700, Jonathan Nieder wrote: > > I'd rather not invent a new language. It will either not be featureful > > enough, or will end up bloated. Or both. How about something like: > > > > [include] > >exec = " > > case \"$GIT_DIR\" in) > >