git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] incremental update against 'next' branch
@ 2013-07-19  0:16 Kyle J. McKay
  2013-07-19  0:16 ` [PATCH 1/1] Git.pm: revert _temp_cache use of temp_is_locked Kyle J. McKay
  0 siblings, 1 reply; 2+ messages in thread
From: Kyle J. McKay @ 2013-07-19  0:16 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

NOTE: This patch requires:

  4e63dcc Git.pm: add new temp_is_locked function

which is currently in next.

Versions v2-v3 of the "allow git-svn fetching to work using serf" patch
introduced a bug when attempting to change the Git.pm _temp_cache function
to use the new temp_is_locked function at the suggestion of a reviewer.

This patch reverts that change as the logic in _temp_cache isn't really
conducive to using temp_is_locked because its tests are not exactly the
same as the ones in temp_is_locked.

Kyle J. McKay (1):
  Git.pm: revert _temp_cache use of temp_is_locked

 perl/Git.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.8.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] Git.pm: revert _temp_cache use of temp_is_locked
  2013-07-19  0:16 [PATCH 0/1] incremental update against 'next' branch Kyle J. McKay
@ 2013-07-19  0:16 ` Kyle J. McKay
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle J. McKay @ 2013-07-19  0:16 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

When the temp_is_locked function was introduced, there was
a desire to make _temp_cache use it.  Unfortunately due to the
various tests and logic flow involved changing the _temp_cache
function to use the new temp_is_locked function is problematic
as _temp_cache needs a slightly different test than is provided
by the temp_is_locked function.

This change reverts use of temp_is_locked in the _temp_cache
function and restores the original code that existed there
before the temp_is_locked function was added.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
 perl/Git.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/perl/Git.pm b/perl/Git.pm
index 0ba15b9..204fdc6 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1277,7 +1277,7 @@ sub _temp_cache {
 
 	my $temp_fd = \$TEMP_FILEMAP{$name};
 	if (defined $$temp_fd and $$temp_fd->opened) {
-		if (temp_is_locked($name)) {
+		if ($TEMP_FILES{$$temp_fd}{locked}) {
 			throw Error::Simple("Temp file with moniker '" .
 				$name . "' already in use");
 		}
-- 
1.8.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-19  0:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19  0:16 [PATCH 0/1] incremental update against 'next' branch Kyle J. McKay
2013-07-19  0:16 ` [PATCH 1/1] Git.pm: revert _temp_cache use of temp_is_locked Kyle J. McKay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).