Re: What's cooking in git.git (Dec 2016, #05; Mon, 19)

Subsystems: the rest

2 messages, 2 authors, 2016-12-27 · open the first message on its own page

Re: What's cooking in git.git (Dec 2016, #05; Mon, 19)

From: Junio C Hamano <hidden>
Date: 2016-12-27 17:17:05

Michael Haggerty [off-list ref] writes:
Sorry I didn't notice this earlier, but the `LOCK_REPORT_ON_ERROR`
constant introduced by

    3f061bf "lockfile: LOCK_REPORT_ON_ERROR", 2016-12-07

sets that constant to the value 2,...
Sorry I didn't notice this earlier, either.  Thanks for spotting.

-- >8 --
From: Junio C Hamano <redacted>
Date: Tue, 27 Dec 2016 09:12:09 -0800
Subject: [PATCH] lockfile: move REPORT_ON_ERROR bit elsewhere

There was LOCK_NO_DEREF defined as 2 = 1<<1 with the same value,
which was missed due to a huge comment block.  Deconflict by moving
the new one to 4 = 1<<2 for now.

Signed-off-by: Junio C Hamano <redacted>
---
 lockfile.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lockfile.h b/lockfile.h
index 16775a7d79..7b715f9e77 100644
--- a/lockfile.h
+++ b/lockfile.h
@@ -137,7 +137,7 @@ struct lock_file {
  * ... this flag can be passed instead to return -1 and give the usual
  * error message upon an error.
  */
-#define LOCK_REPORT_ON_ERROR 2
+#define LOCK_REPORT_ON_ERROR 4
 
 /*
  * Usually symbolic links in the destination path are resolved. This
-- 
2.11.0-449-gc01fa73926

Re: What's cooking in git.git (Dec 2016, #05; Mon, 19)

From: Michael Haggerty <hidden>
Date: 2016-12-27 18:22:54

On 12/27/2016 06:16 PM, Junio C Hamano wrote:
Michael Haggerty [off-list ref] writes:
quoted
Sorry I didn't notice this earlier, but the `LOCK_REPORT_ON_ERROR`
constant introduced by

    3f061bf "lockfile: LOCK_REPORT_ON_ERROR", 2016-12-07

sets that constant to the value 2,...
Sorry I didn't notice this earlier, either.  Thanks for spotting.

-- >8 --
From: Junio C Hamano <redacted>
Date: Tue, 27 Dec 2016 09:12:09 -0800
Subject: [PATCH] lockfile: move REPORT_ON_ERROR bit elsewhere

There was LOCK_NO_DEREF defined as 2 = 1<<1 with the same value,
which was missed due to a huge comment block.  Deconflict by moving
the new one to 4 = 1<<2 for now.
The fix is obviously correct. I'm not sure I like it that comments are
being blamed for mistakes :-P

Perhaps defining these constants within an `enum` would make it clearer
that they are a group and help prevent problems like this in the future
(though that could be done later rather than as part of this hot fix).

Michael
quoted hunk
Signed-off-by: Junio C Hamano <redacted>
---
 lockfile.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lockfile.h b/lockfile.h
index 16775a7d79..7b715f9e77 100644
--- a/lockfile.h
+++ b/lockfile.h
@@ -137,7 +137,7 @@ struct lock_file {
  * ... this flag can be passed instead to return -1 and give the usual
  * error message upon an error.
  */
-#define LOCK_REPORT_ON_ERROR 2
+#define LOCK_REPORT_ON_ERROR 4
 
 /*
  * Usually symbolic links in the destination path are resolved. This

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help