Re: Bad object pointed under refs/head/

2015-02-13 Thread Michael Haggerty
On 02/13/2015 11:06 AM, Zheng Zhang wrote: > I was running some test with Git 1.8.4.5, then I accidentally met a > problem that leaded to the following error, > >>> error: refs/heads/develop does not point to a valid object! > > Turns out that the sha in refs/heads/develop is a bad object id, thi

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Michael Haggerty
On 02/13/2015 10:53 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Now back to the real world. Currently, if R is changed *through* a >> symbolic reference S, then the reflogs for both R and S are updated, but >> not the reflogs for any other symbolic references that might point at R.

Re: [PATCH] hex.c: reduce memory footprint of sha1_to_hex static buffers

2015-02-13 Thread Junio C Hamano
Stefan Beller writes: > On Fri, Feb 13, 2015 at 1:41 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> 41 bytes is the exact number of bytes needed for having the returned >>> hex string represented. 50 seems to be an arbitrary number, such >>> that there are no benefits from alignment

Re: [PATCH 0/2] Getopt::Long workaround in send-email

2015-02-13 Thread brian m. carlson
On Fri, Feb 13, 2015 at 12:19:27PM -0800, Junio C Hamano wrote: The first one is a replay of Kyle's workaround for older versions of Getopt::Long that did not take "--no-option" to negate a boolean option "--option". The second one revert the workarounds made to the test script over time, and sh

Re: [PATCH 2/2] transport-helper: ask the helper to set the same options for import as for fetch

2015-02-13 Thread Mike Hommey
On Fri, Feb 13, 2015 at 11:36:24AM -0800, Junio C Hamano wrote: > Mike Hommey writes: > > > A remote helper is currently only told about the 'check-connectivity', > > 'cloning', and 'update-shallow' options when it supports the 'fetch' > > command, but not when it supports 'import' instead. > >

Re: git ls-files -X option is relative to repo root

2015-02-13 Thread Junio C Hamano
Daniel Finnie writes: > Do you have any comments on why the path in --exclude-from= is > relative to the project root? Not really. Because ls-files was designed to be used by Porcelain scripts, and because the first thing Porcelain scripts are expected to do is to learn the prefix and then cd t

Re: [PATCH] hex.c: reduce memory footprint of sha1_to_hex static buffers

2015-02-13 Thread Linus Torvalds
On Fri, Feb 13, 2015 at 1:56 PM, Stefan Beller wrote: > > As I could not find any documentation on the > magical 50 in the early days, I cc'd Linus > in case there is something I did not think of yet. Nothing magical, it's just "rounded up from 40 + NUL character". Linus

Re: [PATCH] Remove duplicate #include

2015-02-13 Thread Dilyan Palauzov
Hello Junio, in theory it speeds up, because the preprocessor has less work to do. In practice I don't know how much and this seems also irrelevant criterion for accepting this patch. Greetings Dilyan On 13.02.2015 22:15, Junio C Hamano wrote: > Дилян Палаузов writes: > >> deheader (git://g

Re: [PATCH] hex.c: reduce memory footprint of sha1_to_hex static buffers

2015-02-13 Thread Stefan Beller
On Fri, Feb 13, 2015 at 1:41 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> 41 bytes is the exact number of bytes needed for having the returned >> hex string represented. 50 seems to be an arbitrary number, such >> that there are no benefits from alignment to certain address boundaries.

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Junio C Hamano
Michael Haggerty writes: > Now back to the real world. Currently, if R is changed *through* a > symbolic reference S, then the reflogs for both R and S are updated, but > not the reflogs for any other symbolic references that might point at R. > If R is changed directly, then no symref's reflogs

Re: [PATCH] hex.c: reduce memory footprint of sha1_to_hex static buffers

2015-02-13 Thread Junio C Hamano
Stefan Beller writes: > 41 bytes is the exact number of bytes needed for having the returned > hex string represented. 50 seems to be an arbitrary number, such > that there are no benefits from alignment to certain address boundaries. Yes, with s/seems to be/is/; This comes from e83c5163 (Initi

Re: git ls-files -X option is relative to repo root

2015-02-13 Thread Daniel Finnie
Hi Junio, Thanks for the info and backstory. I didn't realize that the paths in the file specified by --exclude-from would be relative to the project root. That makes my original use case kind of silly (it's a long story, but I was curious which files were ignored by a subset of my .gitignore fi

[PATCH] hex.c: reduce memory footprint of sha1_to_hex static buffers

2015-02-13 Thread Stefan Beller
41 bytes is the exact number of bytes needed for having the returned hex string represented. 50 seems to be an arbitrary number, such that there are no benefits from alignment to certain address boundaries. Signed-off-by: Stefan Beller --- hex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] Remove duplicate #include

2015-02-13 Thread Junio C Hamano
Дилян Палаузов writes: > deheader (git://gitorious.org/deheader/deheader.git) found out that > some .c files #include twice one and the same header file. > > This patch removes such occurrences and hence speeds up the compilation. Does it speed up? By how much? Any numbers? I do not see any

Re: [msysGit] Re: Windows Bluescreen

2015-02-13 Thread Thomas Braun
Am 12.02.2015 um 14:21 schrieb Erik Friesen: > Sorry, I don't know what this TOP posting problem is, and hitting > reply only replies to the last sender. If you prefer, and you have > some regular bugtracker, I could use that instead of email posting. > > To repro- > Set up git user on local lin

Re: git ls-files -X option is relative to repo root

2015-02-13 Thread Junio C Hamano
Junio C Hamano writes: > ... It does not make sense to allow where you are > to affect behaviour of the command, i.e. in these two invocations of > ls-files: > > git ls-files -X /var/tmp/exclude -i > cd example && git ls-files -X /var/tmp/exclude -i > > if the same line in /var/tmp

Re: git ls-files -X option is relative to repo root

2015-02-13 Thread Junio C Hamano
Daniel Finnie writes: > My question deals with the --exclude-from option to git-ls-files. You will be fine if you remember that these plumbing commands work by first cd'ing to the top-level of the working tree (and adjust the paths given from the command line by prefixing the prefix to them). T

Re: [PATCH 0/2] Getopt::Long workaround in send-email

2015-02-13 Thread Kyle J. McKay
On Feb 13, 2015, at 12:19, Junio C Hamano wrote: The first one is a replay of Kyle's workaround for older versions of Getopt::Long that did not take "--no-option" to negate a boolean option "--option". The second one reverts the workarounds made to the test script over time, and should break if

[PATCH 0/2] Getopt::Long workaround in send-email

2015-02-13 Thread Junio C Hamano
The first one is a replay of Kyle's workaround for older versions of Getopt::Long that did not take "--no-option" to negate a boolean option "--option". The second one revert the workarounds made to the test script over time, and should break if the first one does not work well for older Getopt::L

[PATCH 1/2] git-send-email.perl: support no- prefix with older GetOptions

2015-02-13 Thread Junio C Hamano
From: "Kyle J. McKay" Only Perl version 5.8.0 or later is required, but that comes with an older Getopt::Long (2.32) that does not support the 'no-' prefix. Support for that was added in Getopt::Long version 2.33. Since the help only mentions the 'no-' prefix and not the 'no' prefix, add explic

[PATCH 2/2] SQUASH??? t9001: turn --no$option workarounds to --no-$option

2015-02-13 Thread Junio C Hamano
These were done to work around older versions of Getopt::Long that did not take negation of a boolean "--option" as "--no-option" (but they happily took "--nooption"). I am inclined to squash this into the previous one. Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 10 +- 1

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Michael Haggerty
On 02/13/2015 08:12 PM, Junio C Hamano wrote: > [...] > As we are trying to see a way to move forward to do the right thing > around reflog, I was wondering if locking only the symbolic ref is a > sensible endgame. "The right thing" being: > >When a symbolic ref S points at underlying ref R,

Re: Keep original author with git merge --squash?

2015-02-13 Thread Jeff King
On Fri, Feb 13, 2015 at 11:30:53AM -0800, Junio C Hamano wrote: > > This case collapses nicely if we make a slight tweak to your proposed > > behavior (or maybe this is what you meant). If there are multiple > > authors listed, we behave as if none was listed. That would leave the > > authorship a

Re: [PATCH 2/2] transport-helper: ask the helper to set the same options for import as for fetch

2015-02-13 Thread Junio C Hamano
Mike Hommey writes: > A remote helper is currently only told about the 'check-connectivity', > 'cloning', and 'update-shallow' options when it supports the 'fetch' > command, but not when it supports 'import' instead. Sounds sensible. Does the same issue exist for export vs push or do they happ

Re: Keep original author with git merge --squash?

2015-02-13 Thread Junio C Hamano
Jeff King writes: > On Thu, Feb 12, 2015 at 03:32:37PM -0800, Junio C Hamano wrote: > >> > It also raises a question for the proposal in this thread: if there are >> > multiple "Author:" lines, which one do we take? The first, or the last? >> >> I was siding with David's "pay attention to in-buf

Re: [PATCH 0/3] Win32: nanosecond-precision file times

2015-02-13 Thread Junio C Hamano
Karsten Blees writes: > Am 13.02.2015 um 00:38 schrieb Junio C Hamano: >> >> We do have sec/nsec fields in cache_time structure, so I have >> nothing against updating the msysGit port to fill that value. Having said that, we do not enable the NSEC stuff by default on Unix for a reason. I'd exp

git ls-files -X option is relative to repo root

2015-02-13 Thread Daniel Finnie
I encountered some unexpected behavior with Git today and was hoping to either a) clear up my misconception or b) make a bug report. My question deals with the --exclude-from option to git-ls-files. It appears that paths passed to this option are relative to the root of the repository, not your c

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Junio C Hamano
Stefan Beller writes: > On Fri, Feb 13, 2015 at 10:26 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> On Fri, Feb 13, 2015 at 10:05 AM, Junio C Hamano wrote: >>> We convinced ourselves that not locking the symref is wrong, but have we actually convinced us that not locking

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Stefan Beller
On Fri, Feb 13, 2015 at 10:26 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Fri, Feb 13, 2015 at 10:05 AM, Junio C Hamano wrote: >> >>> We convinced ourselves that not locking the symref is wrong, but >>> have we actually convinced us that not locking the underlying ref, >>> as long

Re: [PATCH v2 04/12] ref_transaction_update(): remove "have_old" parameter

2015-02-13 Thread Junio C Hamano
Michael Haggerty writes: > On 02/12/2015 06:32 PM, Junio C Hamano wrote: >> On Thu, Feb 12, 2015 at 3:12 AM, Michael Haggerty >> wrote: >>> Instead, verify the reference's old value if and only if old_sha1 is >>> non-NULL. >>> >>> ... >>> @@ -3664,9 +3664,6 @@ int ref_transaction_update(struct

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Junio C Hamano
Stefan Beller writes: > On Fri, Feb 13, 2015 at 10:05 AM, Junio C Hamano wrote: > >> We convinced ourselves that not locking the symref is wrong, but >> have we actually convinced us that not locking the underlying ref, >> as long as we have a lock on the symref, is safe? >> >> To protect you, t

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Stefan Beller
On Fri, Feb 13, 2015 at 10:05 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> I also realized that Git's current policy is probably not tenable if one >> process is re-seating a symref at the same time as another process is >> expiring its reflog. The "git reflog expire HEAD" might grab

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Junio C Hamano
Michael Haggerty writes: > I also realized that Git's current policy is probably not tenable if one > process is re-seating a symref at the same time as another process is > expiring its reflog. The "git reflog expire HEAD" might grab > "refs/heads/master.lock" then start rewriting "logs/HEAD". M

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Stefan Beller
On Fri, Feb 13, 2015 at 8:26 AM, Michael Haggerty wrote: > > What is the best way forward? > > Switching to holding only "HEAD.lock" while updating "logs/HEAD" is the > right solution, but it would introduce an incompatibility with old > versions of Git and libgit2 (and maybe JGit?) Probably nobod

Re: [PATCH v2 04/12] ref_transaction_update(): remove "have_old" parameter

2015-02-13 Thread Michael Haggerty
On 02/12/2015 06:32 PM, Junio C Hamano wrote: > On Thu, Feb 12, 2015 at 3:12 AM, Michael Haggerty > wrote: >> Instead, verify the reference's old value if and only if old_sha1 is >> non-NULL. >> >> ... >> @@ -3664,9 +3664,6 @@ int ref_transaction_update(struct ref_transaction >> *transaction, >>

Git submodule removal and replacement results in failures

2015-02-13 Thread Robert Dailey
Let's say I have a submodule set to directory "foo". If I remove this submodule in 1 commit (git rm -f foo) and then in a 2nd commit after that, physically commit those files, the next person that does a `git submodule update --recursive` results in failure because it says it can't overwrite files.

Re: [PATCH 8/8] reflog_expire(): lock symbolic refs themselves, not their referent

2015-02-13 Thread Michael Haggerty
On 02/12/2015 07:04 PM, Stefan Beller wrote: > On Thu, Feb 12, 2015 at 8:52 AM, Michael Haggerty > wrote: >> However, another important question is whether other Git implementations >> have copied this unusual locking policy. If so, that would be a reason >> not to change it. I just pinged the li

Kind reminder about your Invited Paper

2015-02-13 Thread Dr. Zoe Michel .
Dear Professor I would like to ask you if you have uploaded your Invited Paper in our conferences in Vienna, Austria, March 15-17, 2015: www.inase.org Invited Authors have a special privileged position in the conference program with double time for their presentation. The number of Invited Pap

[PATCH] Remove duplicate #include

2015-02-13 Thread Дилян Палаузов
deheader (git://gitorious.org/deheader/deheader.git) found out that some .c files #include twice one and the same header file. This patch removes such occurrences and hence speeds up the compilation. Signed-off-by: Дилян Палаузов --- builtin/fetch.c| 1 - trailer.c | 1 - transport

Re: [PATCH 6/8] reflog_expire(): ignore --updateref for symbolic references

2015-02-13 Thread Michael Haggerty
On 02/12/2015 10:54 PM, Jeff King wrote: > On Mon, Feb 09, 2015 at 10:12:42AM +0100, Michael Haggerty wrote: > >> if (!(flags & EXPIRE_REFLOGS_DRY_RUN)) { >> +/* >> + * It doesn't make sense to adjust a reference pointed >> + * to by a symbolic ref based on

RE: t5570 trap use in start/stop_git_daemon

2015-02-13 Thread Randall S. Becker
On 2015/02/13 3:58AM Joachim Schmitz wrote: >Jeff King peff.net> writes: > > On Fri, Feb 13, 2015 at 02:44:03AM -0500, Jeff King wrote: > > On Thu, Feb 12, 2015 at 03:31:12PM -0500, Randall S. Becker wrote: > > > >> Hmm, today I learned something new about ksh. Apparently when you use >> the "fu

Pack v4 again..

2015-02-13 Thread Duy Nguyen
After taking 1.5 years "vacation" from pack v4, I plan to do something about it again. Will post more when I have some patches to discuss. Only one question for now (forgive me if I asked already, it's been quite some time) I think pack v4 does not deliver its best promise that walking a tree is s

Re: [PATCH 0/3] nd/multiple-work-trees updates

2015-02-13 Thread Duy Nguyen
On Fri, Feb 13, 2015 at 5:57 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> These patches are on top of what's in 'pu'. They add >> --ignore-other-worktrees and make a note about current submodule >> support status. I don't think submodule support is ready yet even >> with Max Kir

Bad object pointed under refs/head/

2015-02-13 Thread Zheng Zhang
Hi, I was running some test with Git 1.8.4.5, then I accidentally met a problem that leaded to the following error, > > error: refs/heads/develop does not point to a valid object! Turns out that the sha in refs/heads/develop is a bad object id, this happened after merging a branch X to branch de

Re: could not verify object error

2015-02-13 Thread Jeff King
On Thu, Feb 12, 2015 at 12:32:45PM +, Daniel Devlin wrote: > tag_contents = > "object f849f9e28c7f36a826d4b451efb16516c0c3acc2\ntype #{type}\ntag # > {tagname}\ntagger #{username} <#{email}> #{Time.new.to_i} +\n\n#{message}" > [...] > executecommand = "printf \"#{tag_contents}\" | git mkt

Re: [PATCH 0/3] nd/multiple-work-trees updates

2015-02-13 Thread Dennis Kaarsemaker
On do, 2015-02-12 at 14:57 -0800, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > > > These patches are on top of what's in 'pu'. They add > > --ignore-other-worktrees and make a note about current submodule > > support status. I don't think submodule support is ready yet even > > with Ma

Re: t5570 trap use in start/stop_git_daemon

2015-02-13 Thread Joachim Schmitz
Jeff King peff.net> writes: > > On Fri, Feb 13, 2015 at 02:44:03AM -0500, Jeff King wrote: > > > On Thu, Feb 12, 2015 at 03:31:12PM -0500, Randall S. Becker wrote: > > > Hmm, today I learned something new about ksh. Apparently when you use > the "function" keyword to define a function like:

Re: t5570 trap use in start/stop_git_daemon

2015-02-13 Thread Jeff King
On Fri, Feb 13, 2015 at 02:44:03AM -0500, Jeff King wrote: > On Thu, Feb 12, 2015 at 03:31:12PM -0500, Randall S. Becker wrote: > > > On the NonStop port, we found that “trap” was causing an issue with test > > success for t5570. When start_git_daemon completes, the shell (ksh,bash) on > > this p