Re: [PATCH] Create $GIT_DIR/objects/pack if missing during renameAndOpenPack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



söndag 10 maj 2009 23:30:46 skrev "Shawn O. Pearce" <spearce@xxxxxxxxxxx>:
> diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java b/org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java
> index b2bcbb7..1eb40d4 100644
> --- a/org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java
> +++ b/org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java
> @@ -1037,6 +1037,14 @@ public PackLock renameAndOpenPack(final String lockMessage)
>  		final File finalIdx = new File(packDir, "pack-" + name + ".idx");
>  		final PackLock keep = new PackLock(finalPack);
>  
> +		if (!packDir.exists() && !packDir.mkdir() && !packDir.exists()) {

Is there a lot to gain by this instead of just if (!packDir.mkdir() && !packDir.exists()) ?

-- robin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]