[PATCH] gitk: Fix typo in proc blobdiffmaybeseehere

2013-12-18 Thread Johannes Sixt
From: Johannes Sixt The recent 5de460a2 (Refactor per-line part of getblobdiffline and its support) introduced blobdiffmaybeseehere, and accidentally forgot the '$' to access the parameter as a TCL variable. This resulted in a failing "Back" button with the error can't use non-numeric string as

Re: [PATCH 3/3] fetch --prune: Repair branchname DF conflicts

2013-12-18 Thread Junio C Hamano
Tom Miller writes: > The commit below should be the same patch he tested. The test was added > by him, and I made it part of this commit. Did I do this wrong? No, no, no. All my questions were true questions, not complaints veiled as rhetorical questions. Thanks for many pointers for clarifica

Re: I have end-of-lifed cvsps

2013-12-18 Thread Eric S. Raymond
Michael Haggerty : > If you haven't tried cvs2git yet, please start it up somewhere in the > background. It might take a while but it should have no trouble with > your repos, and then you can compare the tools based on experience > rather than speculation. That would be a good thing. Michael, i

Re: [PATCH] log: properly handle decorations with chained tags

2013-12-18 Thread brian m. carlson
On Tue, Dec 17, 2013 at 04:36:06PM -0800, Junio C Hamano wrote: > I think all we need to do, in addition to what the existing code > does, is to make sure that we _parse_ the object that the tag points > at, to avoid this problem. Something like this, perhaps, instead? Yeah, that's the clean fix

Re: [PATCH 3/3] fetch --prune: Repair branchname DF conflicts

2013-12-18 Thread Tom Miller
On Wed, Dec 18, 2013 at 3:54 PM, Junio C Hamano wrote: > Tom Miller writes: > >> When a branchname DF conflict occurs during a fetch, > > You may have started with a specific case in which you want to > change the behaviour of current Git, so it may be clear what you > meant by "branchname DF con

Re: [PATCH 1/3] builtin/fetch.c: Add pretty_url() and print_url()

2013-12-18 Thread Tom Miller
On Wed, Dec 18, 2013 at 3:47 PM, Junio C Hamano wrote: > Tom Miller writes: > >> In order to fix branchname DF conflicts during `fetch --prune`, the way >> the header is output to the screen needs to be refactored. Here is an >> exmaple of the output with the line in question denoted by '>': >> >

Re: I have end-of-lifed cvsps

2013-12-18 Thread Johan Herland
On Thu, Dec 19, 2013 at 12:44 AM, Michael Haggerty wrote: > A correct incremental converter could be done (as long as the CVS users > don't literally change history retroactively) but it would be a lot of work. Although I agree with that sentence as it is stated, I also believe that the parenthes

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Duy Nguyen
On Thu, Dec 19, 2013 at 3:57 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Dec 18, 2013 at 3:44 PM, Antoine Pelisse wrote: >>> FWIW, git-bisect points to 84b8b5d (that is $gmane/230349). >>> >>> On Wed, Dec 18, 2013 at 9:06 AM, Thomas Ferris Nicolaisen >>> wrote: This was dis

Re: [PATCH v5 0/3] diff: Add diff.orderfile configuration variable

2013-12-18 Thread Junio C Hamano
Looks good; will replace and merge to 'next', but not today (I am already deep into today's integration cycle). 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-i

Re: [PATCH 1/3] prune-packed: fix a possible buffer overflow

2013-12-18 Thread Duy Nguyen
On Wed, Dec 18, 2013 at 1:43 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> Why don't we take this opportunity to replace that array with a >> strbuf? The conversion looks simple with this function. > > Indeed. Something like this, perhaps? Yes, looking good. > void prune_packed_objects(

[PATCH v5 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-18 Thread Samuel Bronson
The -O flag really shouldn't silently fail to do anything when given a path that it can't read from. However, it should be able to read from un-mmappable files, such as: * pipes/fifos * /dev/null: It's a character device (at least on Linux) * ANY empty file: Quoting Linux mmap(2), "SUSv

[PATCH v5 0/3] diff: Add diff.orderfile configuration variable

2013-12-18 Thread Samuel Bronson
I expect you've figured out what this patch series is about by now. In this version, I've applied Junio's suggestions from the last version, and also the stuff from the FIXUP commit he made after my stuff in the branch he merged into 'pu'. Samuel Bronson (3): diff: Tests for "git diff -O" diff

[PATCH v5 1/3] diff: Tests for "git diff -O"

2013-12-18 Thread Samuel Bronson
Heavily adapted from Anders' patch: "diff: Add diff.orderfile configuration variable" Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- t/t4056-diff-order.sh | 70 +++ 1 file changed, 70 insertions(+) create mode 100755 t/t4056-d

[PATCH v5 3/3] diff: Add diff.orderfile configuration variable

2013-12-18 Thread Samuel Bronson
diff.orderfile acts as a default for the -O command line option. [sb: split up aw's original patch; rework tests and docs, treat option as pathname] Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- Documentation/diff-config.txt | 5 + Documentation/diff-options.txt | 3

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 02:59:12PM -0800, Junio C Hamano wrote: > Jeff King writes: > > >> Yes, that is locally OK, but depending on how the caller behaves, we > >> might need to have an extra saved_errno dance here, which I didn't > >> want to get into... > > > > I think we are fine. The only ca

Re: [PATCH 1/3] prune-packed: fix a possible buffer overflow

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 11:44:58PM +0100, Michael Haggerty wrote: > [While doing so, I got sidetracked by the question: what happens if a > prune process deletes the "objects/XX" directory just the same moment > that another process is trying to write an object into that directory? > I think the r

Re: I have end-of-lifed cvsps

2013-12-18 Thread Michael Haggerty
On 12/17/2013 07:47 PM, Eric S. Raymond wrote: > Johan Herland : >> However, I fear that you underestimate the number of users that want >> to use Git against CVS repos that are orders of magnitude larger (in >> both dimensions: #commits and #files) than your example repo. > > You may be right. Se

Bug when moving submodules (I think?)

2013-12-18 Thread fREW Schmidt
I tried to make a script to repro this from scratch but ran into other issues, which may or may not be a bug. I'll put that at the end. To repro all you have to do is: git checkout git://github.com/frioux/dotfiles git reset --hard 92c85161ceec9e52b0b2d2de893ba11f49c80198 git mv zsh .zsh (sh

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Junio C Hamano
Jeff King writes: > On Wed, Dec 18, 2013 at 01:37:24PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > According to the POSIX quote above, it sounds like we could do: >> > >> > #if defined (_SC_OPEN_MAX) >> > { >> > long max; >> > errno = 0; >> > ma

Re: [PATCH 1/3] prune-packed: fix a possible buffer overflow

2013-12-18 Thread Michael Haggerty
On 12/17/2013 07:43 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> Why don't we take this opportunity to replace that array with a >> strbuf? The conversion looks simple with this function. > > Indeed. Something like this, perhaps? > [...] Frankly, with my initial patches I was just tryin

Re: "git fsck" fails on malloc of 80 G

2013-12-18 Thread Dale R. Worley
> From: Jeff King > One of the problems I ran into recently is that > corrupt data can cause it to make a large allocation One thing I notice is that in unpack_compressed_entry() in sha1_file.c, there is a mallocz of "size" bytes. It appears that "size" is the size of the object that is being u

Re: "git fsck" fails on malloc of 80 G

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 04:08:47PM -0500, Dale R. Worley wrote: > > From: Jeff King > > > One of the problems I ran into recently is that > > corrupt data can cause it to make a large allocation > > One thing I notice is that in unpack_compressed_entry() in > sha1_file.c, there is a mallocz of

Re: "git fsck" fails on malloc of 80 G

2013-12-18 Thread Jeff King
On Tue, Dec 17, 2013 at 10:06:20PM -0500, Dale R. Worley wrote: > Here's the basic backtrace information, and the values of the "size" > variables, which seem to be the immediate culprits: > [...] > #1 0x004f3633 in xmallocz (size=size@entry=80530636800) > at wrapper.c:73 >

Re: [PATCH 3/3] fetch --prune: Repair branchname DF conflicts

2013-12-18 Thread Junio C Hamano
Tom Miller writes: > When a branchname DF conflict occurs during a fetch, You may have started with a specific case in which you want to change the behaviour of current Git, so it may be clear what you meant by "branchname DF conflict", but that is true for nobody other than you who will read th

Re: [PATCH 1/3] builtin/fetch.c: Add pretty_url() and print_url()

2013-12-18 Thread Junio C Hamano
Tom Miller writes: > In order to fix branchname DF conflicts during `fetch --prune`, the way > the header is output to the screen needs to be refactored. Here is an > exmaple of the output with the line in question denoted by '>': > > $ git fetch --prune --dry-run upstream >> From http

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 01:37:24PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > According to the POSIX quote above, it sounds like we could do: > > > > #if defined (_SC_OPEN_MAX) > > { > > long max; > > errno = 0; > > max = sysconf(_SC_OPEN_MAX); > >

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Junio C Hamano
Jeff King writes: > According to the POSIX quote above, it sounds like we could do: > > #if defined (_SC_OPEN_MAX) > { > long max; > errno = 0; > max = sysconf(_SC_OPEN_MAX); > if (0 < max) /* got the limit */ > return max; >

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 11:50:24AM -0800, Junio C Hamano wrote: > 8< -- > > static unsigned int get_max_fd_limit(void) > { > #ifdef RLIMIT_NOFILE > struct rlimit lim; > > if (!getrlimit(RLIMIT_NOFILE, &lim)) >

[PATCH 1/3] builtin/fetch.c: Add pretty_url() and print_url()

2013-12-18 Thread Tom Miller
In order to fix branchname DF conflicts during `fetch --prune`, the way the header is output to the screen needs to be refactored. Here is an exmaple of the output with the line in question denoted by '>': $ git fetch --prune --dry-run upstream > From https://github.com/git/git

[PATCH 3/3] fetch --prune: Repair branchname DF conflicts

2013-12-18 Thread Tom Miller
When a branchname DF conflict occurs during a fetch, --prune should be able to fix it. When fetching with --prune, the fetching process happens before pruning causing the branchname DF conflict to persist and report an error. This patch prunes before fetching, thus correcting DF conflicts during a

[PATCH 2/3] fetch --prune: Always print header url

2013-12-18 Thread Tom Miller
If fetch --prune is run with no new refs to fetch, but it has refs to prune. Then, the header url is not printed as it would if there were new refs to fetch. the following is example output showing this behavior: $ git fetch --prune --dry-run origin x [deleted] (none) -> origin/world

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Dec 18, 2013 at 3:44 PM, Antoine Pelisse wrote: >> FWIW, git-bisect points to 84b8b5d (that is $gmane/230349). >> >> On Wed, Dec 18, 2013 at 9:06 AM, Thomas Ferris Nicolaisen >> wrote: >>> This was discussed on the Git user list recently [1]. >>> >>> #in a repo with

Re: I have end-of-lifed cvsps

2013-12-18 Thread Kent R. Spillner
> Which will trash your history - the bugs in that are worse than the bugs > in 3.0, which are bad enough that I *terminated* it. Which *might* trash your history. cvsps v2 and git cvsimport work as advertised with simple, linear CVS repositories. I maintain a git mirror of an active CVS repo an

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 12:15:19PM -0800, Junio C Hamano wrote: > > Thanks. Are you picking this up with a commit message, or did you want > > me to re-send with the usual message/signoff? > > I think this should be sufficient ;-) > > -- >8 -- > From: Jeff King > Date: Tue, 17 Dec 2013 18:22:31

Re: I have end-of-lifed cvsps

2013-12-18 Thread Eric S. Raymond
John Keeping : > Which I think sums up the position nicely; if you're doing a one-shot > import then the standalone tools are going to be a better choice, but if > you're trying to use Git for your work on top of CVS the only choice is > cvsps with git-cvsimport. Which will trash your history - th

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> That is, does sysconf actually work on such a system (or does it need a >> similar run-time fallback)? And either way, we should try falling back >> to OPEN_MAX rather than 1 if we have it. > > Interesting. > >> As far as the warning, I am not sure

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-18 Thread Junio C Hamano
Jeff King writes: > On Wed, Dec 18, 2013 at 12:07:02PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> >> > + prune_object(path->buf, sha1); >> >> > + path->len = baselen; >> >> >> >> This is minor, but I prefer using strbuf_setlen() for th

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 12:07:02PM -0800, Junio C Hamano wrote: > Jeff King writes: > > >> > +prune_object(path->buf, sha1); > >> > +path->len = baselen; > >> > >> This is minor, but I prefer using strbuf_setlen() for this. > > > > Good catch. I d

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-18 Thread Junio C Hamano
Jeff King writes: >> > + prune_object(path->buf, sha1); >> > + path->len = baselen; >> >> This is minor, but I prefer using strbuf_setlen() for this. > > Good catch. I do not think it is minor at all; my version is buggy. > After the loop ends, path->len does no

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Joey Hess
Jeff King wrote: > I wish we understood why getrlimit was failing. Returning EFAULT seems > like an odd choice if it is not implemented for the system. On such a > system, do the other fallbacks actually work? Would it work to do: > > That is, does sysconf actually work on such a system (or does i

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 11:35:34AM -0800, Junio C Hamano wrote: > This function is called to remove > > * Any tmp_* found directly in .git/objects/ > * Any tmp_* found directly in .git/objects/pack/ > * Any tmp_obj_* found directly in .git/objects/??/ > > and shares the same expiration logic

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> It could be argued that a "git add [] .", with an >> explicit "." given by the end-user, that is run in an empty >> directory may be an error worth reporting. > > But what we have right now is really weird: I know. That is why I said "It _coul

Re: I have end-of-lifed cvsps

2013-12-18 Thread John Keeping
On Wed, Dec 18, 2013 at 11:53:47AM -0500, Martin Langhoff wrote: > On Wed, Dec 18, 2013 at 11:27 AM, Eric S. Raymond wrote: > >> Anyway I hope that incremental CVS import would be needed less > >> and less as CVS is replaced by any more modern version control system. > > > > I agree. I have never

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Junio C Hamano
Jeff King writes: > That is, does sysconf actually work on such a system (or does it need a > similar run-time fallback)? And either way, we should try falling back > to OPEN_MAX rather than 1 if we have it. Interesting. > As far as the warning, I am not sure I see a point. The user does not >

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-18 Thread Junio C Hamano
Jeff King writes: > Converting it to use strbuf looks like it will actually let us drop a > bunch of copying, too, as we just end up in mkpath at the very lowest > level. I.e., something like below. Thanks; I may have a few minor comments, but overall, I like the placement of mkpath() in the res

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Matthieu Moy
Junio C Hamano writes: > It could be argued that a "git add [] .", with an > explicit "." given by the end-user, that is run in an empty > directory may be an error worth reporting. But what we have right now is really weird: # setup repo with one empty dir: $ rm -fr test $ git init test Initia

Re: I have end-of-lifed cvsps

2013-12-18 Thread Eric S. Raymond
Jeff King : > In git, it may happen quite a bit during "git am" or "git rebase", in > which a large number of commits are replayed in a tight loop. That's a good point - a repeatable real-world case in which we can expect that behavior. This case could be solved, though, with a slight tweak to th

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 10:00:35AM -0800, Junio C Hamano wrote: > Joey Hess writes: > > > In sha1_file.c, when git is built on linux, it will use > > getrlimit(RLIMIT_NOFILE). I've been deploying git binaries to some > > unusual systems, like embedded NAS devices, and it seems some with older >

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Dec 18, 2013 at 3:44 PM, Antoine Pelisse wrote: >> FWIW, git-bisect points to 84b8b5d (that is $gmane/230349). >> >> On Wed, Dec 18, 2013 at 9:06 AM, Thomas Ferris Nicolaisen >> wrote: >>> This was discussed on the Git user list recently [1]. >>> >>> #in a repo with

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Joey Hess
Junio C Hamano wrote: > Hmph, perhaps you are right. Like this? Works for me. -- see shy jo signature.asc Description: Digital signature

Re: [PATCH 01/12] Make starts_with() a wrapper of skip_prefix()

2013-12-18 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> starts_with() started out as a copy of prefixcmp(). But if we don't >> care about the sorting order, the logic looks closer to >> skip_prefix(). This looks like a good thing to do. >> >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- > > S

Re: [PATCH 00/12] Hard coded string length cleanup

2013-12-18 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > I reimplemented skip_prefix() again just to realize this function > already exists. Which reminds me there are a bunch of places that > could benefit from this function, the same reason that I wanted to > reimplement it. > > So this is series to make it more popula

Re: RLIMIT_NOFILE fallback

2013-12-18 Thread Junio C Hamano
Joey Hess writes: > In sha1_file.c, when git is built on linux, it will use > getrlimit(RLIMIT_NOFILE). I've been deploying git binaries to some > unusual systems, like embedded NAS devices, and it seems some with older > kernels like 2.6.33 fail with "fatal: cannot get RLIMIT_NOFILE: Bad addres

Re: [PATCH 03/12] Add and use skip_prefix_defval()

2013-12-18 Thread Junio C Hamano
"Kent R. Spillner" writes: > On Wed, Dec 18, 2013 at 09:53:48PM +0700, Nguyễn Thái Ngọc Duy wrote: >> This is a variant of skip_prefix() that returns a specied pointer >> instead of NULL if no prefix is found. It's helpful to simplify >> >> if (starts_with(foo, "bar")) >> foo += 3; >> >>

Re: [PATCH 01/12] Make starts_with() a wrapper of skip_prefix()

2013-12-18 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > starts_with() started out as a copy of prefixcmp(). But if we don't > care about the sorting order, the logic looks closer to > skip_prefix(). This looks like a good thing to do. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- Sure, but the implementation of skip_p

Re: [PATCH] hashmap.h: Use 'unsigned int' for hash-codes everywhere

2013-12-18 Thread Junio C Hamano
Karsten Blees writes: > OK, this one's a no-brainer I think. See $gmane/239430 for the > latest proposal on the struct packing front. 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://vge

Re: I have end-of-lifed cvsps

2013-12-18 Thread Jeff King
On Wed, Dec 18, 2013 at 11:27:10AM -0500, Eric S. Raymond wrote: > For use in reposurgeon I have defined a generic cross-VCS reference to > commit I call an "action stamp"; it consists of an RFC3339 date followed by > a committer email address. Here's an example: > >2013-02-06T09:35:10Z!

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-18 Thread Junio C Hamano
Christian Couder writes: > On Wed, Dec 18, 2013 at 1:37 PM, Karsten Blees > wrote: >> Am 11.12.2013 08:46, schrieb Christian Couder: >>> +enum repl_fmt { SHORT, MEDIUM, FULL }; >> >> SHORT is predefined on Windows, could you choose another name? > > Ok, I will change to: > > enum repl_fmt { SHO

RLIMIT_NOFILE fallback

2013-12-18 Thread Joey Hess
In sha1_file.c, when git is built on linux, it will use getrlimit(RLIMIT_NOFILE). I've been deploying git binaries to some unusual systems, like embedded NAS devices, and it seems some with older kernels like 2.6.33 fail with "fatal: cannot get RLIMIT_NOFILE: Bad address". I could work around thi

Re: I have end-of-lifed cvsps

2013-12-18 Thread Martin Langhoff
On Wed, Dec 18, 2013 at 11:27 AM, Eric S. Raymond wrote: >> Anyway I hope that incremental CVS import would be needed less >> and less as CVS is replaced by any more modern version control system. > > I agree. I have never understood why people on this list are attached to it. I think I have ans

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-18 Thread Christian Couder
On Wed, Dec 18, 2013 at 1:37 PM, Karsten Blees wrote: > Am 11.12.2013 08:46, schrieb Christian Couder: >> +enum repl_fmt { SHORT, MEDIUM, FULL }; > > SHORT is predefined on Windows, could you choose another name? Ok, I will change to: enum repl_fmt { SHORT_FMT, MEDIUM_FMT, FULL_FMT }; Thanks, C

Re: [PATCH 03/12] Add and use skip_prefix_defval()

2013-12-18 Thread Kent R. Spillner
On Wed, Dec 18, 2013 at 09:53:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is a variant of skip_prefix() that returns a specied pointer > instead of NULL if no prefix is found. It's helpful to simplify > > if (starts_with(foo, "bar")) > foo += 3; > > into > > foo = skip_prefix_gently(f

Re: I have end-of-lifed cvsps

2013-12-18 Thread Eric S. Raymond
Jakub Narębski : > It is a bit strange that markfile has explicitly SHA-1 (":markid "), > instead of generic reference to commit, in the case of CVS it would be > commitid (what to do for older repositories, though?), in case of Bazaar > its revision id (GUID), etc. Can we assume that SCM v1 fast-

incremental fast-import and marks (Re: I have end-of-lifed cvsps)

2013-12-18 Thread Jonathan Nieder
Jakub Narebski wrote: > It is a bit strange that markfile has explicitly SHA-1 (":markid "), > instead of generic reference to commit, in the case of CVS it would be > commitid (what to do for older repositories, though?), in case of Bazaar > its revision id (GUID), etc. Usually importers use at

[PATCHv2] gitk: Replace "next" and "prev" buttons with down and up arrows.

2013-12-18 Thread Marc Branchaud
Users often find that "next" and "prev" do the opposite of what they expect. For example, "next" moves to the next match down the list, but that is almost always backwards in time. Replacing the text with arrows makes it clear where the buttons will take the user. Signed-off-by: Marc Branchaud

Re: I have end-of-lifed cvsps

2013-12-18 Thread Jakub Narębski
On Wed, Dec 18, 2013 at 1:21 AM, Eric S. Raymond wrote: > Jakub Narębski : >>> No, cvs-fast-export does not have --export-marks. It doesn't generate the >>> SHA1s that would require. Even if it did, it's not clear how that would >>> help. >> >> I was thinking about how the following part of git-

[PATCH 10/12] environment.c: replace starts_with() in strip_namespace() with skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- environment.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/environment.c b/environment.c index 3c76905..bc2d916 100644 --- a/environment.c +++ b/environment.c @@ -171,9 +171,7 @@ const char *get_git_namespace(void) const char *s

[PATCH 09/12] diff.c: reduce code duplication in --stat-xxx parsing

2013-12-18 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 67 +- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/diff.c b/diff.c index d754e2f..4da77fd 100644 --- a/diff.c +++ b/diff.c @@ -3405,6 +3405,23 @@ int parse_long_opt

[PATCH 12/12] refs.c: use skip_prefix() in prune_ref()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
This removes the magic number 5, which is the string length of "refs/". This comes from get_loose_refs(), called in packed_refs(). Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 1fb658f..217093f 100644 --

[PATCH 11/12] diff.c: convert diff_scoreopt_parse to use skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
While at there, partly fix the reporting as well. The reported value with "arg+2" is only correct with -C/-B/-M, not with long option names. Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/diff.c b/

[PATCH 03/12] Add and use skip_prefix_defval()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
This is a variant of skip_prefix() that returns a specied pointer instead of NULL if no prefix is found. It's helpful to simplify if (starts_with(foo, "bar")) foo += 3; into foo = skip_prefix_gently(foo, "bar", foo); Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c| 6 +

[PATCH 05/12] Convert a lot of starts_with() to skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
The purpose is remove hard coded string length. Some could be a few lines away from the string comparison and easy to be missed when the string is changed. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/for-each-ref.c | 9 + builtin/mailinfo.c | 6 +++--- builtin/merge.c|

[PATCH 07/12] connect.c: replace some use of starts_with() with skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
"name" will be reset unconditionally soon after skip_prefix() returns NULL. Signed-off-by: Nguyễn Thái Ngọc Duy --- connect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connect.c b/connect.c index c763eed..1bb70aa 100644 --- a/connect.c +++ b/connect.c @@ -131,7 +1

[PATCH 01/12] Make starts_with() a wrapper of skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
starts_with() started out as a copy of prefixcmp(). But if we don't care about the sorting order, the logic looks closer to skip_prefix(). This looks like a good thing to do. Signed-off-by: Nguyễn Thái Ngọc Duy --- git-compat-util.h | 6 +- strbuf.c | 9 - 2 files changed, 5

[PATCH 04/12] Replace some use of starts_with() with skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
All the changes follow the pattern if (!starts_with(foo, "bar")) return; foo += 3; which is turned into if ((foo = skip_prefix(foo, "bar")) == NULL) return; Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/branch.c | 3 +-- pretty.c | 3 +-- setup.c | 3 +-- tag.

[PATCH 06/12] fetch.c: replace some use of starts_with() with skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
Variable "what" is set in an if/else chain. If all fails (and "what" is set to NULL) it'll be reset in the final "else" block. in get_remote_group(), "key" is only used once. So changing it does not harm. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fetch.c | 16 +--- 1 file chan

[PATCH 02/12] Convert starts_with() to skip_prefix() for option parsing

2013-12-18 Thread Nguyễn Thái Ngọc Duy
The code that's not converted to use parse_options() often does if (!starts_with(arg, "foo=")) { value = atoi(arg + 4); } This patch removes those magic numbers with skip_prefix() Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fetch-pack.c | 13 + builtin/index-pack.c

[PATCH 00/12] Hard coded string length cleanup

2013-12-18 Thread Nguyễn Thái Ngọc Duy
I reimplemented skip_prefix() again just to realize this function already exists. Which reminds me there are a bunch of places that could benefit from this function, the same reason that I wanted to reimplement it. So this is series to make it more popular (so hopefully I'll see it used somewhere

[PATCH 08/12] refs.c: replace some use of starts_with() with skip_prefix()

2013-12-18 Thread Nguyễn Thái Ngọc Duy
It's out of context, but there are neither changes in buffer nor buf between two chunks. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index 5e378bc..1fb658f 100644 --- a/refs.c +++ b/refs.c @@ -1339,7 +133

[PATCH v2] docs: add filter-branch notes on The BFG

2013-12-18 Thread Roberto Tyley
The BFG is a tool specifically designed for the task of removing unwanted data from Git repository history - a common use-case for which git-filter-branch has been the traditional workhorse. It's beneficial to let users know that filter-branch has an alternative here: * speed : The BFG is 10-50x

[PATCH v2] Tweaked notes on gfb<->bfg differences

2013-12-18 Thread Roberto Tyley
On 18 December 2013 05:57, Junio C Hamano wrote: > The first bullet point may be somewhat misleading, though. Nothing > stops your script you use in filter-branch from processing blobs > belonging to a single tree in parallel---the user just needs to do a > bit more work to do so. Thanks, I've m

Re: What's cooking in git.git (Dec 2013, #02; Fri, 6)

2013-12-18 Thread Karsten Blees
Am 09.12.2013 15:03, schrieb Karsten Blees: > 3.) Inject individual fields via macro > > Instead of injecting a struct hashmap_entry, which implies alignment to > sizeof(struct hashmap_entry), we could inject the individual fields, e.g. > > #define HASHMAP_ENTRY_HEADER struct hashmap_entry __ne

[no subject]

2013-12-18 Thread Maxime Coste
subscribe git -- 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: What's cooking in git.git (Dec 2013, #02; Fri, 6)

2013-12-18 Thread Karsten Blees
Am 18.12.2013 14:10, schrieb Karsten Blees: > + printf("sizeof(pointer+int) (%u) is not a " > +"multiple of sizeof(pointer) (%u)!\n", > +sizeof(struct pointer_int), > +

[PATCH] hashmap.h: Use 'unsigned int' for hash-codes everywhere

2013-12-18 Thread Karsten Blees
Signed-off-by: Karsten Blees --- Am 09.12.2013 18:48, schrieb Junio C Hamano: > Karsten Blees writes: > >>> * kb/fast-hashmap (2013-11-18) 14 commits >>> (merged to 'next' on 2013-12-06 at f90be3d) >> >> Damn, a day too late :-) I found these two glitches today...is a >> fixup patch OK or sh

Re: [PATCH v5 02/14] add a hashtable implementation that supports O(1) removal

2013-12-18 Thread Karsten Blees
Am 14.12.2013 03:04, schrieb Jonathan Nieder: > Hi, > > Karsten Blees wrote: > >> test-hashmap.c | 340 >> > > Here come two small tweaks on top (meant for squashing in or applying > to the series, whichever is more convenient). > > Tha

Re: What's cooking in git.git (Dec 2013, #02; Fri, 6)

2013-12-18 Thread Karsten Blees
Am 10.12.2013 00:45, schrieb Jonathan Nieder: > Karsten Blees wrote: > >> Googling some more, I believe the most protable way to achieve this >> via 'compiler settings' is >> >> #pragma pack(push) >> #pragma pack(4) >> struct hashmap_entry { >>struct hashmap_entry *next; >>unsigned int

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-18 Thread Karsten Blees
Am 11.12.2013 08:46, schrieb Christian Couder: > +enum repl_fmt { SHORT, MEDIUM, FULL }; SHORT is predefined on Windows, could you choose another name? MinGW: builtin/replace.c:23: error: 'SHORT' redeclared as different kind of symbol c:\git\msysgit\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../..

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Duy Nguyen
On Wed, Dec 18, 2013 at 3:44 PM, Antoine Pelisse wrote: > FWIW, git-bisect points to 84b8b5d (that is $gmane/230349). > > On Wed, Dec 18, 2013 at 9:06 AM, Thomas Ferris Nicolaisen > wrote: >> This was discussed on the Git user list recently [1]. >> >> #in a repo with no files >>> git add -A >> fa

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Antoine Pelisse
FWIW, git-bisect points to 84b8b5d (that is $gmane/230349). On Wed, Dec 18, 2013 at 9:06 AM, Thomas Ferris Nicolaisen wrote: > This was discussed on the Git user list recently [1]. > > #in a repo with no files >> git add -A > fatal: pathspec '.' did not match any files > > The same goes for git a

git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Thomas Ferris Nicolaisen
This was discussed on the Git user list recently [1]. #in a repo with no files > git add -A fatal: pathspec '.' did not match any files The same goes for git add . (and -u). Whereas I think some warning feedback is useful, we are curious whether this is an intentional change or not. [1] https:/